diff --git a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md index ce6285e567f9..0082d65476e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md @@ -1,5 +1,238 @@ # Release History +## 41.7.0b1 (2026-09-02) + +### Features Added + + - Client `ContainerServiceClient` added operation group `alert_configurations` + - Client `ContainerServiceClient` added operation group `container_service` + - Client `ContainerServiceClient` added operation group `jwt_authenticators` + - Client `ContainerServiceClient` added operation group `load_balancers` + - Client `ContainerServiceClient` added operation group `maintenance_windows` + - Client `ContainerServiceClient` added operation group `managed_cluster_snapshots` + - Client `ContainerServiceClient` added operation group `mesh_memberships` + - Client `ContainerServiceClient` added operation group `operation_status_result` + - Client `ContainerServiceClient` added operation group `vm_skus` + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `enable_os_disk_full_caching` + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `node_initialization_taints` + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `prepared_image_specification_profile` + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `upgrade_settings_blue_green` + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `upgrade_strategy` + - Enum `AgentPoolMode` added member `MACHINES` + - Enum `AgentPoolMode` added member `MANAGED_SYSTEM` + - Model `AgentPoolNetworkProfile` added property `node_public_ip_prefix_i_ds` + - Model `AgentPoolNetworkProfile` added property `secondary_network_interfaces` + - Enum `AgentPoolType` added member `FLEX_NODES` + - Model `AgentPoolUpgradeProfileProperties` added property `components_by_releases` + - Model `AgentPoolUpgradeProfilePropertiesUpgradesItem` added property `is_out_of_support` + - Model `AgentPoolUpgradeSettings` added property `max_blocked_nodes` + - Enum `BackendPoolType` added member `POD_IP` + - Model `ContainerServiceNetworkProfile` added property `bastion_profile` + - Model `ContainerServiceNetworkProfile` added property `kube_proxy_config` + - Model `ContainerServiceNetworkProfile` added property `nat_gateway_id` + - Model `ContainerServiceNetworkProfile` added property `pod_link_local_access` + - Model `GPUProfile` added property `driver_type` + - Model `GPUProfile` added property `nvidia` + - Model `IdentityBindingProperties` added property `allowed_subjects` + - Model `KubeletConfig` added property `eviction_max_pod_grace_period_in_seconds` + - Model `KubeletConfig` added property `hard_eviction_threshold` + - Model `KubeletConfig` added property `kube_reserved` + - Model `KubeletConfig` added property `seccomp_default` + - Model `KubeletConfig` added property `soft_eviction_grace_period` + - Model `KubeletConfig` added property `soft_eviction_threshold` + - Enum `LoadBalancerSku` added member `SERVICE` + - Model `MachineNetworkProperties` added property `enable_node_public_ip` + - Model `MachineNetworkProperties` added property `node_public_ip_prefix_id` + - Model `MachineNetworkProperties` added property `node_public_ip_tags` + - Model `MachineNetworkProperties` added property `pod_subnet_id` + - Model `MachineNetworkProperties` added property `vnet_subnet_id` + - Model `MachineProperties` added property `billing` + - Model `MachineProperties` added property `capacity_reservation` + - Model `MachineProperties` added property `e_tag` + - Model `MachineProperties` added property `eviction_policy` + - Model `MachineProperties` added property `hardware` + - Model `MachineProperties` added property `kubernetes` + - Model `MachineProperties` added property `local_dns_profile` + - Model `MachineProperties` added property `mode` + - Model `MachineProperties` added property `node_image_version` + - Model `MachineProperties` added property `operating_system` + - Model `MachineProperties` added property `priority` + - Model `MachineProperties` added property `provisioning_state` + - Model `MachineProperties` added property `security` + - Model `MachineProperties` added property `status` + - Model `MachineProperties` added property `tags` + - Model `MaintenanceConfigurationProperties` added property `maintenance_window_id` + - Model `ManagedClusterAgentPoolProfile` added property `enable_os_disk_full_caching` + - Model `ManagedClusterAgentPoolProfile` added property `node_initialization_taints` + - Model `ManagedClusterAgentPoolProfile` added property `prepared_image_specification_profile` + - Model `ManagedClusterAgentPoolProfile` added property `upgrade_settings_blue_green` + - Model `ManagedClusterAgentPoolProfile` added property `upgrade_strategy` + - Model `ManagedClusterAgentPoolProfileProperties` added property `enable_os_disk_full_caching` + - Model `ManagedClusterAgentPoolProfileProperties` added property `node_initialization_taints` + - Model `ManagedClusterAgentPoolProfileProperties` added property `prepared_image_specification_profile` + - Model `ManagedClusterAgentPoolProfileProperties` added property `upgrade_settings_blue_green` + - Model `ManagedClusterAgentPoolProfileProperties` added property `upgrade_strategy` + - Model `ManagedClusterHTTPProxyConfig` added property `effective_no_proxy` + - Model `ManagedClusterIngressProfile` added property `application_load_balancer` + - Model `ManagedClusterIngressProfileWebAppRouting` added property `default_domain` + - Model `ManagedClusterLoadBalancerProfile` added property `cluster_service_load_balancer_health_probe_mode` + - Model `ManagedClusterPoolUpgradeProfile` added property `components_by_releases` + - Model `ManagedClusterPoolUpgradeProfileUpgradesItem` added property `is_out_of_support` + - Model `ManagedClusterProperties` added property `control_plane_scaling_profile` + - Model `ManagedClusterProperties` added property `creation_data` + - Model `ManagedClusterProperties` added property `enable_fips` + - Model `ManagedClusterProperties` added property `enable_namespace_resources` + - Model `ManagedClusterProperties` added property `enable_node_hardening` + - Model `ManagedClusterProperties` added property `health_monitor_profile` + - Model `ManagedClusterProperties` added property `node_disruption_profile` + - Model `ManagedClusterSecurityProfile` added property `image_integrity` + - Model `ManagedClusterSecurityProfile` added property `kubernetes_resource_object_encryption_profile` + - Model `ManagedClusterSecurityProfile` added property `node_restriction` + - Model `ManagedClusterSecurityProfile` added property `service_account_image_pull_profile` + - Model `ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler` added property `addon_autoscaling` + - Enum `OSSKU` added member `FLATCAR` + - Enum `OSSKU` added member `MARINER` + - Enum `OSSKU` added member `UBUNTU2604` + - Enum `OSSKU` added member `WINDOWS_ANNUAL` + - Enum `PublicNetworkAccess` added member `SECURED_BY_PERIMETER` + - Enum `SnapshotType` added member `MANAGED_CLUSTER` + - Enum `TransitEncryptionType` added member `M_TLS` + - Enum `WorkloadRuntime` added member `KATA_MSHV_VM_ISOLATION` + - Added enum `AddonAutoscaling` + - Added model `AgentPoolBlueGreenUpgradeSettings` + - Added model `AgentPoolNICPublicIPAddressConfiguration` + - Added enum `AgentPoolNICPublicIPAddressVersion` + - Added model `AgentPoolNetworkInterface` + - Added enum `AgentPoolNetworkInterfaceType` + - Added model `AgentPoolUpdate` + - Added model `AgentPoolUpdateManualScaleProfile` + - Added model `AgentPoolUpdateProperties` + - Added model `AgentPoolUpdateScaleProfile` + - Added model `AgentPoolUpdateVirtualMachinesProfile` + - Added model `AlertConfiguration` + - Added enum `AlertConfigurationMode` + - Added model `AlertConfigurationProperties` + - Added enum `AlertConfigurationProvisioningState` + - Added model `AlertNotification` + - Added model `AllowedSubject` + - Added model `BastionProfile` + - Added enum `BastionSku` + - Added model `BootstrapAzureConfig` + - Added model `BootstrapComponentVersions` + - Added model `BootstrapKubeletConfig` + - Added model `BootstrapNetworkingConfig` + - Added model `BootstrapNodeConfig` + - Added model `BootstrapTargetCluster` + - Added model `BootstrapTokenInfo` + - Added model `CapacityReservation` + - Added model `CapacityReservationGroup` + - Added enum `ClusterServiceLoadBalancerHealthProbeMode` + - Added model `Component` + - Added model `ComponentsByRelease` + - Added model `ContainerServiceNetworkProfileKubeProxyConfig` + - Added model `ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig` + - Added enum `ControlPlaneScalingSize` + - Added enum `DriftAction` + - Added enum `DriverType` + - Added model `GuardrailsAvailableVersion` + - Added model `GuardrailsAvailableVersionsProperties` + - Added enum `GuardrailsSupport` + - Added model `HardEvictionThreshold` + - Added enum `InfrastructureEncryption` + - Added enum `IpvsScheduler` + - Added model `JWTAuthenticator` + - Added model `JWTAuthenticatorClaimMappingExpression` + - Added model `JWTAuthenticatorClaimMappings` + - Added model `JWTAuthenticatorExtraClaimMappingExpression` + - Added model `JWTAuthenticatorIssuer` + - Added model `JWTAuthenticatorProperties` + - Added enum `JWTAuthenticatorProvisioningState` + - Added model `JWTAuthenticatorValidationRule` + - Added model `KubeReserved` + - Added model `KubernetesResourceObjectEncryptionProfile` + - Added model `LabelSelector` + - Added model `LabelSelectorRequirement` + - Added model `ListBootstrapDataRequest` + - Added model `LoadBalancer` + - Added model `LoadBalancerProperties` + - Added model `MachineBillingProfile` + - Added model `MachineHardwareProfile` + - Added model `MachineKubernetesProfile` + - Added model `MachineOSProfile` + - Added model `MachineOSProfileLinuxProfile` + - Added model `MachineSecurityProfile` + - Added model `MachineStatus` + - Added model `MaintenanceWindowResource` + - Added model `MaintenanceWindowResourceProperties` + - Added model `ManagedClusterControlPlaneScalingProfile` + - Added model `ManagedClusterHealthMonitorProfile` + - Added model `ManagedClusterIngressDefaultDomainProfile` + - Added model `ManagedClusterIngressProfileApplicationLoadBalancer` + - Added model `ManagedClusterPropertiesForSnapshot` + - Added model `ManagedClusterSecurityProfileImageIntegrity` + - Added model `ManagedClusterSecurityProfileNodeRestriction` + - Added model `ManagedClusterSnapshot` + - Added model `ManagedClusterSnapshotProperties` + - Added enum `ManagementMode` + - Added model `MeshMembership` + - Added model `MeshMembershipPrivateConnectProfile` + - Added model `MeshMembershipProperties` + - Added enum `MeshMembershipProvisioningState` + - Added enum `MigStrategy` + - Added enum `Mode` + - Added model `NetworkProfileForSnapshot` + - Added enum `NodeDisruptionPolicy` + - Added model `NodeDisruptionProfile` + - Added model `NodeImageVersion` + - Added enum `NvidiaDriverMode` + - Added model `NvidiaGPUProfile` + - Added model `OperationStatusResult` + - Added enum `Operator` + - Added enum `PodLinkLocalAccess` + - Added model `PoolBootstrapData` + - Added model `PreparedImageSpecificationProfile` + - Added model `RebalanceLoadBalancersRequestBody` + - Added enum `ResourceProvisioningState` + - Added model `ResourceSku` + - Added model `ResourceSkuCapabilities` + - Added model `ResourceSkuCapacity` + - Added enum `ResourceSkuCapacityScaleType` + - Added model `ResourceSkuCosts` + - Added model `ResourceSkuLocationInfo` + - Added model `ResourceSkuRestrictionInfo` + - Added model `ResourceSkuRestrictions` + - Added enum `ResourceSkuRestrictionsReasonCode` + - Added enum `ResourceSkuRestrictionsType` + - Added model `ResourceSkuZoneDetails` + - Added model `SafeguardsAvailableVersion` + - Added model `SafeguardsAvailableVersionsProperties` + - Added enum `SafeguardsSupport` + - Added enum `SeccompDefault` + - Added model `ServiceAccountImagePullProfile` + - Added model `SoftEvictionGracePeriod` + - Added model `SoftEvictionThreshold` + - Added enum `UpgradeStrategy` + - Added enum `VmState` + - Operation group `AgentPoolsOperations` added method `begin_complete_upgrade` + - Operation group `AgentPoolsOperations` added method `begin_update` + - Operation group `AgentPoolsOperations` added method `list_bootstrap_data` + - Operation group `MachinesOperations` added method `begin_create_or_update` + - Operation group `ManagedClustersOperations` added parameter `ignore_pod_disruption_budget` in method `begin_delete` + - Operation group `ManagedClustersOperations` added method `begin_rebalance_load_balancers` + - Operation group `ManagedClustersOperations` added method `get_guardrails_versions` + - Operation group `ManagedClustersOperations` added method `get_safeguards_versions` + - Operation group `ManagedClustersOperations` added method `list_guardrails_versions` + - Operation group `ManagedClustersOperations` added method `list_safeguards_versions` + - Added operation group `AlertConfigurationsOperations` + - Added operation group `ContainerServiceOperations` + - Added operation group `JWTAuthenticatorsOperations` + - Added operation group `LoadBalancersOperations` + - Added operation group `MaintenanceWindowsOperations` + - Added operation group `ManagedClusterSnapshotsOperations` + - Added operation group `MeshMembershipsOperations` + - Added operation group `OperationStatusResultOperations` + - Added operation group `VmSkusOperations` + ## 41.6.0 (2026-08-25) ### Features Added diff --git a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json index e416d7278abb..e1014dd50737 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json @@ -1,9 +1,9 @@ { - "apiVersion": "2026-06-01", + "apiVersion": "2026-06-02-preview", "apiVersions": { - "Microsoft.ContainerService": "2026-06-01" + "Microsoft.ContainerService": "2026-06-02-preview" }, - "commit": "f8beca0ed7b433a34c234f776c06cc38bc799eac", + "commit": "53c0f6efe9872c971e8c365e3b0d41a6bd6efd3d", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks", "emitterVersion": "0.63.5", diff --git a/sdk/containerservice/azure-mgmt-containerservice/api.md b/sdk/containerservice/azure-mgmt-containerservice/api.md index b166143e079d..ad53ae76e0a3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/api.md +++ b/sdk/containerservice/azure-mgmt-containerservice/api.md @@ -3,11 +3,19 @@ namespace azure.mgmt.containerservice class azure.mgmt.containerservice.ContainerServiceClient: implements ContextManager agent_pools: AgentPoolsOperations + alert_configurations: AlertConfigurationsOperations + container_service: ContainerServiceOperations identity_bindings: IdentityBindingsOperations + jwt_authenticators: JWTAuthenticatorsOperations + load_balancers: LoadBalancersOperations machines: MachinesOperations maintenance_configurations: MaintenanceConfigurationsOperations + maintenance_windows: MaintenanceWindowsOperations + managed_cluster_snapshots: ManagedClusterSnapshotsOperations managed_clusters: ManagedClustersOperations managed_namespaces: ManagedNamespacesOperations + mesh_memberships: MeshMembershipsOperations + operation_status_result: OperationStatusResultOperations operations: Operations private_endpoint_connections: PrivateEndpointConnectionsOperations private_link_resources: PrivateLinkResourcesOperations @@ -15,6 +23,7 @@ namespace azure.mgmt.containerservice snapshots: SnapshotsOperations trusted_access_role_bindings: TrustedAccessRoleBindingsOperations trusted_access_roles: TrustedAccessRolesOperations + vm_skus: VmSkusOperations def __init__( self, @@ -43,11 +52,19 @@ namespace azure.mgmt.containerservice.aio class azure.mgmt.containerservice.aio.ContainerServiceClient: implements AsyncContextManager agent_pools: AgentPoolsOperations + alert_configurations: AlertConfigurationsOperations + container_service: ContainerServiceOperations identity_bindings: IdentityBindingsOperations + jwt_authenticators: JWTAuthenticatorsOperations + load_balancers: LoadBalancersOperations machines: MachinesOperations maintenance_configurations: MaintenanceConfigurationsOperations + maintenance_windows: MaintenanceWindowsOperations + managed_cluster_snapshots: ManagedClusterSnapshotsOperations managed_clusters: ManagedClustersOperations managed_namespaces: ManagedNamespacesOperations + mesh_memberships: MeshMembershipsOperations + operation_status_result: OperationStatusResultOperations operations: Operations private_endpoint_connections: PrivateEndpointConnectionsOperations private_link_resources: PrivateLinkResourcesOperations @@ -55,6 +72,7 @@ namespace azure.mgmt.containerservice.aio snapshots: SnapshotsOperations trusted_access_role_bindings: TrustedAccessRoleBindingsOperations trusted_access_roles: TrustedAccessRolesOperations + vm_skus: VmSkusOperations def __init__( self, @@ -98,6 +116,16 @@ namespace azure.mgmt.containerservice.aio.operations **kwargs: Any ) -> AsyncLROPoller[None]: ... + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name']}, api_versions_list=['2026-06-02-preview']) + async def begin_complete_upgrade( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + @overload async def begin_create_or_update( self, @@ -189,6 +217,48 @@ namespace azure.mgmt.containerservice.aio.operations **kwargs: Any ) -> AsyncLROPoller[None]: ... + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> AsyncLROPoller[AgentPool]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> AsyncLROPoller[AgentPool]: ... + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> AsyncLROPoller[AgentPool]: ... + @distributed_trace_async async def begin_upgrade_node_image_version( self, @@ -232,8 +302,44 @@ namespace azure.mgmt.containerservice.aio.operations **kwargs: Any ) -> AsyncItemPaged[AgentPool]: ... + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... + + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... + + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... - class azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations: + + class azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations: def __init__( self, @@ -246,68 +352,68 @@ namespace azure.mgmt.containerservice.aio.operations self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: IdentityBinding, + configuration_name: str, + resource: AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[IdentityBinding]: ... + ) -> AsyncLROPoller[AlertConfiguration]: ... @overload async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: IdentityBinding, + configuration_name: str, + resource: AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[IdentityBinding]: ... + ) -> AsyncLROPoller[AlertConfiguration]: ... @overload async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: IO[bytes], + configuration_name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[IdentityBinding]: ... + ) -> AsyncLROPoller[AlertConfiguration]: ... @distributed_trace_async - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'configuration_name']}, api_versions_list=['2026-06-02-preview']) async def begin_delete( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + configuration_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @distributed_trace_async - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'configuration_name', 'accept']}, api_versions_list=['2026-06-02-preview']) async def get( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + configuration_name: str, **kwargs: Any - ) -> IdentityBinding: ... + ) -> AlertConfiguration: ... @distributed_trace - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged[IdentityBinding]: ... + ) -> AsyncItemPaged[AlertConfiguration]: ... - class azure.mgmt.containerservice.aio.operations.MachinesOperations: + class azure.mgmt.containerservice.aio.operations.ContainerServiceOperations: def __init__( self, @@ -315,27 +421,15 @@ namespace azure.mgmt.containerservice.aio.operations **kwargs ) -> None: ... - @distributed_trace_async - async def get( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - **kwargs: Any - ) -> Machine: ... - @distributed_trace - def list( + def list_node_image_versions( self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, + location: str, **kwargs: Any - ) -> AsyncItemPaged[Machine]: ... + ) -> AsyncItemPaged[NodeImageVersion]: ... - class azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations: + class azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations: def __init__( self, @@ -344,69 +438,72 @@ namespace azure.mgmt.containerservice.aio.operations ) -> None: ... @overload - async def create_or_update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: MaintenanceConfiguration, + identity_binding_name: str, + parameters: IdentityBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> AsyncLROPoller[IdentityBinding]: ... @overload - async def create_or_update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: MaintenanceConfiguration, + identity_binding_name: str, + parameters: IdentityBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> AsyncLROPoller[IdentityBinding]: ... @overload - async def create_or_update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - config_name: str, + identity_binding_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> AsyncLROPoller[IdentityBinding]: ... @distributed_trace_async - async def delete( + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) + async def begin_delete( self, resource_group_name: str, resource_name: str, - config_name: str, + identity_binding_name: str, **kwargs: Any - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) async def get( self, resource_group_name: str, resource_name: str, - config_name: str, + identity_binding_name: str, **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> IdentityBinding: ... @distributed_trace + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged[MaintenanceConfiguration]: ... + ) -> AsyncItemPaged[IdentityBinding]: ... - class azure.mgmt.containerservice.aio.operations.ManagedClustersOperations: + class azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations: def __init__( self, @@ -414,358 +511,396 @@ namespace azure.mgmt.containerservice.aio.operations **kwargs ) -> None: ... - @distributed_trace_async - async def begin_abort_latest_operation( - self, - resource_group_name: str, - resource_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: ... - @overload async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: ManagedCluster, + jwt_authenticator_name: str, + parameters: JWTAuthenticator, *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> AsyncLROPoller[JWTAuthenticator]: ... @overload async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: ManagedCluster, + jwt_authenticator_name: str, + parameters: JWTAuthenticator, *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> AsyncLROPoller[JWTAuthenticator]: ... @overload async def begin_create_or_update( self, resource_group_name: str, resource_name: str, + jwt_authenticator_name: str, parameters: IO[bytes], *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> AsyncLROPoller[JWTAuthenticator]: ... @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'jwt_authenticator_name']}, api_versions_list=['2026-06-02-preview']) async def begin_delete( self, resource_group_name: str, resource_name: str, - *, - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., + jwt_authenticator_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... - @overload - async def begin_reset_aad_profile( + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'jwt_authenticator_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get( self, resource_group_name: str, resource_name: str, - parameters: ManagedClusterAADProfile, - *, - content_type: str = "application/json", + jwt_authenticator_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> JWTAuthenticator: ... - @overload - async def begin_reset_aad_profile( + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, - parameters: ManagedClusterAADProfile, - *, - content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncItemPaged[JWTAuthenticator]: ... - @overload - async def begin_reset_aad_profile( + + class azure.mgmt.containerservice.aio.operations.LoadBalancersOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'load_balancer_name']}, api_versions_list=['2026-06-02-preview']) + async def begin_delete( self, resource_group_name: str, resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", + load_balancer_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... @overload - async def begin_reset_service_principal_profile( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: ManagedClusterServicePrincipalProfile, + load_balancer_name: str, + parameters: LoadBalancer, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> LoadBalancer: ... @overload - async def begin_reset_service_principal_profile( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: ManagedClusterServicePrincipalProfile, + load_balancer_name: str, + parameters: LoadBalancer, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> LoadBalancer: ... @overload - async def begin_reset_service_principal_profile( + async def create_or_update( self, resource_group_name: str, resource_name: str, + load_balancer_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> LoadBalancer: ... @distributed_trace_async - async def begin_rotate_cluster_certificates( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'load_balancer_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get( self, resource_group_name: str, resource_name: str, + load_balancer_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> LoadBalancer: ... - @distributed_trace_async - async def begin_rotate_service_account_signing_keys( + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncItemPaged[LoadBalancer]: ... + + + class azure.mgmt.containerservice.aio.operations.MachinesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... @overload - async def begin_run_command( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: RunCommandRequest, + agent_pool_name: str, + machine_name: str, + parameters: Machine, *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[RunCommandResult]: ... + ) -> AsyncLROPoller[Machine]: ... @overload - async def begin_run_command( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: RunCommandRequest, + agent_pool_name: str, + machine_name: str, + parameters: Machine, *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[RunCommandResult]: ... + ) -> AsyncLROPoller[Machine]: ... @overload - async def begin_run_command( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: IO[bytes], + agent_pool_name: str, + machine_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[RunCommandResult]: ... + ) -> AsyncLROPoller[Machine]: ... @distributed_trace_async - async def begin_start( + async def get( self, resource_group_name: str, resource_name: str, + agent_pool_name: str, + machine_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> Machine: ... - @distributed_trace_async - async def begin_stop( + @distributed_trace + def list( self, resource_group_name: str, resource_name: str, + agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> AsyncItemPaged[Machine]: ... + + + class azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... @overload - async def begin_update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: TagsObject, + config_name: str, + parameters: MaintenanceConfiguration, *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> MaintenanceConfiguration: ... @overload - async def begin_update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: TagsObject, + config_name: str, + parameters: MaintenanceConfiguration, *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> MaintenanceConfiguration: ... @overload - async def begin_update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, + config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", - etag: Optional[str] = ..., - match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[ManagedCluster]: ... + ) -> MaintenanceConfiguration: ... @distributed_trace_async - async def get( + async def delete( self, resource_group_name: str, resource_name: str, + config_name: str, **kwargs: Any - ) -> ManagedCluster: ... + ) -> None: ... @distributed_trace_async - async def get_access_profile( + async def get( self, resource_group_name: str, resource_name: str, - role_name: str, + config_name: str, **kwargs: Any - ) -> ManagedClusterAccessProfile: ... + ) -> MaintenanceConfiguration: ... - @distributed_trace_async - async def get_command_result( + @distributed_trace + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, - command_id: str, **kwargs: Any - ) -> Optional[RunCommandResult]: ... + ) -> AsyncItemPaged[MaintenanceConfiguration]: ... - @distributed_trace_async - async def get_mesh_revision_profile( - self, - location: str, - mode: str, - **kwargs: Any - ) -> MeshRevisionProfile: ... - @distributed_trace_async - async def get_mesh_upgrade_profile( + class azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations: + + def __init__( self, - resource_group_name: str, - resource_name: str, - mode: str, - **kwargs: Any - ) -> MeshUpgradeProfile: ... + *args, + **kwargs + ) -> None: ... - @distributed_trace_async - async def get_upgrade_profile( + @overload + async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, + maintenance_window_name: str, + resource: MaintenanceWindowResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> ManagedClusterUpgradeProfile: ... - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged[ManagedCluster]: ... + ) -> AsyncLROPoller[MaintenanceWindowResource]: ... - @distributed_trace - def list_by_resource_group( + @overload + async def begin_create_or_update( self, resource_group_name: str, + maintenance_window_name: str, + resource: MaintenanceWindowResource, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[ManagedCluster]: ... + ) -> AsyncLROPoller[MaintenanceWindowResource]: ... - @distributed_trace_async - async def list_cluster_admin_credentials( + @overload + async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, + maintenance_window_name: str, + resource: IO[bytes], *, - server_fqdn: Optional[str] = ..., + content_type: str = "application/json", **kwargs: Any - ) -> CredentialResults: ... + ) -> AsyncLROPoller[MaintenanceWindowResource]: ... @distributed_trace_async - async def list_cluster_monitoring_user_credentials( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'maintenance_window_name']}, api_versions_list=['2026-06-02-preview']) + async def begin_delete( self, resource_group_name: str, - resource_name: str, - *, - server_fqdn: Optional[str] = ..., + maintenance_window_name: str, **kwargs: Any - ) -> CredentialResults: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def list_cluster_user_credentials( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'maintenance_window_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get( self, resource_group_name: str, - resource_name: str, - *, - format: Optional[Union[str, Format]] = ..., - server_fqdn: Optional[str] = ..., + maintenance_window_name: str, **kwargs: Any - ) -> CredentialResults: ... + ) -> MaintenanceWindowResource: ... - @distributed_trace_async - async def list_kubernetes_versions( + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list( self, - location: str, + resource_group_name: str, **kwargs: Any - ) -> KubernetesVersionListResult: ... + ) -> AsyncItemPaged[MaintenanceWindowResource]: ... @distributed_trace - def list_mesh_revision_profiles( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[MaintenanceWindowResource]: ... + + @overload + async def update_tags( self, - location: str, + resource_group_name: str, + maintenance_window_name: str, + properties: TagsObject, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[MeshRevisionProfile]: ... + ) -> MaintenanceWindowResource: ... - @distributed_trace - def list_mesh_upgrade_profiles( + @overload + async def update_tags( self, resource_group_name: str, - resource_name: str, + maintenance_window_name: str, + properties: TagsObject, + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[MeshUpgradeProfile]: ... + ) -> MaintenanceWindowResource: ... - @distributed_trace - def list_outbound_network_dependencies_endpoints( + @overload + async def update_tags( self, resource_group_name: str, - resource_name: str, + maintenance_window_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> AsyncItemPaged[OutboundEnvironmentEndpoint]: ... + ) -> MaintenanceWindowResource: ... - class azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations: + class azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations: def __init__( self, @@ -774,126 +909,103 @@ namespace azure.mgmt.containerservice.aio.operations ) -> None: ... @overload - async def begin_create_or_update( + async def create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: ManagedNamespace, + parameters: ManagedClusterSnapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ManagedNamespace]: ... + ) -> ManagedClusterSnapshot: ... @overload - async def begin_create_or_update( + async def create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: ManagedNamespace, + parameters: ManagedClusterSnapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ManagedNamespace]: ... + ) -> ManagedClusterSnapshot: ... @overload - async def begin_create_or_update( + async def create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[ManagedNamespace]: ... + ) -> ManagedClusterSnapshot: ... @distributed_trace_async - async def begin_delete( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name']}, api_versions_list=['2026-06-02-preview']) + async def delete( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> None: ... @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) async def get( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, **kwargs: Any - ) -> ManagedNamespace: ... + ) -> ManagedClusterSnapshot: ... @distributed_trace - def list_by_managed_cluster( - self, - resource_group_name: str, - resource_name: str, - **kwargs: Any - ) -> AsyncItemPaged[ManagedNamespace]: ... + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list(self, **kwargs: Any) -> AsyncItemPaged[ManagedClusterSnapshot]: ... - @distributed_trace_async - async def list_credential( + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_resource_group( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, **kwargs: Any - ) -> CredentialResults: ... + ) -> AsyncItemPaged[ManagedClusterSnapshot]: ... @overload - async def update( + async def update_tags( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, parameters: TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> ManagedNamespace: ... + ) -> ManagedClusterSnapshot: ... @overload - async def update( + async def update_tags( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, parameters: TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> ManagedNamespace: ... + ) -> ManagedClusterSnapshot: ... @overload - async def update( + async def update_tags( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> ManagedNamespace: ... - - - class azure.mgmt.containerservice.aio.operations.Operations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged[OperationValue]: ... + ) -> ManagedClusterSnapshot: ... - class azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations: + class azure.mgmt.containerservice.aio.operations.ManagedClustersOperations: def __init__( self, @@ -902,117 +1014,122 @@ namespace azure.mgmt.containerservice.aio.operations ) -> None: ... @distributed_trace_async - async def begin_delete( + async def begin_abort_latest_operation( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def get( + @overload + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, + parameters: ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> PrivateEndpointConnection: ... + ) -> AsyncLROPoller[ManagedCluster]: ... - @distributed_trace_async - async def list( + @overload + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, + parameters: ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> PrivateEndpointConnectionListResult: ... + ) -> AsyncLROPoller[ManagedCluster]: ... @overload - async def update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: PrivateEndpointConnection, + parameters: IO[bytes], *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> PrivateEndpointConnection: ... + ) -> AsyncLROPoller[ManagedCluster]: ... - @overload - async def update( + @distributed_trace_async + @api_version_validation(params_added_on={'2026-06-02-preview': ['ignore_pod_disruption_budget']}, api_versions_list=['2025-10-01', '2026-01-01', '2026-02-01', '2026-03-01', '2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) + async def begin_delete( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: PrivateEndpointConnection, *, - content_type: str = "application/json", + etag: Optional[str] = ..., + ignore_pod_disruption_budget: Optional[bool] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> PrivateEndpointConnection: ... + ) -> AsyncLROPoller[None]: ... @overload - async def update( + async def begin_rebalance_load_balancers( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: IO[bytes], + parameters: RebalanceLoadBalancersRequestBody, *, content_type: str = "application/json", **kwargs: Any - ) -> PrivateEndpointConnection: ... - - - class azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[None]: ... - @distributed_trace_async - async def list( + @overload + async def begin_rebalance_load_balancers( self, resource_group_name: str, resource_name: str, + parameters: RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", **kwargs: Any - ) -> PrivateLinkResourcesListResult: ... - - - class azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations: + ) -> AsyncLROPoller[None]: ... - def __init__( + @overload + async def begin_rebalance_load_balancers( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... @overload - async def post( + async def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - parameters: PrivateLinkResource, + parameters: ManagedClusterAADProfile, *, content_type: str = "application/json", **kwargs: Any - ) -> PrivateLinkResource: ... + ) -> AsyncLROPoller[None]: ... @overload - async def post( + async def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - parameters: PrivateLinkResource, + parameters: ManagedClusterAADProfile, *, content_type: str = "application/json", **kwargs: Any - ) -> PrivateLinkResource: ... + ) -> AsyncLROPoller[None]: ... @overload - async def post( + async def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, @@ -1020,41 +1137,32 @@ namespace azure.mgmt.containerservice.aio.operations *, content_type: str = "application/json", **kwargs: Any - ) -> PrivateLinkResource: ... - - - class azure.mgmt.containerservice.aio.operations.SnapshotsOperations: - - def __init__( - self, - *args, - **kwargs - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @overload - async def create_or_update( + async def begin_reset_service_principal_profile( self, resource_group_name: str, resource_name: str, - parameters: Snapshot, + parameters: ManagedClusterServicePrincipalProfile, *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[None]: ... @overload - async def create_or_update( + async def begin_reset_service_principal_profile( self, resource_group_name: str, resource_name: str, - parameters: Snapshot, + parameters: ManagedClusterServicePrincipalProfile, *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[None]: ... @overload - async def create_or_update( + async def begin_reset_service_principal_profile( self, resource_group_name: str, resource_name: str, @@ -1062,2271 +1170,4841 @@ namespace azure.mgmt.containerservice.aio.operations *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def delete( + async def begin_rotate_cluster_certificates( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> None: ... + ) -> AsyncLROPoller[None]: ... @distributed_trace_async - async def get( + async def begin_rotate_service_account_signing_keys( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Snapshot: ... - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged[Snapshot]: ... - - @distributed_trace - def list_by_resource_group( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncItemPaged[Snapshot]: ... + ) -> AsyncLROPoller[None]: ... @overload - async def update_tags( + async def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: TagsObject, + request_payload: RunCommandRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[RunCommandResult]: ... @overload - async def update_tags( + async def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: TagsObject, + request_payload: RunCommandRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... + ) -> AsyncLROPoller[RunCommandResult]: ... @overload - async def update_tags( + async def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: IO[bytes], + request_payload: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> Snapshot: ... - + ) -> AsyncLROPoller[RunCommandResult]: ... - class azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations: + @distributed_trace_async + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... - def __init__( + @distributed_trace_async + async def begin_stop( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... @overload - async def begin_create_or_update( + async def begin_update_tags( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: TrustedAccessRoleBinding, + parameters: TagsObject, *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + ) -> AsyncLROPoller[ManagedCluster]: ... @overload - async def begin_create_or_update( + async def begin_update_tags( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: TrustedAccessRoleBinding, + parameters: TagsObject, *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + ) -> AsyncLROPoller[ManagedCluster]: ... @overload - async def begin_create_or_update( + async def begin_update_tags( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: IO[bytes], + parameters: IO[bytes], *, content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + ) -> AsyncLROPoller[ManagedCluster]: ... @distributed_trace_async - async def begin_delete( + async def get( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: ... + ) -> ManagedCluster: ... @distributed_trace_async - async def get( + async def get_access_profile( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, + role_name: str, **kwargs: Any - ) -> TrustedAccessRoleBinding: ... + ) -> ManagedClusterAccessProfile: ... - @distributed_trace - def list( + @distributed_trace_async + async def get_command_result( self, resource_group_name: str, resource_name: str, + command_id: str, **kwargs: Any - ) -> AsyncItemPaged[TrustedAccessRoleBinding]: ... + ) -> Optional[RunCommandResult]: ... + @distributed_trace_async + async def get_guardrails_versions( + self, + location: str, + version: str, + **kwargs: Any + ) -> GuardrailsAvailableVersion: ... - class azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations: + @distributed_trace_async + async def get_mesh_revision_profile( + self, + location: str, + mode: str, + **kwargs: Any + ) -> MeshRevisionProfile: ... - def __init__( + @distributed_trace_async + async def get_mesh_upgrade_profile( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + resource_name: str, + mode: str, + **kwargs: Any + ) -> MeshUpgradeProfile: ... - @distributed_trace - def list( + @distributed_trace_async + async def get_safeguards_versions( self, location: str, + version: str, **kwargs: Any - ) -> AsyncItemPaged[TrustedAccessRole]: ... + ) -> SafeguardsAvailableVersion: ... + @distributed_trace_async + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ManagedClusterUpgradeProfile: ... -namespace azure.mgmt.containerservice.models + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[ManagedCluster]: ... - class azure.mgmt.containerservice.models.AbsoluteMonthlySchedule(_Model): - day_of_month: int - interval_months: int + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ManagedCluster]: ... - @overload - def __init__( + @distributed_trace_async + async def list_cluster_admin_credentials( self, + resource_group_name: str, + resource_name: str, *, - day_of_month: int, - interval_months: int - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.AccelerationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BPF_VETH = "BpfVeth" - NONE = "None" - - - class azure.mgmt.containerservice.models.AccessProfile(_Model): - kube_config: Optional[bytes] + server_fqdn: Optional[str] = ..., + **kwargs: Any + ) -> CredentialResults: ... - @overload - def __init__( + @distributed_trace_async + async def list_cluster_monitoring_user_credentials( self, + resource_group_name: str, + resource_name: str, *, - kube_config: Optional[bytes] = ... - ) -> None: ... + server_fqdn: Optional[str] = ..., + **kwargs: Any + ) -> CredentialResults: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.AdoptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALWAYS = "Always" - IF_IDENTICAL = "IfIdentical" - NEVER = "Never" + @distributed_trace_async + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + *, + format: Optional[Union[str, Format]] = ..., + server_fqdn: Optional[str] = ..., + **kwargs: Any + ) -> CredentialResults: ... + @distributed_trace + def list_guardrails_versions( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[GuardrailsAvailableVersion]: ... - class azure.mgmt.containerservice.models.AdvancedNetworkPolicies(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FQDN = "FQDN" - L7 = "L7" - NONE = "None" + @distributed_trace_async + async def list_kubernetes_versions( + self, + location: str, + **kwargs: Any + ) -> KubernetesVersionListResult: ... + @distributed_trace + def list_mesh_revision_profiles( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[MeshRevisionProfile]: ... - class azure.mgmt.containerservice.models.AdvancedNetworking(_Model): - enabled: Optional[bool] - observability: Optional[AdvancedNetworkingObservability] - performance: Optional[AdvancedNetworkingPerformance] - security: Optional[AdvancedNetworkingSecurity] + @distributed_trace + def list_mesh_upgrade_profiles( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[MeshUpgradeProfile]: ... - @overload - def __init__( + @distributed_trace + def list_outbound_network_dependencies_endpoints( self, - *, - enabled: Optional[bool] = ..., - observability: Optional[AdvancedNetworkingObservability] = ..., - performance: Optional[AdvancedNetworkingPerformance] = ..., - security: Optional[AdvancedNetworkingSecurity] = ... - ) -> None: ... + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[OutboundEnvironmentEndpoint]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def list_safeguards_versions( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[SafeguardsAvailableVersion]: ... - class azure.mgmt.containerservice.models.AdvancedNetworkingObservability(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations: - @overload def __init__( self, - *, - enabled: Optional[bool] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.AdvancedNetworkingPerformance(_Model): - acceleration_mode: Optional[Union[str, AccelerationMode]] - - @overload - def __init__( + async def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: ManagedNamespace, *, - acceleration_mode: Optional[Union[str, AccelerationMode]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.AdvancedNetworkingSecurity(_Model): - advanced_network_policies: Optional[Union[str, AdvancedNetworkPolicies]] - enabled: Optional[bool] - transit_encryption: Optional[AdvancedNetworkingSecurityTransitEncryption] + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedNamespace]: ... @overload - def __init__( + async def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: ManagedNamespace, *, - advanced_network_policies: Optional[Union[str, AdvancedNetworkPolicies]] = ..., - enabled: Optional[bool] = ..., - transit_encryption: Optional[AdvancedNetworkingSecurityTransitEncryption] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.AdvancedNetworkingSecurityTransitEncryption(_Model): - type: Optional[Union[str, TransitEncryptionType]] + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedNamespace]: ... @overload - def __init__( + async def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], *, - type: Optional[Union[str, TransitEncryptionType]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ManagedNamespace]: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + @distributed_trace_async + async def get( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + **kwargs: Any + ) -> ManagedNamespace: ... - class azure.mgmt.containerservice.models.AgentPool(ProxyResource): - id: str - name: str - properties: Optional[AgentPoolManagedClusterAgentPoolProfileProperties] - system_data: SystemData - type: str + @distributed_trace + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ManagedNamespace]: ... - def __getattr__(self, name: str) -> Any: ... + @distributed_trace_async + async def list_credential( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + **kwargs: Any + ) -> CredentialResults: ... @overload - def __init__( + async def update( self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: TagsObject, *, - properties: Optional[AgentPoolManagedClusterAgentPoolProfileProperties] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedNamespace: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + async def update( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile(_Model): - enabled: Optional[bool] + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedNamespace: ... @overload - def __init__( + async def update( self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], *, - enabled: Optional[bool] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedNamespace: ... - class azure.mgmt.containerservice.models.AgentPoolAvailableVersions(_Model): - id: Optional[str] - name: Optional[str] - properties: AgentPoolAvailableVersionsProperties - type: Optional[str] - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations: - @overload def __init__( self, - *, - properties: AgentPoolAvailableVersionsProperties + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + async def begin_create_or_update( self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.containerservice.models.AgentPoolAvailableVersionsProperties(_Model): - agent_pool_versions: Optional[list[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]] + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: MeshMembership, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[MeshMembership]: ... @overload - def __init__( + async def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: MeshMembership, *, - agent_pool_versions: Optional[list[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[MeshMembership]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[MeshMembership]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'mesh_membership_name']}, api_versions_list=['2026-06-02-preview']) + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'mesh_membership_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + **kwargs: Any + ) -> MeshMembership: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[MeshMembership]: ... + + + class azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'operation_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get( + self, + resource_group_name: str, + resource_name: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace_async + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name', 'operation_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + async def get_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[OperationStatusResult]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name', 'active_only', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + active_only: Optional[bool] = ..., + **kwargs: Any + ) -> AsyncItemPaged[OperationStatusResult]: ... + + + class azure.mgmt.containerservice.aio.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[OperationValue]: ... + + + class azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> PrivateEndpointConnectionListResult: ... + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateEndpointConnection: ... + + + class azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> PrivateLinkResourcesListResult: ... + + + class azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateLinkResource: ... + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: PrivateLinkResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateLinkResource: ... + + @overload + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PrivateLinkResource: ... + + + class azure.mgmt.containerservice.aio.operations.SnapshotsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> Snapshot: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[Snapshot]: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncItemPaged[Snapshot]: ... + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> Snapshot: ... + + + class azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[TrustedAccessRoleBinding]: ... + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + **kwargs: Any + ) -> TrustedAccessRoleBinding: ... + + @distributed_trace + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncItemPaged[TrustedAccessRoleBinding]: ... + + + class azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncItemPaged[TrustedAccessRole]: ... + + + class azure.mgmt.containerservice.aio.operations.VmSkusOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list( + self, + location: str, + *, + include_extended_locations: Optional[bool] = ..., + **kwargs: Any + ) -> AsyncItemPaged[ResourceSku]: ... + + +namespace azure.mgmt.containerservice.models + + class azure.mgmt.containerservice.models.AbsoluteMonthlySchedule(_Model): + day_of_month: int + interval_months: int + + @overload + def __init__( + self, + *, + day_of_month: int, + interval_months: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AccelerationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BPF_VETH = "BpfVeth" + NONE = "None" + + + class azure.mgmt.containerservice.models.AccessProfile(_Model): + kube_config: Optional[bytes] + + @overload + def __init__( + self, + *, + kube_config: Optional[bytes] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AddonAutoscaling(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.containerservice.models.AdoptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALWAYS = "Always" + IF_IDENTICAL = "IfIdentical" + NEVER = "Never" + + + class azure.mgmt.containerservice.models.AdvancedNetworkPolicies(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FQDN = "FQDN" + L7 = "L7" + NONE = "None" + + + class azure.mgmt.containerservice.models.AdvancedNetworking(_Model): + enabled: Optional[bool] + observability: Optional[AdvancedNetworkingObservability] + performance: Optional[AdvancedNetworkingPerformance] + security: Optional[AdvancedNetworkingSecurity] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + observability: Optional[AdvancedNetworkingObservability] = ..., + performance: Optional[AdvancedNetworkingPerformance] = ..., + security: Optional[AdvancedNetworkingSecurity] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AdvancedNetworkingObservability(_Model): + enabled: Optional[bool] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AdvancedNetworkingPerformance(_Model): + acceleration_mode: Optional[Union[str, AccelerationMode]] + + @overload + def __init__( + self, + *, + acceleration_mode: Optional[Union[str, AccelerationMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AdvancedNetworkingSecurity(_Model): + advanced_network_policies: Optional[Union[str, AdvancedNetworkPolicies]] + enabled: Optional[bool] + transit_encryption: Optional[AdvancedNetworkingSecurityTransitEncryption] + + @overload + def __init__( + self, + *, + advanced_network_policies: Optional[Union[str, AdvancedNetworkPolicies]] = ..., + enabled: Optional[bool] = ..., + transit_encryption: Optional[AdvancedNetworkingSecurityTransitEncryption] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AdvancedNetworkingSecurityTransitEncryption(_Model): + type: Optional[Union[str, TransitEncryptionType]] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, TransitEncryptionType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPool(ProxyResource): + id: str + name: str + properties: Optional[AgentPoolManagedClusterAgentPoolProfileProperties] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: Optional[AgentPoolManagedClusterAgentPoolProfileProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile(_Model): + enabled: Optional[bool] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolAvailableVersions(_Model): + id: Optional[str] + name: Optional[str] + properties: AgentPoolAvailableVersionsProperties + type: Optional[str] + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: AgentPoolAvailableVersionsProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolAvailableVersionsProperties(_Model): + agent_pool_versions: Optional[list[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]] + + @overload + def __init__( + self, + *, + agent_pool_versions: Optional[list[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(_Model): + default: Optional[bool] + is_preview: Optional[bool] + kubernetes_version: Optional[str] + + @overload + def __init__( + self, + *, + default: Optional[bool] = ..., + is_preview: Optional[bool] = ..., + kubernetes_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings(_Model): + batch_soak_duration_in_minutes: Optional[int] + drain_batch_size: Optional[str] + drain_timeout_in_minutes: Optional[int] + final_soak_duration_in_minutes: Optional[int] + + @overload + def __init__( + self, + *, + batch_soak_duration_in_minutes: Optional[int] = ..., + drain_batch_size: Optional[str] = ..., + drain_timeout_in_minutes: Optional[int] = ..., + final_soak_duration_in_minutes: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter(_Model): + machine_names: list[str] + + @overload + def __init__( + self, + *, + machine_names: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolGatewayProfile(_Model): + public_ip_prefix_size: Optional[int] + + @overload + def __init__( + self, + *, + public_ip_prefix_size: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolManagedClusterAgentPoolProfileProperties(_Model): + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] + availability_zones: Optional[list[str]] + capacity_reservation_group_id: Optional[str] + count: Optional[int] + creation_data: Optional[CreationData] + current_orchestrator_version: Optional[str] + e_tag: Optional[str] + enable_auto_scaling: Optional[bool] + enable_encryption_at_host: Optional[bool] + enable_fips: Optional[bool] + enable_node_public_ip: Optional[bool] + enable_os_disk_full_caching: Optional[bool] + enable_ultra_ssd: Optional[bool] + gateway_profile: Optional[AgentPoolGatewayProfile] + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] + gpu_profile: Optional[GPUProfile] + host_group_id: Optional[str] + kubelet_config: Optional[KubeletConfig] + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] + linux_os_config: Optional[LinuxOSConfig] + local_dns_profile: Optional[LocalDNSProfile] + max_count: Optional[int] + max_pods: Optional[int] + message_of_the_day: Optional[str] + min_count: Optional[int] + mode: Optional[Union[str, AgentPoolMode]] + network_profile: Optional[AgentPoolNetworkProfile] + node_image_version: Optional[str] + node_initialization_taints: Optional[list[str]] + node_labels: Optional[dict[str, str]] + node_public_ip_prefix_id: Optional[str] + node_taints: Optional[list[str]] + orchestrator_version: Optional[str] + os_disk_size_gb: Optional[int] + os_disk_type: Optional[Union[str, OSDiskType]] + os_sku: Optional[Union[str, _models.OSSKU]] + os_type: Optional[Union[str, OSType]] + pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] + pod_subnet_id: Optional[str] + power_state: Optional[PowerState] + prepared_image_specification_profile: Optional[PreparedImageSpecificationProfile] + provisioning_state: Optional[str] + proximity_placement_group_id: Optional[str] + scale_down_mode: Optional[Union[str, ScaleDownMode]] + scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] + scale_set_priority: Optional[Union[str, ScaleSetPriority]] + security_profile: Optional[AgentPoolSecurityProfile] + spot_max_price: Optional[float] + status: Optional[AgentPoolStatus] + tags: Optional[dict[str, str]] + type_properties_type: Optional[Union[str, AgentPoolType]] + upgrade_settings: Optional[AgentPoolUpgradeSettings] + upgrade_settings_blue_green: Optional[AgentPoolBlueGreenUpgradeSettings] + upgrade_strategy: Optional[Union[str, UpgradeStrategy]] + virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] + virtual_machines_profile: Optional[VirtualMachinesProfile] + vm_size: Optional[str] + vnet_subnet_id: Optional[str] + windows_profile: Optional[AgentPoolWindowsProfile] + workload_runtime: Optional[Union[str, WorkloadRuntime]] + + @overload + def __init__( + self, + *, + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., + availability_zones: Optional[list[str]] = ..., + capacity_reservation_group_id: Optional[str] = ..., + count: Optional[int] = ..., + creation_data: Optional[CreationData] = ..., + enable_auto_scaling: Optional[bool] = ..., + enable_encryption_at_host: Optional[bool] = ..., + enable_fips: Optional[bool] = ..., + enable_node_public_ip: Optional[bool] = ..., + enable_os_disk_full_caching: Optional[bool] = ..., + enable_ultra_ssd: Optional[bool] = ..., + gateway_profile: Optional[AgentPoolGatewayProfile] = ..., + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., + gpu_profile: Optional[GPUProfile] = ..., + host_group_id: Optional[str] = ..., + kubelet_config: Optional[KubeletConfig] = ..., + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., + linux_os_config: Optional[LinuxOSConfig] = ..., + local_dns_profile: Optional[LocalDNSProfile] = ..., + max_count: Optional[int] = ..., + max_pods: Optional[int] = ..., + message_of_the_day: Optional[str] = ..., + min_count: Optional[int] = ..., + mode: Optional[Union[str, AgentPoolMode]] = ..., + network_profile: Optional[AgentPoolNetworkProfile] = ..., + node_image_version: Optional[str] = ..., + node_initialization_taints: Optional[list[str]] = ..., + node_labels: Optional[dict[str, str]] = ..., + node_public_ip_prefix_id: Optional[str] = ..., + node_taints: Optional[list[str]] = ..., + orchestrator_version: Optional[str] = ..., + os_disk_size_gb: Optional[int] = ..., + os_disk_type: Optional[Union[str, OSDiskType]] = ..., + os_sku: Optional[Union[str, _models.OSSKU]] = ..., + os_type: Optional[Union[str, OSType]] = ..., + pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., + pod_subnet_id: Optional[str] = ..., + power_state: Optional[PowerState] = ..., + prepared_image_specification_profile: Optional[PreparedImageSpecificationProfile] = ..., + proximity_placement_group_id: Optional[str] = ..., + scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., + scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., + scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., + security_profile: Optional[AgentPoolSecurityProfile] = ..., + spot_max_price: Optional[float] = ..., + status: Optional[AgentPoolStatus] = ..., + tags: Optional[dict[str, str]] = ..., + type_properties_type: Optional[Union[str, AgentPoolType]] = ..., + upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., + upgrade_settings_blue_green: Optional[AgentPoolBlueGreenUpgradeSettings] = ..., + upgrade_strategy: Optional[Union[str, UpgradeStrategy]] = ..., + virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., + virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., + vm_size: Optional[str] = ..., + vnet_subnet_id: Optional[str] = ..., + windows_profile: Optional[AgentPoolWindowsProfile] = ..., + workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + GATEWAY = "Gateway" + MACHINES = "Machines" + MANAGED_SYSTEM = "ManagedSystem" + SYSTEM = "System" + USER = "User" + + + class azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressConfiguration(_Model): + ip_tags: Optional[list[IPTag]] + public_ip_address_version: Union[str, AgentPoolNICPublicIPAddressVersion] + public_ip_prefix_id: Optional[str] + + @overload + def __init__( + self, + *, + ip_tags: Optional[list[IPTag]] = ..., + public_ip_address_version: Union[str, AgentPoolNICPublicIPAddressVersion], + public_ip_prefix_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + I_PV4 = "IPv4" + + + class azure.mgmt.containerservice.models.AgentPoolNetworkInterface(_Model): + enable_accelerated_networking: Optional[bool] + public_ip_address_configuration: Optional[AgentPoolNICPublicIPAddressConfiguration] + type: Optional[Union[str, AgentPoolNetworkInterfaceType]] + vnet_subnet_id: Optional[str] + + @overload + def __init__( + self, + *, + enable_accelerated_networking: Optional[bool] = ..., + public_ip_address_configuration: Optional[AgentPoolNICPublicIPAddressConfiguration] = ..., + type: Optional[Union[str, AgentPoolNetworkInterfaceType]] = ..., + vnet_subnet_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolNetworkInterfaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DYNAMIC = "Dynamic" + STANDARD = "Standard" + + + class azure.mgmt.containerservice.models.AgentPoolNetworkProfile(_Model): + allowed_host_ports: Optional[list[PortRange]] + application_security_groups: Optional[list[str]] + dranet: Optional[DRANETProfile] + node_public_ip_prefix_i_ds: Optional[list[str]] + node_public_ip_tags: Optional[list[IPTag]] + secondary_network_interfaces: Optional[list[AgentPoolNetworkInterface]] + + @overload + def __init__( + self, + *, + allowed_host_ports: Optional[list[PortRange]] = ..., + application_security_groups: Optional[list[str]] = ..., + dranet: Optional[DRANETProfile] = ..., + node_public_ip_prefix_i_ds: Optional[list[str]] = ..., + node_public_ip_tags: Optional[list[IPTag]] = ..., + secondary_network_interfaces: Optional[list[AgentPoolNetworkInterface]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion(_Model): + node_image_version: Optional[str] + orchestrator_version: Optional[str] + timestamp: Optional[datetime] + + @overload + def __init__( + self, + *, + node_image_version: Optional[str] = ..., + orchestrator_version: Optional[str] = ..., + timestamp: Optional[datetime] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENTRA_ID = "EntraId" + LOCAL_USER = "LocalUser" + + + class azure.mgmt.containerservice.models.AgentPoolSecurityProfile(_Model): + enable_secure_boot: Optional[bool] + enable_vtpm: Optional[bool] + ssh_access: Optional[Union[str, AgentPoolSSHAccess]] + + @overload + def __init__( + self, + *, + enable_secure_boot: Optional[bool] = ..., + enable_vtpm: Optional[bool] = ..., + ssh_access: Optional[Union[str, AgentPoolSSHAccess]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolStatus(_Model): + provisioning_error: Optional[ErrorDetail] + + + class azure.mgmt.containerservice.models.AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AVAILABILITY_SET = "AvailabilitySet" + FLEX_NODES = "FlexNodes" + VIRTUAL_MACHINES = "VirtualMachines" + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + + + class azure.mgmt.containerservice.models.AgentPoolUpdate(_Model): + properties: Optional[AgentPoolUpdateProperties] + + @overload + def __init__( + self, + *, + properties: Optional[AgentPoolUpdateProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpdateManualScaleProfile(_Model): + count: Optional[int] + size: Optional[str] + + @overload + def __init__( + self, + *, + count: Optional[int] = ..., + size: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpdateProperties(_Model): + count: Optional[int] + virtual_machines_profile: Optional[AgentPoolUpdateVirtualMachinesProfile] + + @overload + def __init__( + self, + *, + count: Optional[int] = ..., + virtual_machines_profile: Optional[AgentPoolUpdateVirtualMachinesProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpdateScaleProfile(_Model): + manual: Optional[list[AgentPoolUpdateManualScaleProfile]] + + @overload + def __init__( + self, + *, + manual: Optional[list[AgentPoolUpdateManualScaleProfile]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpdateVirtualMachinesProfile(_Model): + scale: Optional[AgentPoolUpdateScaleProfile] + + @overload + def __init__( + self, + *, + scale: Optional[AgentPoolUpdateScaleProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpgradeProfile(ProxyResource): + id: str + name: str + properties: AgentPoolUpgradeProfileProperties + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... + + @overload + def __init__( + self, + *, + properties: AgentPoolUpgradeProfileProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpgradeProfileProperties(_Model): + components_by_releases: Optional[list[ComponentsByRelease]] + kubernetes_version: str + latest_node_image_version: Optional[str] + os_type: Union[str, OSType] + recently_used_versions: Optional[list[AgentPoolRecentlyUsedVersion]] + upgrades: Optional[list[AgentPoolUpgradeProfilePropertiesUpgradesItem]] + + @overload + def __init__( + self, + *, + components_by_releases: Optional[list[ComponentsByRelease]] = ..., + kubernetes_version: str, + latest_node_image_version: Optional[str] = ..., + os_type: Union[str, OSType], + upgrades: Optional[list[AgentPoolUpgradeProfilePropertiesUpgradesItem]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem(_Model): + is_out_of_support: Optional[bool] + is_preview: Optional[bool] + kubernetes_version: Optional[str] + + @overload + def __init__( + self, + *, + is_out_of_support: Optional[bool] = ..., + is_preview: Optional[bool] = ..., + kubernetes_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolUpgradeSettings(_Model): + drain_timeout_in_minutes: Optional[int] + max_blocked_nodes: Optional[str] + max_surge: Optional[str] + max_unavailable: Optional[str] + node_soak_duration_in_minutes: Optional[int] + undrainable_node_behavior: Optional[Union[str, UndrainableNodeBehavior]] + + @overload + def __init__( + self, + *, + drain_timeout_in_minutes: Optional[int] = ..., + max_blocked_nodes: Optional[str] = ..., + max_surge: Optional[str] = ..., + max_unavailable: Optional[str] = ..., + node_soak_duration_in_minutes: Optional[int] = ..., + undrainable_node_behavior: Optional[Union[str, UndrainableNodeBehavior]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AgentPoolWindowsProfile(_Model): + disable_outbound_nat: Optional[bool] + + @overload + def __init__( + self, + *, + disable_outbound_nat: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AlertConfiguration(ProxyResource): + id: str + name: str + properties: Optional[AlertConfigurationProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[AlertConfigurationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AlertConfigurationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + MANAGED = "Managed" + + + class azure.mgmt.containerservice.models.AlertConfigurationProperties(_Model): + mode: Union[str, AlertConfigurationMode] + notification: AlertNotification + provisioning_state: Optional[Union[str, AlertConfigurationProvisioningState]] + + @overload + def __init__( + self, + *, + mode: Union[str, AlertConfigurationMode], + notification: AlertNotification + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AlertConfigurationProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.containerservice.models.AlertNotification(_Model): + action_group_id: str + + @overload + def __init__( + self, + *, + action_group_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AllowedSubject(_Model): + namespace_selector: LabelSelector + service_account_selector: Optional[LabelSelector] + + @overload + def __init__( + self, + *, + namespace_selector: LabelSelector, + service_account_selector: Optional[LabelSelector] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ArtifactSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CACHE = "Cache" + DIRECT = "Direct" + + + class azure.mgmt.containerservice.models.AutoScaleProfile(_Model): + max_count: Optional[int] + min_count: Optional[int] + size: Optional[str] + + @overload + def __init__( + self, + *, + max_count: Optional[int] = ..., + min_count: Optional[int] = ..., + size: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.AzureKeyVaultKms(_Model): + enabled: Optional[bool] + key_id: Optional[str] + key_vault_network_access: Optional[Union[str, KeyVaultNetworkAccessTypes]] + key_vault_resource_id: Optional[str] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + key_id: Optional[str] = ..., + key_vault_network_access: Optional[Union[str, KeyVaultNetworkAccessTypes]] = ..., + key_vault_resource_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NODE_IP = "NodeIP" + NODE_IP_CONFIGURATION = "NodeIPConfiguration" + POD_IP = "PodIP" + + + class azure.mgmt.containerservice.models.BastionProfile(_Model): + bastion_id: Optional[str] + enabled: Optional[bool] + public_ip_address_id: Optional[str] + scale_units: Optional[int] + sku: Optional[Union[str, BastionSku]] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + public_ip_address_id: Optional[str] = ..., + scale_units: Optional[int] = ..., + sku: Optional[Union[str, BastionSku]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.BastionSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PREMIUM = "Premium" + STANDARD = "Standard" + + + class azure.mgmt.containerservice.models.BootstrapAzureConfig(_Model): + bootstrap_token: Optional[BootstrapTokenInfo] + resource_manager_endpoint: Optional[str] + target_agent_pool_name: Optional[str] + target_cluster: Optional[BootstrapTargetCluster] + + + class azure.mgmt.containerservice.models.BootstrapComponentVersions(_Model): + containerd: Optional[str] + kubernetes: Optional[str] + runc: Optional[str] + + + class azure.mgmt.containerservice.models.BootstrapKubeletConfig(_Model): + ca_cert_data: Optional[str] + cluster_fqdn: Optional[str] + + + class azure.mgmt.containerservice.models.BootstrapNetworkingConfig(_Model): + cni_version: Optional[str] + dns_service_ip: Optional[str] + + + class azure.mgmt.containerservice.models.BootstrapNodeConfig(_Model): + kubelet: Optional[BootstrapKubeletConfig] + labels: Optional[dict[str, str]] + max_pods: Optional[int] + taints: Optional[list[str]] + + + class azure.mgmt.containerservice.models.BootstrapTargetCluster(_Model): + resource_id: Optional[str] + + + class azure.mgmt.containerservice.models.BootstrapTokenInfo(_Model): + token: Optional[str] + + + class azure.mgmt.containerservice.models.CapacityReservation(_Model): + capacity_reservation_group: Optional[CapacityReservationGroup] + + @overload + def __init__( + self, + *, + capacity_reservation_group: Optional[CapacityReservationGroup] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.CapacityReservationGroup(_Model): + id: Optional[str] + + @overload + def __init__( + self, + *, + id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + SERVICE_NODE_PORT = "ServiceNodePort" + SHARED = "Shared" + + + class azure.mgmt.containerservice.models.ClusterUpgradeSettings(_Model): + override_settings: Optional[UpgradeOverrideSettings] + + @overload + def __init__( + self, + *, + override_settings: Optional[UpgradeOverrideSettings] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): + RUNNING = "Running" + STOPPED = "Stopped" + + + class azure.mgmt.containerservice.models.CommandResultProperties(_Model): + exit_code: Optional[int] + finished_at: Optional[datetime] + logs: Optional[str] + provisioning_state: Optional[str] + reason: Optional[str] + started_at: Optional[datetime] + + + class azure.mgmt.containerservice.models.CompatibleVersions(_Model): + name: Optional[str] + versions: Optional[list[str]] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + versions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.Component(_Model): + has_breaking_changes: Optional[bool] + name: Optional[str] + version: Optional[str] + + @overload + def __init__( + self, + *, + has_breaking_changes: Optional[bool] = ..., + name: Optional[str] = ..., + version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ComponentsByRelease(_Model): + components: Optional[list[Component]] + kubernetes_version: Optional[str] + + @overload + def __init__( + self, + *, + components: Optional[list[Component]] = ..., + kubernetes_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPROVED = "Approved" + DISCONNECTED = "Disconnected" + PENDING = "Pending" + REJECTED = "Rejected" + + + class azure.mgmt.containerservice.models.ContainerNetworkLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.containerservice.models.ContainerServiceLinuxProfile(_Model): + admin_username: str + ssh: ContainerServiceSshConfiguration + + @overload + def __init__( + self, + *, + admin_username: str, + ssh: ContainerServiceSshConfiguration + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ContainerServiceNetworkProfile(_Model): + advanced_networking: Optional[AdvancedNetworking] + bastion_profile: Optional[BastionProfile] + dns_service_ip: Optional[str] + ip_families: Optional[list[Union[str, IPFamily]]] + kube_proxy_config: Optional[ContainerServiceNetworkProfileKubeProxyConfig] + load_balancer_profile: Optional[ManagedClusterLoadBalancerProfile] + load_balancer_sku: Optional[Union[str, LoadBalancerSku]] + nat_gateway_id: Optional[str] + nat_gateway_profile: Optional[ManagedClusterNATGatewayProfile] + network_dataplane: Optional[Union[str, NetworkDataplane]] + network_mode: Optional[Union[str, NetworkMode]] + network_plugin: Optional[Union[str, NetworkPlugin]] + network_plugin_mode: Optional[Union[str, NetworkPluginMode]] + network_policy: Optional[Union[str, NetworkPolicy]] + outbound_type: Optional[Union[str, OutboundType]] + pod_cidr: Optional[str] + pod_cidrs: Optional[list[str]] + pod_link_local_access: Optional[Union[str, PodLinkLocalAccess]] + service_cidr: Optional[str] + service_cidrs: Optional[list[str]] + static_egress_gateway_profile: Optional[ManagedClusterStaticEgressGatewayProfile] + + @overload + def __init__( + self, + *, + advanced_networking: Optional[AdvancedNetworking] = ..., + bastion_profile: Optional[BastionProfile] = ..., + dns_service_ip: Optional[str] = ..., + ip_families: Optional[list[Union[str, IPFamily]]] = ..., + kube_proxy_config: Optional[ContainerServiceNetworkProfileKubeProxyConfig] = ..., + load_balancer_profile: Optional[ManagedClusterLoadBalancerProfile] = ..., + load_balancer_sku: Optional[Union[str, LoadBalancerSku]] = ..., + nat_gateway_id: Optional[str] = ..., + nat_gateway_profile: Optional[ManagedClusterNATGatewayProfile] = ..., + network_dataplane: Optional[Union[str, NetworkDataplane]] = ..., + network_mode: Optional[Union[str, NetworkMode]] = ..., + network_plugin: Optional[Union[str, NetworkPlugin]] = ..., + network_plugin_mode: Optional[Union[str, NetworkPluginMode]] = ..., + network_policy: Optional[Union[str, NetworkPolicy]] = ..., + outbound_type: Optional[Union[str, OutboundType]] = ..., + pod_cidr: Optional[str] = ..., + pod_cidrs: Optional[list[str]] = ..., + pod_link_local_access: Optional[Union[str, PodLinkLocalAccess]] = ..., + service_cidr: Optional[str] = ..., + service_cidrs: Optional[list[str]] = ..., + static_egress_gateway_profile: Optional[ManagedClusterStaticEgressGatewayProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig(_Model): + enabled: Optional[bool] + ipvs_config: Optional[ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig] + mode: Optional[Union[str, Mode]] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + ipvs_config: Optional[ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig] = ..., + mode: Optional[Union[str, Mode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(_Model): + scheduler: Optional[Union[str, IpvsScheduler]] + tcp_fin_timeout_seconds: Optional[int] + tcp_timeout_seconds: Optional[int] + udp_timeout_seconds: Optional[int] + + @overload + def __init__( + self, + *, + scheduler: Optional[Union[str, IpvsScheduler]] = ..., + tcp_fin_timeout_seconds: Optional[int] = ..., + tcp_timeout_seconds: Optional[int] = ..., + udp_timeout_seconds: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ContainerServiceSshConfiguration(_Model): + public_keys: list[ContainerServiceSshPublicKey] + + @overload + def __init__( + self, + *, + public_keys: list[ContainerServiceSshPublicKey] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ContainerServiceSshPublicKey(_Model): + key_data: str + + @overload + def __init__( + self, + *, + key_data: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ControlPlaneScalingSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): + H2 = "H2" + H4 = "H4" + H8 = "H8" + + + class azure.mgmt.containerservice.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPLICATION = "Application" + KEY = "Key" + MANAGED_IDENTITY = "ManagedIdentity" + USER = "User" + + + class azure.mgmt.containerservice.models.CreationData(_Model): + source_resource_id: Optional[str] + + @overload + def __init__( + self, + *, + source_resource_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.CredentialResult(_Model): + name: Optional[str] + value: Optional[bytes] + + + class azure.mgmt.containerservice.models.CredentialResults(_Model): + kubeconfigs: Optional[list[CredentialResult]] + + + class azure.mgmt.containerservice.models.DRANETMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MANAGED = "Managed" + UNMANAGED = "Unmanaged" + + + class azure.mgmt.containerservice.models.DRANETProfile(_Model): + mode: Optional[Union[str, DRANETMode]] + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, DRANETMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.DailySchedule(_Model): + interval_days: int + + @overload + def __init__( + self, + *, + interval_days: int + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.DateSpan(_Model): + end: date + start: date + + @overload + def __init__( + self, + *, + end: date, + start: date + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.DelegatedResource(_Model): + location: Optional[str] + referral_resource: Optional[str] + resource_id: Optional[str] + tenant_id: Optional[str] + + @overload + def __init__( + self, + *, + location: Optional[str] = ..., + referral_resource: Optional[str] = ..., + resource_id: Optional[str] = ..., + tenant_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.DeletePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETE = "Delete" + KEEP = "Keep" + + + class azure.mgmt.containerservice.models.DriftAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + RECREATE = "Recreate" + SYNCED = "Synced" + + + class azure.mgmt.containerservice.models.DriverType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CUDA = "CUDA" + GRID = "GRID" + + + class azure.mgmt.containerservice.models.EndpointDependency(_Model): + domain_name: Optional[str] + endpoint_details: Optional[list[EndpointDetail]] + + @overload + def __init__( + self, + *, + domain_name: Optional[str] = ..., + endpoint_details: Optional[list[EndpointDetail]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.EndpointDetail(_Model): + description: Optional[str] + ip_address: Optional[str] + port: Optional[int] + protocol: Optional[str] + + @overload + def __init__( + self, + *, + description: Optional[str] = ..., + ip_address: Optional[str] = ..., + port: Optional[int] = ..., + protocol: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ErrorAdditionalInfo(_Model): + info: Optional[Any] + type: Optional[str] + + + class azure.mgmt.containerservice.models.ErrorDetail(_Model): + additional_info: Optional[list[ErrorAdditionalInfo]] + code: Optional[str] + details: Optional[list[ErrorDetail]] + message: Optional[str] + target: Optional[str] + + + class azure.mgmt.containerservice.models.ErrorResponse(_Model): + error: Optional[ErrorDetail] + + @overload + def __init__( + self, + *, + error: Optional[ErrorDetail] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + PRIORITY = "priority" + RANDOM = "random" + + + class azure.mgmt.containerservice.models.ExtendedLocation(_Model): + name: Optional[str] + type: Optional[Union[str, ExtendedLocationTypes]] + + @overload + def __init__( + self, + *, + name: Optional[str] = ..., + type: Optional[Union[str, ExtendedLocationTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EDGE_ZONE = "EdgeZone" + + + class azure.mgmt.containerservice.models.Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE = "azure" + EXEC = "exec" + + + class azure.mgmt.containerservice.models.GPUDriver(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INSTALL = "Install" + NONE = "None" + + + class azure.mgmt.containerservice.models.GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + + + class azure.mgmt.containerservice.models.GPUProfile(_Model): + driver: Optional[Union[str, GPUDriver]] + driver_type: Optional[Union[str, DriverType]] + nvidia: Optional[NvidiaGPUProfile] + + @overload + def __init__( + self, + *, + driver: Optional[Union[str, GPUDriver]] = ..., + driver_type: Optional[Union[str, DriverType]] = ..., + nvidia: Optional[NvidiaGPUProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.GatewayAPIIstioEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.containerservice.models.GuardrailsAvailableVersion(ProxyResource): + id: str + name: str + properties: GuardrailsAvailableVersionsProperties + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: GuardrailsAvailableVersionsProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties(_Model): + is_default_version: Optional[bool] + support: Optional[Union[str, GuardrailsSupport]] + + + class azure.mgmt.containerservice.models.GuardrailsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PREVIEW = "Preview" + STABLE = "Stable" + + + class azure.mgmt.containerservice.models.HardEvictionThreshold(_Model): + memory_available: Optional[str] + node_fs_available: Optional[str] + node_fs_inodes_free: Optional[str] + + @overload + def __init__( + self, + *, + memory_available: Optional[str] = ..., + node_fs_available: Optional[str] = ..., + node_fs_inodes_free: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + I_PV4 = "IPv4" + I_PV6 = "IPv6" + + + class azure.mgmt.containerservice.models.IPTag(_Model): + ip_tag_type: Optional[str] + tag: Optional[str] + + @overload + def __init__( + self, + *, + ip_tag_type: Optional[str] = ..., + tag: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IdentityBinding(ProxyResource): + e_tag: Optional[str] + id: str + name: str + properties: Optional[IdentityBindingProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[IdentityBindingProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile(_Model): + client_id: Optional[str] + object_id: Optional[str] + resource_id: str + tenant_id: Optional[str] + + @overload + def __init__( + self, + *, + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile(_Model): + oidc_issuer_url: Optional[str] + + + class azure.mgmt.containerservice.models.IdentityBindingProperties(_Model): + allowed_subjects: Optional[list[AllowedSubject]] + managed_identity: IdentityBindingManagedIdentityProfile + oidc_issuer: Optional[IdentityBindingOidcIssuerProfile] + provisioning_state: Optional[Union[str, IdentityBindingProvisioningState]] + + @overload + def __init__( + self, + *, + allowed_subjects: Optional[list[AllowedSubject]] = ..., + managed_identity: IdentityBindingManagedIdentityProfile + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IdentityBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.containerservice.models.InfrastructureEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + + + class azure.mgmt.containerservice.models.IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LEAST_CONNECTION = "LeastConnection" + ROUND_ROBIN = "RoundRobin" + + + class azure.mgmt.containerservice.models.IstioCertificateAuthority(_Model): + plugin: Optional[IstioPluginCertificateAuthority] + + @overload + def __init__( + self, + *, + plugin: Optional[IstioPluginCertificateAuthority] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IstioComponents(_Model): + egress_gateways: Optional[list[IstioEgressGateway]] + ingress_gateways: Optional[list[IstioIngressGateway]] + proxy_redirection_mechanism: Optional[Union[str, ProxyRedirectionMechanism]] + + @overload + def __init__( + self, + *, + egress_gateways: Optional[list[IstioEgressGateway]] = ..., + ingress_gateways: Optional[list[IstioIngressGateway]] = ..., + proxy_redirection_mechanism: Optional[Union[str, ProxyRedirectionMechanism]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IstioEgressGateway(_Model): + enabled: bool + gateway_configuration_name: Optional[str] + name: str + namespace: Optional[str] + + @overload + def __init__( + self, + *, + enabled: bool, + gateway_configuration_name: Optional[str] = ..., + name: str, + namespace: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IstioIngressGateway(_Model): + enabled: bool + mode: Union[str, IstioIngressGatewayMode] + + @overload + def __init__( + self, + *, + enabled: bool, + mode: Union[str, IstioIngressGatewayMode] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EXTERNAL = "External" + INTERNAL = "Internal" + + + class azure.mgmt.containerservice.models.IstioPluginCertificateAuthority(_Model): + cert_chain_object_name: Optional[str] + cert_object_name: Optional[str] + key_object_name: Optional[str] + key_vault_id: Optional[str] + root_cert_object_name: Optional[str] + + @overload + def __init__( + self, + *, + cert_chain_object_name: Optional[str] = ..., + cert_object_name: Optional[str] = ..., + key_object_name: Optional[str] = ..., + key_vault_id: Optional[str] = ..., + root_cert_object_name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.IstioServiceMesh(_Model): + certificate_authority: Optional[IstioCertificateAuthority] + components: Optional[IstioComponents] + revisions: Optional[list[str]] + + @overload + def __init__( + self, + *, + certificate_authority: Optional[IstioCertificateAuthority] = ..., + components: Optional[IstioComponents] = ..., + revisions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticator(ProxyResource): + id: str + name: str + properties: JWTAuthenticatorProperties + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: JWTAuthenticatorProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression(_Model): + expression: str + + @overload + def __init__( + self, + *, + expression: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings(_Model): + extra: Optional[list[JWTAuthenticatorExtraClaimMappingExpression]] + groups: Optional[JWTAuthenticatorClaimMappingExpression] + uid: Optional[JWTAuthenticatorClaimMappingExpression] + username: JWTAuthenticatorClaimMappingExpression + + @overload + def __init__( + self, + *, + extra: Optional[list[JWTAuthenticatorExtraClaimMappingExpression]] = ..., + groups: Optional[JWTAuthenticatorClaimMappingExpression] = ..., + uid: Optional[JWTAuthenticatorClaimMappingExpression] = ..., + username: JWTAuthenticatorClaimMappingExpression + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression(_Model): + key: str + value_expression: str + + @overload + def __init__( + self, + *, + key: str, + value_expression: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorIssuer(_Model): + audiences: list[str] + url: str + + @overload + def __init__( + self, + *, + audiences: list[str], + url: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorProperties(_Model): + certificate_authority_bundle: Optional[str] + claim_mappings: JWTAuthenticatorClaimMappings + claim_validation_rules: Optional[list[JWTAuthenticatorValidationRule]] + issuer: JWTAuthenticatorIssuer + provisioning_state: Optional[Union[str, JWTAuthenticatorProvisioningState]] + user_validation_rules: Optional[list[JWTAuthenticatorValidationRule]] + + @overload + def __init__( + self, + *, + certificate_authority_bundle: Optional[str] = ..., + claim_mappings: JWTAuthenticatorClaimMappings, + claim_validation_rules: Optional[list[JWTAuthenticatorValidationRule]] = ..., + issuer: JWTAuthenticatorIssuer, + user_validation_rules: Optional[list[JWTAuthenticatorValidationRule]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule(_Model): + expression: str + message: Optional[str] + + @overload + def __init__( + self, + *, + expression: str, + message: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PRIVATE = "Private" + PUBLIC = "Public" + + + class azure.mgmt.containerservice.models.KubeReserved(_Model): + cpu_millicores: Optional[int] + memory_mb: Optional[int] + + @overload + def __init__( + self, + *, + cpu_millicores: Optional[int] = ..., + memory_mb: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KubeletConfig(_Model): + allowed_unsafe_sysctls: Optional[list[str]] + container_log_max_files: Optional[int] + container_log_max_size_mb: Optional[int] + cpu_cfs_quota: Optional[bool] + cpu_cfs_quota_period: Optional[str] + cpu_manager_policy: Optional[str] + eviction_max_pod_grace_period_in_seconds: Optional[int] + fail_swap_on: Optional[bool] + hard_eviction_threshold: Optional[HardEvictionThreshold] + image_gc_high_threshold: Optional[int] + image_gc_low_threshold: Optional[int] + kube_reserved: Optional[KubeReserved] + pod_max_pids: Optional[int] + seccomp_default: Optional[Union[str, SeccompDefault]] + soft_eviction_grace_period: Optional[SoftEvictionGracePeriod] + soft_eviction_threshold: Optional[SoftEvictionThreshold] + topology_manager_policy: Optional[str] + + @overload + def __init__( + self, + *, + allowed_unsafe_sysctls: Optional[list[str]] = ..., + container_log_max_files: Optional[int] = ..., + container_log_max_size_mb: Optional[int] = ..., + cpu_cfs_quota: Optional[bool] = ..., + cpu_cfs_quota_period: Optional[str] = ..., + cpu_manager_policy: Optional[str] = ..., + eviction_max_pod_grace_period_in_seconds: Optional[int] = ..., + fail_swap_on: Optional[bool] = ..., + hard_eviction_threshold: Optional[HardEvictionThreshold] = ..., + image_gc_high_threshold: Optional[int] = ..., + image_gc_low_threshold: Optional[int] = ..., + kube_reserved: Optional[KubeReserved] = ..., + pod_max_pids: Optional[int] = ..., + seccomp_default: Optional[Union[str, SeccompDefault]] = ..., + soft_eviction_grace_period: Optional[SoftEvictionGracePeriod] = ..., + soft_eviction_threshold: Optional[SoftEvictionThreshold] = ..., + topology_manager_policy: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OS = "OS" + TEMPORARY = "Temporary" + + + class azure.mgmt.containerservice.models.KubernetesPatchVersion(_Model): + upgrades: Optional[list[str]] + + @overload + def __init__( + self, + *, + upgrades: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile(_Model): + infrastructure_encryption: Optional[Union[str, InfrastructureEncryption]] + + @overload + def __init__( + self, + *, + infrastructure_encryption: Optional[Union[str, InfrastructureEncryption]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KubernetesSupportPlan(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AKS_LONG_TERM_SUPPORT = "AKSLongTermSupport" + KUBERNETES_OFFICIAL = "KubernetesOfficial" + + + class azure.mgmt.containerservice.models.KubernetesVersion(_Model): + capabilities: Optional[KubernetesVersionCapabilities] + is_default: Optional[bool] + is_preview: Optional[bool] + patch_versions: Optional[dict[str, KubernetesPatchVersion]] + version: Optional[str] + + @overload + def __init__( + self, + *, + capabilities: Optional[KubernetesVersionCapabilities] = ..., + is_default: Optional[bool] = ..., + is_preview: Optional[bool] = ..., + patch_versions: Optional[dict[str, KubernetesPatchVersion]] = ..., + version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.KubernetesVersionCapabilities(_Model): + support_plan: Optional[list[Union[str, KubernetesSupportPlan]]] + + @overload + def __init__( + self, + *, + support_plan: Optional[list[Union[str, KubernetesSupportPlan]]] = ... + ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(_Model): - default: Optional[bool] - is_preview: Optional[bool] - kubernetes_version: Optional[str] + class azure.mgmt.containerservice.models.KubernetesVersionListResult(_Model): + values_property: Optional[list[KubernetesVersion]] @overload def __init__( self, *, - default: Optional[bool] = ..., - is_preview: Optional[bool] = ..., - kubernetes_version: Optional[str] = ... + values_property: Optional[list[KubernetesVersion]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter(_Model): - machine_names: list[str] + class azure.mgmt.containerservice.models.LabelSelector(_Model): + match_expressions: Optional[list[LabelSelectorRequirement]] + match_labels: Optional[list[str]] @overload def __init__( self, *, - machine_names: list[str] + match_expressions: Optional[list[LabelSelectorRequirement]] = ..., + match_labels: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolGatewayProfile(_Model): - public_ip_prefix_size: Optional[int] + class azure.mgmt.containerservice.models.LabelSelectorRequirement(_Model): + key: Optional[str] + operator: Optional[Union[str, Operator]] + values_property: Optional[list[str]] @overload def __init__( self, *, - public_ip_prefix_size: Optional[int] = ... + key: Optional[str] = ..., + operator: Optional[Union[str, Operator]] = ..., + values_property: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolManagedClusterAgentPoolProfileProperties(_Model): - artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] - availability_zones: Optional[list[str]] - capacity_reservation_group_id: Optional[str] - count: Optional[int] - creation_data: Optional[CreationData] - current_orchestrator_version: Optional[str] - e_tag: Optional[str] - enable_auto_scaling: Optional[bool] - enable_encryption_at_host: Optional[bool] - enable_fips: Optional[bool] - enable_node_public_ip: Optional[bool] - enable_ultra_ssd: Optional[bool] - gateway_profile: Optional[AgentPoolGatewayProfile] - gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] - gpu_profile: Optional[GPUProfile] - host_group_id: Optional[str] - kubelet_config: Optional[KubeletConfig] - kubelet_disk_type: Optional[Union[str, KubeletDiskType]] - linux_os_config: Optional[LinuxOSConfig] - local_dns_profile: Optional[LocalDNSProfile] - max_count: Optional[int] - max_pods: Optional[int] - message_of_the_day: Optional[str] - min_count: Optional[int] - mode: Optional[Union[str, AgentPoolMode]] - network_profile: Optional[AgentPoolNetworkProfile] - node_image_version: Optional[str] - node_labels: Optional[dict[str, str]] - node_public_ip_prefix_id: Optional[str] - node_taints: Optional[list[str]] - orchestrator_version: Optional[str] - os_disk_size_gb: Optional[int] - os_disk_type: Optional[Union[str, OSDiskType]] - os_sku: Optional[Union[str, _models.OSSKU]] - os_type: Optional[Union[str, OSType]] - pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] - pod_subnet_id: Optional[str] - power_state: Optional[PowerState] - provisioning_state: Optional[str] - proximity_placement_group_id: Optional[str] - scale_down_mode: Optional[Union[str, ScaleDownMode]] - scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] - scale_set_priority: Optional[Union[str, ScaleSetPriority]] - security_profile: Optional[AgentPoolSecurityProfile] - spot_max_price: Optional[float] - status: Optional[AgentPoolStatus] - tags: Optional[dict[str, str]] - type_properties_type: Optional[Union[str, AgentPoolType]] - upgrade_settings: Optional[AgentPoolUpgradeSettings] - virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] - virtual_machines_profile: Optional[VirtualMachinesProfile] - vm_size: Optional[str] - vnet_subnet_id: Optional[str] - windows_profile: Optional[AgentPoolWindowsProfile] - workload_runtime: Optional[Union[str, WorkloadRuntime]] + class azure.mgmt.containerservice.models.LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + + + class azure.mgmt.containerservice.models.LinuxOSConfig(_Model): + swap_file_size_mb: Optional[int] + sysctls: Optional[SysctlConfig] + transparent_huge_page_defrag: Optional[str] + transparent_huge_page_enabled: Optional[str] @overload def __init__( self, *, - artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., - availability_zones: Optional[list[str]] = ..., - capacity_reservation_group_id: Optional[str] = ..., - count: Optional[int] = ..., - creation_data: Optional[CreationData] = ..., - enable_auto_scaling: Optional[bool] = ..., - enable_encryption_at_host: Optional[bool] = ..., - enable_fips: Optional[bool] = ..., - enable_node_public_ip: Optional[bool] = ..., - enable_ultra_ssd: Optional[bool] = ..., - gateway_profile: Optional[AgentPoolGatewayProfile] = ..., - gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., - gpu_profile: Optional[GPUProfile] = ..., - host_group_id: Optional[str] = ..., - kubelet_config: Optional[KubeletConfig] = ..., - kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., - linux_os_config: Optional[LinuxOSConfig] = ..., - local_dns_profile: Optional[LocalDNSProfile] = ..., - max_count: Optional[int] = ..., - max_pods: Optional[int] = ..., - message_of_the_day: Optional[str] = ..., - min_count: Optional[int] = ..., - mode: Optional[Union[str, AgentPoolMode]] = ..., - network_profile: Optional[AgentPoolNetworkProfile] = ..., - node_image_version: Optional[str] = ..., - node_labels: Optional[dict[str, str]] = ..., - node_public_ip_prefix_id: Optional[str] = ..., - node_taints: Optional[list[str]] = ..., - orchestrator_version: Optional[str] = ..., - os_disk_size_gb: Optional[int] = ..., - os_disk_type: Optional[Union[str, OSDiskType]] = ..., - os_sku: Optional[Union[str, _models.OSSKU]] = ..., - os_type: Optional[Union[str, OSType]] = ..., - pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., - pod_subnet_id: Optional[str] = ..., - power_state: Optional[PowerState] = ..., - proximity_placement_group_id: Optional[str] = ..., - scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., - scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., - scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., - security_profile: Optional[AgentPoolSecurityProfile] = ..., - spot_max_price: Optional[float] = ..., - status: Optional[AgentPoolStatus] = ..., - tags: Optional[dict[str, str]] = ..., - type_properties_type: Optional[Union[str, AgentPoolType]] = ..., - upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., - virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., - virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., - vm_size: Optional[str] = ..., - vnet_subnet_id: Optional[str] = ..., - windows_profile: Optional[AgentPoolWindowsProfile] = ..., - workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... + swap_file_size_mb: Optional[int] = ..., + sysctls: Optional[SysctlConfig] = ..., + transparent_huge_page_defrag: Optional[str] = ..., + transparent_huge_page_enabled: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - GATEWAY = "Gateway" - SYSTEM = "System" - USER = "User" + class azure.mgmt.containerservice.models.ListBootstrapDataRequest(_Model): - class azure.mgmt.containerservice.models.AgentPoolNetworkProfile(_Model): - allowed_host_ports: Optional[list[PortRange]] - application_security_groups: Optional[list[str]] - dranet: Optional[DRANETProfile] - node_public_ip_tags: Optional[list[IPTag]] + class azure.mgmt.containerservice.models.LoadBalancer(ProxyResource): + id: str + name: str + properties: Optional[LoadBalancerProperties] + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - allowed_host_ports: Optional[list[PortRange]] = ..., - application_security_groups: Optional[list[str]] = ..., - dranet: Optional[DRANETProfile] = ..., - node_public_ip_tags: Optional[list[IPTag]] = ... + properties: Optional[LoadBalancerProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion(_Model): - node_image_version: Optional[str] - orchestrator_version: Optional[str] - timestamp: Optional[datetime] + + class azure.mgmt.containerservice.models.LoadBalancerProperties(_Model): + allow_service_placement: Optional[bool] + node_selector: Optional[LabelSelector] + primary_agent_pool_name: str + provisioning_state: Optional[str] + service_label_selector: Optional[LabelSelector] + service_namespace_selector: Optional[LabelSelector] @overload def __init__( self, *, - node_image_version: Optional[str] = ..., - orchestrator_version: Optional[str] = ..., - timestamp: Optional[datetime] = ... + allow_service_placement: Optional[bool] = ..., + node_selector: Optional[LabelSelector] = ..., + primary_agent_pool_name: str, + service_label_selector: Optional[LabelSelector] = ..., + service_namespace_selector: Optional[LabelSelector] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + class azure.mgmt.containerservice.models.LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BASIC = "basic" + SERVICE = "service" + STANDARD = "standard" + + + class azure.mgmt.containerservice.models.LocalDNSForwardDestination(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLUSTER_CORE_DNS = "ClusterCoreDNS" + VNET_DNS = "VnetDNS" + + + class azure.mgmt.containerservice.models.LocalDNSForwardPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + RANDOM = "Random" + ROUND_ROBIN = "RoundRobin" + SEQUENTIAL = "Sequential" + + + class azure.mgmt.containerservice.models.LocalDNSMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" - ENTRA_ID = "EntraId" - LOCAL_USER = "LocalUser" + PREFERRED = "Preferred" + REQUIRED = "Required" - class azure.mgmt.containerservice.models.AgentPoolSecurityProfile(_Model): - enable_secure_boot: Optional[bool] - enable_vtpm: Optional[bool] - ssh_access: Optional[Union[str, AgentPoolSSHAccess]] + class azure.mgmt.containerservice.models.LocalDNSOverride(_Model): + cache_duration_in_seconds: Optional[int] + forward_destination: Optional[Union[str, LocalDNSForwardDestination]] + forward_policy: Optional[Union[str, LocalDNSForwardPolicy]] + max_concurrent: Optional[int] + protocol: Optional[Union[str, LocalDNSProtocol]] + query_logging: Optional[Union[str, LocalDNSQueryLogging]] + serve_stale: Optional[Union[str, LocalDNSServeStale]] + serve_stale_duration_in_seconds: Optional[int] @overload def __init__( self, *, - enable_secure_boot: Optional[bool] = ..., - enable_vtpm: Optional[bool] = ..., - ssh_access: Optional[Union[str, AgentPoolSSHAccess]] = ... + cache_duration_in_seconds: Optional[int] = ..., + forward_destination: Optional[Union[str, LocalDNSForwardDestination]] = ..., + forward_policy: Optional[Union[str, LocalDNSForwardPolicy]] = ..., + max_concurrent: Optional[int] = ..., + protocol: Optional[Union[str, LocalDNSProtocol]] = ..., + query_logging: Optional[Union[str, LocalDNSQueryLogging]] = ..., + serve_stale: Optional[Union[str, LocalDNSServeStale]] = ..., + serve_stale_duration_in_seconds: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.LocalDNSProfile(_Model): + kube_dns_overrides: Optional[dict[str, LocalDNSOverride]] + mode: Optional[Union[str, LocalDNSMode]] + state: Optional[Union[str, LocalDNSState]] + vnet_dns_overrides: Optional[dict[str, LocalDNSOverride]] + + @overload + def __init__( + self, + *, + kube_dns_overrides: Optional[dict[str, LocalDNSOverride]] = ..., + mode: Optional[Union[str, LocalDNSMode]] = ..., + vnet_dns_overrides: Optional[dict[str, LocalDNSOverride]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolStatus(_Model): - provisioning_error: Optional[ErrorDetail] + class azure.mgmt.containerservice.models.LocalDNSProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FORCE_TCP = "ForceTCP" + PREFER_UDP = "PreferUDP" + + + class azure.mgmt.containerservice.models.LocalDNSQueryLogging(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ERROR = "Error" + LOG = "Log" + + + class azure.mgmt.containerservice.models.LocalDNSServeStale(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLE = "Disable" + IMMEDIATE = "Immediate" + VERIFY = "Verify" - class azure.mgmt.containerservice.models.AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AVAILABILITY_SET = "AvailabilitySet" - VIRTUAL_MACHINES = "VirtualMachines" - VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + class azure.mgmt.containerservice.models.LocalDNSState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" - class azure.mgmt.containerservice.models.AgentPoolUpgradeProfile(ProxyResource): + class azure.mgmt.containerservice.models.Machine(ProxyResource): id: str name: str - properties: AgentPoolUpgradeProfileProperties + properties: Optional[MachineProperties] system_data: SystemData type: str - - def __getattr__(self, name: str) -> Any: ... + zones: Optional[list[str]] @overload def __init__( self, *, - properties: AgentPoolUpgradeProfileProperties + properties: Optional[MachineProperties] = ..., + zones: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( + + class azure.mgmt.containerservice.models.MachineBillingProfile(_Model): + spot_max_price: Optional[float] + + @overload + def __init__( self, - key: str, - value: Any + *, + spot_max_price: Optional[float] = ... ) -> None: ... + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + - class azure.mgmt.containerservice.models.AgentPoolUpgradeProfileProperties(_Model): - kubernetes_version: str - latest_node_image_version: Optional[str] - os_type: Union[str, OSType] - recently_used_versions: Optional[list[AgentPoolRecentlyUsedVersion]] - upgrades: Optional[list[AgentPoolUpgradeProfilePropertiesUpgradesItem]] + class azure.mgmt.containerservice.models.MachineHardwareProfile(_Model): + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] + gpu_profile: Optional[GPUProfile] + ultra_ssd_enabled: Optional[bool] + vm_size: Optional[str] @overload def __init__( self, *, - kubernetes_version: str, - latest_node_image_version: Optional[str] = ..., - os_type: Union[str, OSType], - upgrades: Optional[list[AgentPoolUpgradeProfilePropertiesUpgradesItem]] = ... + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., + gpu_profile: Optional[GPUProfile] = ..., + ultra_ssd_enabled: Optional[bool] = ..., + vm_size: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem(_Model): - is_preview: Optional[bool] - kubernetes_version: Optional[str] + class azure.mgmt.containerservice.models.MachineIpAddress(_Model): + family: Optional[Union[str, IPFamily]] + ip: Optional[str] + + + class azure.mgmt.containerservice.models.MachineKubernetesProfile(_Model): + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] + current_orchestrator_version: Optional[str] + kubelet_config: Optional[KubeletConfig] + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] + max_pods: Optional[int] + node_initialization_taints: Optional[list[str]] + node_labels: Optional[dict[str, str]] + node_name: Optional[str] + node_taints: Optional[list[str]] + orchestrator_version: Optional[str] + workload_runtime: Optional[Union[str, WorkloadRuntime]] @overload def __init__( self, *, - is_preview: Optional[bool] = ..., - kubernetes_version: Optional[str] = ... + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., + kubelet_config: Optional[KubeletConfig] = ..., + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., + max_pods: Optional[int] = ..., + node_initialization_taints: Optional[list[str]] = ..., + node_labels: Optional[dict[str, str]] = ..., + node_taints: Optional[list[str]] = ..., + orchestrator_version: Optional[str] = ..., + workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolUpgradeSettings(_Model): - drain_timeout_in_minutes: Optional[int] - max_surge: Optional[str] - max_unavailable: Optional[str] - node_soak_duration_in_minutes: Optional[int] - undrainable_node_behavior: Optional[Union[str, UndrainableNodeBehavior]] + class azure.mgmt.containerservice.models.MachineNetworkProperties(_Model): + enable_node_public_ip: Optional[bool] + ip_addresses: Optional[list[MachineIpAddress]] + node_public_ip_prefix_id: Optional[str] + node_public_ip_tags: Optional[list[IPTag]] + pod_subnet_id: Optional[str] + vnet_subnet_id: Optional[str] @overload def __init__( self, *, - drain_timeout_in_minutes: Optional[int] = ..., - max_surge: Optional[str] = ..., - max_unavailable: Optional[str] = ..., - node_soak_duration_in_minutes: Optional[int] = ..., - undrainable_node_behavior: Optional[Union[str, UndrainableNodeBehavior]] = ... + enable_node_public_ip: Optional[bool] = ..., + node_public_ip_prefix_id: Optional[str] = ..., + node_public_ip_tags: Optional[list[IPTag]] = ..., + pod_subnet_id: Optional[str] = ..., + vnet_subnet_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AgentPoolWindowsProfile(_Model): - disable_outbound_nat: Optional[bool] + class azure.mgmt.containerservice.models.MachineOSProfile(_Model): + enable_fips: Optional[bool] + linux_profile: Optional[MachineOSProfileLinuxProfile] + os_disk_size_gb: Optional[int] + os_disk_type: Optional[Union[str, OSDiskType]] + os_sku: Optional[Union[str, _models.OSSKU]] + os_type: Optional[Union[str, OSType]] + windows_profile: Optional[AgentPoolWindowsProfile] @overload def __init__( self, *, - disable_outbound_nat: Optional[bool] = ... + enable_fips: Optional[bool] = ..., + linux_profile: Optional[MachineOSProfileLinuxProfile] = ..., + os_disk_size_gb: Optional[int] = ..., + os_disk_type: Optional[Union[str, OSDiskType]] = ..., + os_sku: Optional[Union[str, _models.OSSKU]] = ..., + os_type: Optional[Union[str, OSType]] = ..., + windows_profile: Optional[AgentPoolWindowsProfile] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ArtifactSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CACHE = "Cache" - DIRECT = "Direct" - - - class azure.mgmt.containerservice.models.AutoScaleProfile(_Model): - max_count: Optional[int] - min_count: Optional[int] - size: Optional[str] + class azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile(_Model): + linux_os_config: Optional[LinuxOSConfig] + message_of_the_day: Optional[str] @overload def __init__( self, *, - max_count: Optional[int] = ..., - min_count: Optional[int] = ..., - size: Optional[str] = ... + linux_os_config: Optional[LinuxOSConfig] = ..., + message_of_the_day: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.AzureKeyVaultKms(_Model): - enabled: Optional[bool] - key_id: Optional[str] - key_vault_network_access: Optional[Union[str, KeyVaultNetworkAccessTypes]] - key_vault_resource_id: Optional[str] + class azure.mgmt.containerservice.models.MachineProperties(_Model): + billing: Optional[MachineBillingProfile] + capacity_reservation: Optional[CapacityReservation] + e_tag: Optional[str] + eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] + hardware: Optional[MachineHardwareProfile] + kubernetes: Optional[MachineKubernetesProfile] + local_dns_profile: Optional[LocalDNSProfile] + mode: Optional[Union[str, AgentPoolMode]] + network: Optional[MachineNetworkProperties] + node_image_version: Optional[str] + operating_system: Optional[MachineOSProfile] + priority: Optional[Union[str, ScaleSetPriority]] + provisioning_state: Optional[str] + resource_id: Optional[str] + security: Optional[MachineSecurityProfile] + status: Optional[MachineStatus] + tags: Optional[dict[str, str]] @overload def __init__( self, *, - enabled: Optional[bool] = ..., - key_id: Optional[str] = ..., - key_vault_network_access: Optional[Union[str, KeyVaultNetworkAccessTypes]] = ..., - key_vault_resource_id: Optional[str] = ... + billing: Optional[MachineBillingProfile] = ..., + capacity_reservation: Optional[CapacityReservation] = ..., + eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., + hardware: Optional[MachineHardwareProfile] = ..., + kubernetes: Optional[MachineKubernetesProfile] = ..., + local_dns_profile: Optional[LocalDNSProfile] = ..., + mode: Optional[Union[str, AgentPoolMode]] = ..., + network: Optional[MachineNetworkProperties] = ..., + operating_system: Optional[MachineOSProfile] = ..., + priority: Optional[Union[str, ScaleSetPriority]] = ..., + security: Optional[MachineSecurityProfile] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NODE_IP = "NodeIP" - NODE_IP_CONFIGURATION = "NodeIPConfiguration" - - - class azure.mgmt.containerservice.models.ClusterUpgradeSettings(_Model): - override_settings: Optional[UpgradeOverrideSettings] + class azure.mgmt.containerservice.models.MachineSecurityProfile(_Model): + enable_encryption_at_host: Optional[bool] + enable_secure_boot: Optional[bool] + enable_vtpm: Optional[bool] + ssh_access: Optional[Union[str, AgentPoolSSHAccess]] @overload def __init__( self, *, - override_settings: Optional[UpgradeOverrideSettings] = ... + enable_encryption_at_host: Optional[bool] = ..., + enable_secure_boot: Optional[bool] = ..., + enable_vtpm: Optional[bool] = ..., + ssh_access: Optional[Union[str, AgentPoolSSHAccess]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): - RUNNING = "Running" - STOPPED = "Stopped" - + class azure.mgmt.containerservice.models.MachineStatus(_Model): + creation_timestamp: Optional[datetime] + drift_action: Optional[Union[str, DriftAction]] + drift_reason: Optional[str] + provisioning_error: Optional[ErrorDetail] + vm_state: Optional[Union[str, VmState]] - class azure.mgmt.containerservice.models.CommandResultProperties(_Model): - exit_code: Optional[int] - finished_at: Optional[datetime] - logs: Optional[str] - provisioning_state: Optional[str] - reason: Optional[str] - started_at: Optional[datetime] + class azure.mgmt.containerservice.models.MaintenanceConfiguration(ProxyResource): + id: str + name: str + properties: Optional[MaintenanceConfigurationProperties] + system_data: SystemData + type: str - class azure.mgmt.containerservice.models.CompatibleVersions(_Model): - name: Optional[str] - versions: Optional[list[str]] + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - name: Optional[str] = ..., - versions: Optional[list[str]] = ... + properties: Optional[MaintenanceConfigurationProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + - class azure.mgmt.containerservice.models.ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - APPROVED = "Approved" - DISCONNECTED = "Disconnected" - PENDING = "Pending" - REJECTED = "Rejected" + class azure.mgmt.containerservice.models.MaintenanceConfigurationProperties(_Model): + maintenance_window: Optional[MaintenanceWindow] + maintenance_window_id: Optional[str] + not_allowed_time: Optional[list[TimeSpan]] + time_in_week: Optional[list[TimeInWeek]] + @overload + def __init__( + self, + *, + maintenance_window: Optional[MaintenanceWindow] = ..., + maintenance_window_id: Optional[str] = ..., + not_allowed_time: Optional[list[TimeSpan]] = ..., + time_in_week: Optional[list[TimeInWeek]] = ... + ) -> None: ... - class azure.mgmt.containerservice.models.ContainerNetworkLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ContainerServiceLinuxProfile(_Model): - admin_username: str - ssh: ContainerServiceSshConfiguration + class azure.mgmt.containerservice.models.MaintenanceWindow(_Model): + duration_hours: int + not_allowed_dates: Optional[list[DateSpan]] + schedule: Schedule + start_date: Optional[date] + start_time: str + utc_offset: Optional[str] @overload def __init__( self, *, - admin_username: str, - ssh: ContainerServiceSshConfiguration + duration_hours: int, + not_allowed_dates: Optional[list[DateSpan]] = ..., + schedule: Schedule, + start_date: Optional[date] = ..., + start_time: str, + utc_offset: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ContainerServiceNetworkProfile(_Model): - advanced_networking: Optional[AdvancedNetworking] - dns_service_ip: Optional[str] - ip_families: Optional[list[Union[str, IPFamily]]] - load_balancer_profile: Optional[ManagedClusterLoadBalancerProfile] - load_balancer_sku: Optional[Union[str, LoadBalancerSku]] - nat_gateway_profile: Optional[ManagedClusterNATGatewayProfile] - network_dataplane: Optional[Union[str, NetworkDataplane]] - network_mode: Optional[Union[str, NetworkMode]] - network_plugin: Optional[Union[str, NetworkPlugin]] - network_plugin_mode: Optional[Union[str, NetworkPluginMode]] - network_policy: Optional[Union[str, NetworkPolicy]] - outbound_type: Optional[Union[str, OutboundType]] - pod_cidr: Optional[str] - pod_cidrs: Optional[list[str]] - service_cidr: Optional[str] - service_cidrs: Optional[list[str]] - static_egress_gateway_profile: Optional[ManagedClusterStaticEgressGatewayProfile] + class azure.mgmt.containerservice.models.MaintenanceWindowResource(TrackedResource): + id: str + location: str + name: str + properties: Optional[MaintenanceWindowResourceProperties] + system_data: SystemData + tags: dict[str, str] + type: str @overload def __init__( self, *, - advanced_networking: Optional[AdvancedNetworking] = ..., - dns_service_ip: Optional[str] = ..., - ip_families: Optional[list[Union[str, IPFamily]]] = ..., - load_balancer_profile: Optional[ManagedClusterLoadBalancerProfile] = ..., - load_balancer_sku: Optional[Union[str, LoadBalancerSku]] = ..., - nat_gateway_profile: Optional[ManagedClusterNATGatewayProfile] = ..., - network_dataplane: Optional[Union[str, NetworkDataplane]] = ..., - network_mode: Optional[Union[str, NetworkMode]] = ..., - network_plugin: Optional[Union[str, NetworkPlugin]] = ..., - network_plugin_mode: Optional[Union[str, NetworkPluginMode]] = ..., - network_policy: Optional[Union[str, NetworkPolicy]] = ..., - outbound_type: Optional[Union[str, OutboundType]] = ..., - pod_cidr: Optional[str] = ..., - pod_cidrs: Optional[list[str]] = ..., - service_cidr: Optional[str] = ..., - service_cidrs: Optional[list[str]] = ..., - static_egress_gateway_profile: Optional[ManagedClusterStaticEgressGatewayProfile] = ... + location: str, + properties: Optional[MaintenanceWindowResourceProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ContainerServiceSshConfiguration(_Model): - public_keys: list[ContainerServiceSshPublicKey] + class azure.mgmt.containerservice.models.MaintenanceWindowResourceProperties(_Model): + duration_hours: int + not_allowed_dates: Optional[list[DateSpan]] + provisioning_state: Optional[Union[str, ResourceProvisioningState]] + schedule: Schedule + start_date: Optional[date] + start_time: str + utc_offset: Optional[str] @overload def __init__( self, *, - public_keys: list[ContainerServiceSshPublicKey] + duration_hours: int, + not_allowed_dates: Optional[list[DateSpan]] = ..., + schedule: Schedule, + start_date: Optional[date] = ..., + start_time: str, + utc_offset: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ContainerServiceSshPublicKey(_Model): - key_data: str + class azure.mgmt.containerservice.models.ManagedCluster(TrackedResource): + e_tag: Optional[str] + extended_location: Optional[ExtendedLocation] + id: str + identity: Optional[ManagedClusterIdentity] + kind: Optional[str] + location: str + name: str + properties: Optional[ManagedClusterProperties] + sku: Optional[ManagedClusterSKU] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - key_data: str + extended_location: Optional[ExtendedLocation] = ..., + identity: Optional[ManagedClusterIdentity] = ..., + kind: Optional[str] = ..., + location: str, + properties: Optional[ManagedClusterProperties] = ..., + sku: Optional[ManagedClusterSKU] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.containerservice.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - APPLICATION = "Application" - KEY = "Key" - MANAGED_IDENTITY = "ManagedIdentity" - USER = "User" + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.CreationData(_Model): - source_resource_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterAADProfile(_Model): + admin_group_object_i_ds: Optional[list[str]] + client_app_id: Optional[str] + enable_azure_rbac: Optional[bool] + managed: Optional[bool] + server_app_id: Optional[str] + server_app_secret: Optional[str] + tenant_id: Optional[str] @overload def __init__( self, *, - source_resource_id: Optional[str] = ... + admin_group_object_i_ds: Optional[list[str]] = ..., + client_app_id: Optional[str] = ..., + enable_azure_rbac: Optional[bool] = ..., + managed: Optional[bool] = ..., + server_app_id: Optional[str] = ..., + server_app_secret: Optional[str] = ..., + tenant_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.CredentialResult(_Model): - name: Optional[str] - value: Optional[bytes] - - - class azure.mgmt.containerservice.models.CredentialResults(_Model): - kubeconfigs: Optional[list[CredentialResult]] + class azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile(_Model): + enabled: Optional[bool] + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ... + ) -> None: ... - class azure.mgmt.containerservice.models.DRANETMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MANAGED = "Managed" - UNMANAGED = "Unmanaged" + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.DRANETProfile(_Model): - mode: Optional[Union[str, DRANETMode]] + class azure.mgmt.containerservice.models.ManagedClusterAPIServerAccessProfile(_Model): + authorized_ip_ranges: Optional[list[str]] + disable_run_command: Optional[bool] + enable_private_cluster: Optional[bool] + enable_private_cluster_public_fqdn: Optional[bool] + enable_vnet_integration: Optional[bool] + private_dns_zone: Optional[str] + subnet_id: Optional[str] @overload def __init__( self, *, - mode: Optional[Union[str, DRANETMode]] = ... + authorized_ip_ranges: Optional[list[str]] = ..., + disable_run_command: Optional[bool] = ..., + enable_private_cluster: Optional[bool] = ..., + enable_private_cluster_public_fqdn: Optional[bool] = ..., + enable_vnet_integration: Optional[bool] = ..., + private_dns_zone: Optional[str] = ..., + subnet_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.DailySchedule(_Model): - interval_days: int + class azure.mgmt.containerservice.models.ManagedClusterAccessProfile(TrackedResource): + id: str + location: str + name: str + properties: Optional[AccessProfile] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - interval_days: int + location: str, + properties: Optional[AccessProfile] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... + - class azure.mgmt.containerservice.models.DateSpan(_Model): - end: date - start: date + class azure.mgmt.containerservice.models.ManagedClusterAddonProfile(_Model): + config: Optional[dict[str, str]] + enabled: bool + identity: Optional[ManagedClusterAddonProfileIdentity] @overload def __init__( self, *, - end: date, - start: date + config: Optional[dict[str, str]] = ..., + enabled: bool ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.DelegatedResource(_Model): - location: Optional[str] - referral_resource: Optional[str] - resource_id: Optional[str] - tenant_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + client_id: str + object_id: str + resource_id: str @overload def __init__( self, *, - location: Optional[str] = ..., - referral_resource: Optional[str] = ..., - resource_id: Optional[str] = ..., - tenant_id: Optional[str] = ... + client_id: Optional[str] = ..., + object_id: Optional[str] = ..., + resource_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.DeletePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DELETE = "Delete" - KEEP = "Keep" - - - class azure.mgmt.containerservice.models.EndpointDependency(_Model): - domain_name: Optional[str] - endpoint_details: Optional[list[EndpointDetail]] + class azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + artifact_streaming_profile: AgentPoolArtifactStreamingProfile + availability_zones: list[str] + capacity_reservation_group_id: str + count: int + creation_data: CreationData + current_orchestrator_version: str + e_tag: str + enable_auto_scaling: bool + enable_encryption_at_host: bool + enable_fips: bool + enable_node_public_ip: bool + enable_os_disk_full_caching: bool + enable_ultra_ssd: bool + gateway_profile: AgentPoolGatewayProfile + gpu_instance_profile: Union[str, GPUInstanceProfile] + gpu_profile: GPUProfile + host_group_id: str + kubelet_config: KubeletConfig + kubelet_disk_type: Union[str, KubeletDiskType] + linux_os_config: LinuxOSConfig + local_dns_profile: LocalDNSProfile + max_count: int + max_pods: int + message_of_the_day: str + min_count: int + mode: Union[str, AgentPoolMode] + name: str + network_profile: AgentPoolNetworkProfile + node_image_version: str + node_initialization_taints: list[str] + node_labels: dict[str, str] + node_public_ip_prefix_id: str + node_taints: list[str] + orchestrator_version: str + os_disk_size_gb: int + os_disk_type: Union[str, OSDiskType] + os_sku: Union[str, azure.mgmt.containerservice.models.OSSKU] + os_type: Union[str, OSType] + pod_ip_allocation_mode: Union[str, PodIPAllocationMode] + pod_subnet_id: str + power_state: PowerState + prepared_image_specification_profile: PreparedImageSpecificationProfile + provisioning_state: str + proximity_placement_group_id: str + scale_down_mode: Union[str, ScaleDownMode] + scale_set_eviction_policy: Union[str, ScaleSetEvictionPolicy] + scale_set_priority: Union[str, ScaleSetPriority] + security_profile: AgentPoolSecurityProfile + spot_max_price: float + status: AgentPoolStatus + tags: dict[str, str] + type: Union[str, AgentPoolType] + upgrade_settings: AgentPoolUpgradeSettings + upgrade_settings_blue_green: AgentPoolBlueGreenUpgradeSettings + upgrade_strategy: Union[str, UpgradeStrategy] + virtual_machine_nodes_status: list[VirtualMachineNodes] + virtual_machines_profile: VirtualMachinesProfile + vm_size: str + vnet_subnet_id: str + windows_profile: AgentPoolWindowsProfile + workload_runtime: Union[str, WorkloadRuntime] @overload def __init__( self, *, - domain_name: Optional[str] = ..., - endpoint_details: Optional[list[EndpointDetail]] = ... + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., + availability_zones: Optional[list[str]] = ..., + capacity_reservation_group_id: Optional[str] = ..., + count: Optional[int] = ..., + creation_data: Optional[CreationData] = ..., + enable_auto_scaling: Optional[bool] = ..., + enable_encryption_at_host: Optional[bool] = ..., + enable_fips: Optional[bool] = ..., + enable_node_public_ip: Optional[bool] = ..., + enable_os_disk_full_caching: Optional[bool] = ..., + enable_ultra_ssd: Optional[bool] = ..., + gateway_profile: Optional[AgentPoolGatewayProfile] = ..., + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., + gpu_profile: Optional[GPUProfile] = ..., + host_group_id: Optional[str] = ..., + kubelet_config: Optional[KubeletConfig] = ..., + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., + linux_os_config: Optional[LinuxOSConfig] = ..., + local_dns_profile: Optional[LocalDNSProfile] = ..., + max_count: Optional[int] = ..., + max_pods: Optional[int] = ..., + message_of_the_day: Optional[str] = ..., + min_count: Optional[int] = ..., + mode: Optional[Union[str, AgentPoolMode]] = ..., + name: str, + network_profile: Optional[AgentPoolNetworkProfile] = ..., + node_image_version: Optional[str] = ..., + node_initialization_taints: Optional[list[str]] = ..., + node_labels: Optional[dict[str, str]] = ..., + node_public_ip_prefix_id: Optional[str] = ..., + node_taints: Optional[list[str]] = ..., + orchestrator_version: Optional[str] = ..., + os_disk_size_gb: Optional[int] = ..., + os_disk_type: Optional[Union[str, OSDiskType]] = ..., + os_sku: Optional[Union[str, _models.OSSKU]] = ..., + os_type: Optional[Union[str, OSType]] = ..., + pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., + pod_subnet_id: Optional[str] = ..., + power_state: Optional[PowerState] = ..., + prepared_image_specification_profile: Optional[PreparedImageSpecificationProfile] = ..., + proximity_placement_group_id: Optional[str] = ..., + scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., + scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., + scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., + security_profile: Optional[AgentPoolSecurityProfile] = ..., + spot_max_price: Optional[float] = ..., + status: Optional[AgentPoolStatus] = ..., + tags: Optional[dict[str, str]] = ..., + type: Optional[Union[str, AgentPoolType]] = ..., + upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., + upgrade_settings_blue_green: Optional[AgentPoolBlueGreenUpgradeSettings] = ..., + upgrade_strategy: Optional[Union[str, UpgradeStrategy]] = ..., + virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., + virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., + vm_size: Optional[str] = ..., + vnet_subnet_id: Optional[str] = ..., + windows_profile: Optional[AgentPoolWindowsProfile] = ..., + workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.EndpointDetail(_Model): - description: Optional[str] - ip_address: Optional[str] - port: Optional[int] - protocol: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfileProperties(_Model): + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] + availability_zones: Optional[list[str]] + capacity_reservation_group_id: Optional[str] + count: Optional[int] + creation_data: Optional[CreationData] + current_orchestrator_version: Optional[str] + e_tag: Optional[str] + enable_auto_scaling: Optional[bool] + enable_encryption_at_host: Optional[bool] + enable_fips: Optional[bool] + enable_node_public_ip: Optional[bool] + enable_os_disk_full_caching: Optional[bool] + enable_ultra_ssd: Optional[bool] + gateway_profile: Optional[AgentPoolGatewayProfile] + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] + gpu_profile: Optional[GPUProfile] + host_group_id: Optional[str] + kubelet_config: Optional[KubeletConfig] + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] + linux_os_config: Optional[LinuxOSConfig] + local_dns_profile: Optional[LocalDNSProfile] + max_count: Optional[int] + max_pods: Optional[int] + message_of_the_day: Optional[str] + min_count: Optional[int] + mode: Optional[Union[str, AgentPoolMode]] + network_profile: Optional[AgentPoolNetworkProfile] + node_image_version: Optional[str] + node_initialization_taints: Optional[list[str]] + node_labels: Optional[dict[str, str]] + node_public_ip_prefix_id: Optional[str] + node_taints: Optional[list[str]] + orchestrator_version: Optional[str] + os_disk_size_gb: Optional[int] + os_disk_type: Optional[Union[str, OSDiskType]] + os_sku: Optional[Union[str, _models.OSSKU]] + os_type: Optional[Union[str, OSType]] + pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] + pod_subnet_id: Optional[str] + power_state: Optional[PowerState] + prepared_image_specification_profile: Optional[PreparedImageSpecificationProfile] + provisioning_state: Optional[str] + proximity_placement_group_id: Optional[str] + scale_down_mode: Optional[Union[str, ScaleDownMode]] + scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] + scale_set_priority: Optional[Union[str, ScaleSetPriority]] + security_profile: Optional[AgentPoolSecurityProfile] + spot_max_price: Optional[float] + status: Optional[AgentPoolStatus] + tags: Optional[dict[str, str]] + type: Optional[Union[str, AgentPoolType]] + upgrade_settings: Optional[AgentPoolUpgradeSettings] + upgrade_settings_blue_green: Optional[AgentPoolBlueGreenUpgradeSettings] + upgrade_strategy: Optional[Union[str, UpgradeStrategy]] + virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] + virtual_machines_profile: Optional[VirtualMachinesProfile] + vm_size: Optional[str] + vnet_subnet_id: Optional[str] + windows_profile: Optional[AgentPoolWindowsProfile] + workload_runtime: Optional[Union[str, WorkloadRuntime]] @overload def __init__( self, *, - description: Optional[str] = ..., - ip_address: Optional[str] = ..., - port: Optional[int] = ..., - protocol: Optional[str] = ... + artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., + availability_zones: Optional[list[str]] = ..., + capacity_reservation_group_id: Optional[str] = ..., + count: Optional[int] = ..., + creation_data: Optional[CreationData] = ..., + enable_auto_scaling: Optional[bool] = ..., + enable_encryption_at_host: Optional[bool] = ..., + enable_fips: Optional[bool] = ..., + enable_node_public_ip: Optional[bool] = ..., + enable_os_disk_full_caching: Optional[bool] = ..., + enable_ultra_ssd: Optional[bool] = ..., + gateway_profile: Optional[AgentPoolGatewayProfile] = ..., + gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., + gpu_profile: Optional[GPUProfile] = ..., + host_group_id: Optional[str] = ..., + kubelet_config: Optional[KubeletConfig] = ..., + kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., + linux_os_config: Optional[LinuxOSConfig] = ..., + local_dns_profile: Optional[LocalDNSProfile] = ..., + max_count: Optional[int] = ..., + max_pods: Optional[int] = ..., + message_of_the_day: Optional[str] = ..., + min_count: Optional[int] = ..., + mode: Optional[Union[str, AgentPoolMode]] = ..., + network_profile: Optional[AgentPoolNetworkProfile] = ..., + node_image_version: Optional[str] = ..., + node_initialization_taints: Optional[list[str]] = ..., + node_labels: Optional[dict[str, str]] = ..., + node_public_ip_prefix_id: Optional[str] = ..., + node_taints: Optional[list[str]] = ..., + orchestrator_version: Optional[str] = ..., + os_disk_size_gb: Optional[int] = ..., + os_disk_type: Optional[Union[str, OSDiskType]] = ..., + os_sku: Optional[Union[str, _models.OSSKU]] = ..., + os_type: Optional[Union[str, OSType]] = ..., + pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., + pod_subnet_id: Optional[str] = ..., + power_state: Optional[PowerState] = ..., + prepared_image_specification_profile: Optional[PreparedImageSpecificationProfile] = ..., + proximity_placement_group_id: Optional[str] = ..., + scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., + scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., + scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., + security_profile: Optional[AgentPoolSecurityProfile] = ..., + spot_max_price: Optional[float] = ..., + status: Optional[AgentPoolStatus] = ..., + tags: Optional[dict[str, str]] = ..., + type: Optional[Union[str, AgentPoolType]] = ..., + upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., + upgrade_settings_blue_green: Optional[AgentPoolBlueGreenUpgradeSettings] = ..., + upgrade_strategy: Optional[Union[str, UpgradeStrategy]] = ..., + virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., + virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., + vm_size: Optional[str] = ..., + vnet_subnet_id: Optional[str] = ..., + windows_profile: Optional[AgentPoolWindowsProfile] = ..., + workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ErrorAdditionalInfo(_Model): - info: Optional[Any] - type: Optional[str] - - - class azure.mgmt.containerservice.models.ErrorDetail(_Model): - additional_info: Optional[list[ErrorAdditionalInfo]] - code: Optional[str] - details: Optional[list[ErrorDetail]] - message: Optional[str] - target: Optional[str] - - - class azure.mgmt.containerservice.models.ErrorResponse(_Model): - error: Optional[ErrorDetail] + class azure.mgmt.containerservice.models.ManagedClusterAppRoutingIstio(_Model): + mode: Optional[Union[str, GatewayAPIIstioEnabled]] @overload def __init__( self, *, - error: Optional[ErrorDetail] = ... + mode: Optional[Union[str, GatewayAPIIstioEnabled]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): - LEAST_WASTE = "least-waste" - MOST_PODS = "most-pods" - PRIORITY = "priority" - RANDOM = "random" - - - class azure.mgmt.containerservice.models.ExtendedLocation(_Model): - name: Optional[str] - type: Optional[Union[str, ExtendedLocationTypes]] + class azure.mgmt.containerservice.models.ManagedClusterAutoUpgradeProfile(_Model): + node_os_upgrade_channel: Optional[Union[str, NodeOSUpgradeChannel]] + upgrade_channel: Optional[Union[str, UpgradeChannel]] @overload def __init__( self, *, - name: Optional[str] = ..., - type: Optional[Union[str, ExtendedLocationTypes]] = ... + node_os_upgrade_channel: Optional[Union[str, NodeOSUpgradeChannel]] = ..., + upgrade_channel: Optional[Union[str, UpgradeChannel]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EDGE_ZONE = "EdgeZone" - - - class azure.mgmt.containerservice.models.Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE = "azure" - EXEC = "exec" - - - class azure.mgmt.containerservice.models.GPUDriver(str, Enum, metaclass=CaseInsensitiveEnumMeta): - INSTALL = "Install" - NONE = "None" - - - class azure.mgmt.containerservice.models.GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): - MIG1_G = "MIG1g" - MIG2_G = "MIG2g" - MIG3_G = "MIG3g" - MIG4_G = "MIG4g" - MIG7_G = "MIG7g" - - - class azure.mgmt.containerservice.models.GPUProfile(_Model): - driver: Optional[Union[str, GPUDriver]] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile(_Model): + app_monitoring: Optional[ManagedClusterAzureMonitorProfileAppMonitoring] + container_insights: Optional[ManagedClusterAzureMonitorProfileContainerInsights] + metrics: Optional[ManagedClusterAzureMonitorProfileMetrics] @overload def __init__( self, *, - driver: Optional[Union[str, GPUDriver]] = ... + app_monitoring: Optional[ManagedClusterAzureMonitorProfileAppMonitoring] = ..., + container_insights: Optional[ManagedClusterAzureMonitorProfileContainerInsights] = ..., + metrics: Optional[ManagedClusterAzureMonitorProfileMetrics] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.GatewayAPIIstioEnabled(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.containerservice.models.IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): - I_PV4 = "IPv4" - I_PV6 = "IPv6" - - - class azure.mgmt.containerservice.models.IPTag(_Model): - ip_tag_type: Optional[str] - tag: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring(_Model): + auto_instrumentation: Optional[ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation] + open_telemetry_logs_and_traces: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces] + open_telemetry_metrics: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics] @overload def __init__( self, *, - ip_tag_type: Optional[str] = ..., - tag: Optional[str] = ... + auto_instrumentation: Optional[ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation] = ..., + open_telemetry_logs_and_traces: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces] = ..., + open_telemetry_metrics: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics] = ... ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.IdentityBinding(ProxyResource): - e_tag: Optional[str] - id: str - name: str - properties: Optional[IdentityBindingProperties] - system_data: SystemData - type: str + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - properties: Optional[IdentityBindingProperties] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile(_Model): - client_id: Optional[str] - object_id: Optional[str] - resource_id: str - tenant_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces(_Model): + enabled: Optional[bool] + grpc_port: Optional[int] + http_port: Optional[int] @overload def __init__( self, *, - resource_id: str + enabled: Optional[bool] = ..., + grpc_port: Optional[int] = ..., + http_port: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile(_Model): - oidc_issuer_url: Optional[str] - - - class azure.mgmt.containerservice.models.IdentityBindingProperties(_Model): - managed_identity: IdentityBindingManagedIdentityProfile - oidc_issuer: Optional[IdentityBindingOidcIssuerProfile] - provisioning_state: Optional[Union[str, IdentityBindingProvisioningState]] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(_Model): + enabled: Optional[bool] + grpc_port: Optional[int] + http_port: Optional[int] @overload def __init__( self, *, - managed_identity: IdentityBindingManagedIdentityProfile + enabled: Optional[bool] = ..., + grpc_port: Optional[int] = ..., + http_port: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IdentityBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - CREATING = "Creating" - DELETING = "Deleting" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - - - class azure.mgmt.containerservice.models.IstioCertificateAuthority(_Model): - plugin: Optional[IstioPluginCertificateAuthority] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights(_Model): + container_network_logs: Optional[Union[str, ContainerNetworkLogs]] + disable_prometheus_metrics_scraping: Optional[bool] + enabled: Optional[bool] + log_analytics_workspace_resource_id: Optional[str] + syslog_port: Optional[int] @overload def __init__( self, *, - plugin: Optional[IstioPluginCertificateAuthority] = ... + container_network_logs: Optional[Union[str, ContainerNetworkLogs]] = ..., + disable_prometheus_metrics_scraping: Optional[bool] = ..., + enabled: Optional[bool] = ..., + log_analytics_workspace_resource_id: Optional[str] = ..., + syslog_port: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IstioComponents(_Model): - egress_gateways: Optional[list[IstioEgressGateway]] - ingress_gateways: Optional[list[IstioIngressGateway]] - proxy_redirection_mechanism: Optional[Union[str, ProxyRedirectionMechanism]] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics(_Model): + metric_annotations_allow_list: Optional[str] + metric_labels_allowlist: Optional[str] @overload def __init__( self, *, - egress_gateways: Optional[list[IstioEgressGateway]] = ..., - ingress_gateways: Optional[list[IstioIngressGateway]] = ..., - proxy_redirection_mechanism: Optional[Union[str, ProxyRedirectionMechanism]] = ... + metric_annotations_allow_list: Optional[str] = ..., + metric_labels_allowlist: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IstioEgressGateway(_Model): + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics(_Model): + control_plane: Optional[ManagedClusterAzureMonitorProfileMetricsControlPlane] enabled: bool - gateway_configuration_name: Optional[str] - name: str - namespace: Optional[str] + kube_state_metrics: Optional[ManagedClusterAzureMonitorProfileKubeStateMetrics] @overload def __init__( self, *, + control_plane: Optional[ManagedClusterAzureMonitorProfileMetricsControlPlane] = ..., enabled: bool, - gateway_configuration_name: Optional[str] = ..., - name: str, - namespace: Optional[str] = ... + kube_state_metrics: Optional[ManagedClusterAzureMonitorProfileKubeStateMetrics] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IstioIngressGateway(_Model): - enabled: bool - mode: Union[str, IstioIngressGatewayMode] + class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetricsControlPlane(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - enabled: bool, - mode: Union[str, IstioIngressGatewayMode] + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EXTERNAL = "External" - INTERNAL = "Internal" - - - class azure.mgmt.containerservice.models.IstioPluginCertificateAuthority(_Model): - cert_chain_object_name: Optional[str] - cert_object_name: Optional[str] - key_object_name: Optional[str] - key_vault_id: Optional[str] - root_cert_object_name: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile(_Model): + artifact_source: Optional[Union[str, ArtifactSource]] + container_registry_id: Optional[str] @overload def __init__( self, *, - cert_chain_object_name: Optional[str] = ..., - cert_object_name: Optional[str] = ..., - key_object_name: Optional[str] = ..., - key_vault_id: Optional[str] = ..., - root_cert_object_name: Optional[str] = ... + artifact_source: Optional[Union[str, ArtifactSource]] = ..., + container_registry_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.IstioServiceMesh(_Model): - certificate_authority: Optional[IstioCertificateAuthority] - components: Optional[IstioComponents] - revisions: Optional[list[str]] + class azure.mgmt.containerservice.models.ManagedClusterControlPlaneScalingProfile(_Model): + scaling_size: Union[str, ControlPlaneScalingSize] @overload def __init__( self, *, - certificate_authority: Optional[IstioCertificateAuthority] = ..., - components: Optional[IstioComponents] = ..., - revisions: Optional[list[str]] = ... + scaling_size: Union[str, ControlPlaneScalingSize] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): - PRIVATE = "Private" - PUBLIC = "Public" - - - class azure.mgmt.containerservice.models.KubeletConfig(_Model): - allowed_unsafe_sysctls: Optional[list[str]] - container_log_max_files: Optional[int] - container_log_max_size_mb: Optional[int] - cpu_cfs_quota: Optional[bool] - cpu_cfs_quota_period: Optional[str] - cpu_manager_policy: Optional[str] - fail_swap_on: Optional[bool] - image_gc_high_threshold: Optional[int] - image_gc_low_threshold: Optional[int] - pod_max_pids: Optional[int] - topology_manager_policy: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterCostAnalysis(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - allowed_unsafe_sysctls: Optional[list[str]] = ..., - container_log_max_files: Optional[int] = ..., - container_log_max_size_mb: Optional[int] = ..., - cpu_cfs_quota: Optional[bool] = ..., - cpu_cfs_quota_period: Optional[str] = ..., - cpu_manager_policy: Optional[str] = ..., - fail_swap_on: Optional[bool] = ..., - image_gc_high_threshold: Optional[int] = ..., - image_gc_low_threshold: Optional[int] = ..., - pod_max_pids: Optional[int] = ..., - topology_manager_policy: Optional[str] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.KubeletDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - OS = "OS" - TEMPORARY = "Temporary" - - - class azure.mgmt.containerservice.models.KubernetesPatchVersion(_Model): - upgrades: Optional[list[str]] + class azure.mgmt.containerservice.models.ManagedClusterHTTPProxyConfig(_Model): + effective_no_proxy: Optional[list[str]] + enabled: Optional[bool] + http_proxy: Optional[str] + https_proxy: Optional[str] + no_proxy: Optional[list[str]] + trusted_ca: Optional[str] @overload def __init__( self, *, - upgrades: Optional[list[str]] = ... + enabled: Optional[bool] = ..., + http_proxy: Optional[str] = ..., + https_proxy: Optional[str] = ..., + no_proxy: Optional[list[str]] = ..., + trusted_ca: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.KubernetesSupportPlan(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AKS_LONG_TERM_SUPPORT = "AKSLongTermSupport" - KUBERNETES_OFFICIAL = "KubernetesOfficial" - - - class azure.mgmt.containerservice.models.KubernetesVersion(_Model): - capabilities: Optional[KubernetesVersionCapabilities] - is_default: Optional[bool] - is_preview: Optional[bool] - patch_versions: Optional[dict[str, KubernetesPatchVersion]] - version: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterHealthMonitorProfile(_Model): + enable_continuous_control_plane_and_addon_monitor: Optional[bool] + enable_on_demand_monitor: Optional[bool] @overload def __init__( self, *, - capabilities: Optional[KubernetesVersionCapabilities] = ..., - is_default: Optional[bool] = ..., - is_preview: Optional[bool] = ..., - patch_versions: Optional[dict[str, KubernetesPatchVersion]] = ..., - version: Optional[str] = ... + enable_continuous_control_plane_and_addon_monitor: Optional[bool] = ..., + enable_on_demand_monitor: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.KubernetesVersionCapabilities(_Model): - support_plan: Optional[list[Union[str, KubernetesSupportPlan]]] + class azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile(_Model): + enabled: Optional[bool] + node_subnet_id: Optional[str] + system_node_subnet_id: Optional[str] @overload def __init__( self, *, - support_plan: Optional[list[Union[str, KubernetesSupportPlan]]] = ... + enabled: Optional[bool] = ..., + node_subnet_id: Optional[str] = ..., + system_node_subnet_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.KubernetesVersionListResult(_Model): - values_property: Optional[list[KubernetesVersion]] + class azure.mgmt.containerservice.models.ManagedClusterIdentity(_Model): + delegated_resources: Optional[dict[str, DelegatedResource]] + principal_id: Optional[str] + tenant_id: Optional[str] + type: Optional[Union[str, ResourceIdentityType]] + user_assigned_identities: Optional[dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue]] @overload def __init__( self, *, - values_property: Optional[list[KubernetesVersion]] = ... + delegated_resources: Optional[dict[str, DelegatedResource]] = ..., + type: Optional[Union[str, ResourceIdentityType]] = ..., + user_assigned_identities: Optional[dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.LicenseType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NONE = "None" - WINDOWS_SERVER = "Windows_Server" - - - class azure.mgmt.containerservice.models.LinuxOSConfig(_Model): - swap_file_size_mb: Optional[int] - sysctls: Optional[SysctlConfig] - transparent_huge_page_defrag: Optional[str] - transparent_huge_page_enabled: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile(_Model): + domain_name: Optional[str] + enabled: Optional[bool] @overload def __init__( self, *, - swap_file_size_mb: Optional[int] = ..., - sysctls: Optional[SysctlConfig] = ..., - transparent_huge_page_defrag: Optional[str] = ..., - transparent_huge_page_enabled: Optional[str] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BASIC = "basic" - STANDARD = "standard" - - - class azure.mgmt.containerservice.models.LocalDNSForwardDestination(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CLUSTER_CORE_DNS = "ClusterCoreDNS" - VNET_DNS = "VnetDNS" - - - class azure.mgmt.containerservice.models.LocalDNSForwardPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - RANDOM = "Random" - ROUND_ROBIN = "RoundRobin" - SEQUENTIAL = "Sequential" - - - class azure.mgmt.containerservice.models.LocalDNSMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - PREFERRED = "Preferred" - REQUIRED = "Required" - - - class azure.mgmt.containerservice.models.LocalDNSOverride(_Model): - cache_duration_in_seconds: Optional[int] - forward_destination: Optional[Union[str, LocalDNSForwardDestination]] - forward_policy: Optional[Union[str, LocalDNSForwardPolicy]] - max_concurrent: Optional[int] - protocol: Optional[Union[str, LocalDNSProtocol]] - query_logging: Optional[Union[str, LocalDNSQueryLogging]] - serve_stale: Optional[Union[str, LocalDNSServeStale]] - serve_stale_duration_in_seconds: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterIngressProfile(_Model): + application_load_balancer: Optional[ManagedClusterIngressProfileApplicationLoadBalancer] + gateway_api: Optional[ManagedClusterIngressProfileGatewayConfiguration] + web_app_routing: Optional[ManagedClusterIngressProfileWebAppRouting] @overload def __init__( self, *, - cache_duration_in_seconds: Optional[int] = ..., - forward_destination: Optional[Union[str, LocalDNSForwardDestination]] = ..., - forward_policy: Optional[Union[str, LocalDNSForwardPolicy]] = ..., - max_concurrent: Optional[int] = ..., - protocol: Optional[Union[str, LocalDNSProtocol]] = ..., - query_logging: Optional[Union[str, LocalDNSQueryLogging]] = ..., - serve_stale: Optional[Union[str, LocalDNSServeStale]] = ..., - serve_stale_duration_in_seconds: Optional[int] = ... + application_load_balancer: Optional[ManagedClusterIngressProfileApplicationLoadBalancer] = ..., + gateway_api: Optional[ManagedClusterIngressProfileGatewayConfiguration] = ..., + web_app_routing: Optional[ManagedClusterIngressProfileWebAppRouting] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.LocalDNSProfile(_Model): - kube_dns_overrides: Optional[dict[str, LocalDNSOverride]] - mode: Optional[Union[str, LocalDNSMode]] - state: Optional[Union[str, LocalDNSState]] - vnet_dns_overrides: Optional[dict[str, LocalDNSOverride]] + class azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer(_Model): + enabled: Optional[bool] + identity: Optional[UserAssignedIdentity] @overload def __init__( self, *, - kube_dns_overrides: Optional[dict[str, LocalDNSOverride]] = ..., - mode: Optional[Union[str, LocalDNSMode]] = ..., - vnet_dns_overrides: Optional[dict[str, LocalDNSOverride]] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.LocalDNSProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FORCE_TCP = "ForceTCP" - PREFER_UDP = "PreferUDP" - - - class azure.mgmt.containerservice.models.LocalDNSQueryLogging(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ERROR = "Error" - LOG = "Log" - - - class azure.mgmt.containerservice.models.LocalDNSServeStale(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLE = "Disable" - IMMEDIATE = "Immediate" - VERIFY = "Verify" + class azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration(_Model): + installation: Optional[Union[str, ManagedGatewayType]] + @overload + def __init__( + self, + *, + installation: Optional[Union[str, ManagedGatewayType]] = ... + ) -> None: ... - class azure.mgmt.containerservice.models.LocalDNSState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Machine(ProxyResource): - id: str - name: str - properties: Optional[MachineProperties] - system_data: SystemData - type: str - zones: Optional[list[str]] + class azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx(_Model): + default_ingress_controller_type: Optional[Union[str, NginxIngressControllerType]] @overload def __init__( self, *, - properties: Optional[MachineProperties] = ... + default_ingress_controller_type: Optional[Union[str, NginxIngressControllerType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MachineIpAddress(_Model): - family: Optional[Union[str, IPFamily]] - ip: Optional[str] - - - class azure.mgmt.containerservice.models.MachineNetworkProperties(_Model): - ip_addresses: Optional[list[MachineIpAddress]] - + class azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting(_Model): + default_domain: Optional[ManagedClusterIngressDefaultDomainProfile] + dns_zone_resource_ids: Optional[list[str]] + enabled: Optional[bool] + gateway_api_implementations: Optional[ManagedClusterWebAppRoutingGatewayAPIImplementations] + identity: Optional[UserAssignedIdentity] + nginx: Optional[ManagedClusterIngressProfileNginx] - class azure.mgmt.containerservice.models.MachineProperties(_Model): - network: Optional[MachineNetworkProperties] - resource_id: Optional[str] + @overload + def __init__( + self, + *, + default_domain: Optional[ManagedClusterIngressDefaultDomainProfile] = ..., + dns_zone_resource_ids: Optional[list[str]] = ..., + enabled: Optional[bool] = ..., + gateway_api_implementations: Optional[ManagedClusterWebAppRoutingGatewayAPIImplementations] = ..., + nginx: Optional[ManagedClusterIngressProfileNginx] = ... + ) -> None: ... + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MaintenanceConfiguration(ProxyResource): - id: str - name: str - properties: Optional[MaintenanceConfigurationProperties] - system_data: SystemData - type: str - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfile(_Model): + allocated_outbound_ports: Optional[int] + backend_pool_type: Optional[Union[str, BackendPoolType]] + cluster_service_load_balancer_health_probe_mode: Optional[Union[str, ClusterServiceLoadBalancerHealthProbeMode]] + effective_outbound_i_ps: Optional[list[ResourceReference]] + enable_multiple_standard_load_balancers: Optional[bool] + idle_timeout_in_minutes: Optional[int] + managed_outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileManagedOutboundIPs] + outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileOutboundIPs] + outbound_ip_prefixes: Optional[ManagedClusterLoadBalancerProfileOutboundIPPrefixes] @overload def __init__( self, *, - properties: Optional[MaintenanceConfigurationProperties] = ... + allocated_outbound_ports: Optional[int] = ..., + backend_pool_type: Optional[Union[str, BackendPoolType]] = ..., + cluster_service_load_balancer_health_probe_mode: Optional[Union[str, ClusterServiceLoadBalancerHealthProbeMode]] = ..., + enable_multiple_standard_load_balancers: Optional[bool] = ..., + idle_timeout_in_minutes: Optional[int] = ..., + managed_outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileManagedOutboundIPs] = ..., + outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileOutboundIPs] = ..., + outbound_ip_prefixes: Optional[ManagedClusterLoadBalancerProfileOutboundIPPrefixes] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.containerservice.models.MaintenanceConfigurationProperties(_Model): - maintenance_window: Optional[MaintenanceWindow] - not_allowed_time: Optional[list[TimeSpan]] - time_in_week: Optional[list[TimeInWeek]] + class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs(_Model): + count: Optional[int] + count_ipv6: Optional[int] @overload def __init__( self, *, - maintenance_window: Optional[MaintenanceWindow] = ..., - not_allowed_time: Optional[list[TimeSpan]] = ..., - time_in_week: Optional[list[TimeInWeek]] = ... + count: Optional[int] = ..., + count_ipv6: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MaintenanceWindow(_Model): - duration_hours: int - not_allowed_dates: Optional[list[DateSpan]] - schedule: Schedule - start_date: Optional[date] - start_time: str - utc_offset: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_Model): + public_ip_prefixes: Optional[list[ResourceReference]] @overload def __init__( self, *, - duration_hours: int, - not_allowed_dates: Optional[list[DateSpan]] = ..., - schedule: Schedule, - start_date: Optional[date] = ..., - start_time: str, - utc_offset: Optional[str] = ... + public_ip_prefixes: Optional[list[ResourceReference]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedCluster(TrackedResource): - e_tag: Optional[str] - extended_location: Optional[ExtendedLocation] - id: str - identity: Optional[ManagedClusterIdentity] - kind: Optional[str] - location: str - name: str - properties: Optional[ManagedClusterProperties] - sku: Optional[ManagedClusterSKU] - system_data: SystemData - tags: dict[str, str] - type: str - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileOutboundIPs(_Model): + public_i_ps: Optional[list[ResourceReference]] @overload def __init__( self, *, - extended_location: Optional[ExtendedLocation] = ..., - identity: Optional[ManagedClusterIdentity] = ..., - kind: Optional[str] = ..., - location: str, - properties: Optional[ManagedClusterProperties] = ..., - sku: Optional[ManagedClusterSKU] = ..., - tags: Optional[dict[str, str]] = ... + public_i_ps: Optional[list[ResourceReference]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.containerservice.models.ManagedClusterAADProfile(_Model): - admin_group_object_i_ds: Optional[list[str]] - client_app_id: Optional[str] - enable_azure_rbac: Optional[bool] - managed: Optional[bool] - server_app_id: Optional[str] - server_app_secret: Optional[str] - tenant_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterManagedOutboundIPProfile(_Model): + count: Optional[int] + count_ipv6: Optional[int] @overload def __init__( self, *, - admin_group_object_i_ds: Optional[list[str]] = ..., - client_app_id: Optional[str] = ..., - enable_azure_rbac: Optional[bool] = ..., - managed: Optional[bool] = ..., - server_app_id: Optional[str] = ..., - server_app_secret: Optional[str] = ..., - tenant_id: Optional[str] = ... + count: Optional[int] = ..., + count_ipv6: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.ManagedClusterMetricsProfile(_Model): + cost_analysis: Optional[ManagedClusterCostAnalysis] @overload def __init__( self, *, - enabled: Optional[bool] = ... + cost_analysis: Optional[ManagedClusterCostAnalysis] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAPIServerAccessProfile(_Model): - authorized_ip_ranges: Optional[list[str]] - disable_run_command: Optional[bool] - enable_private_cluster: Optional[bool] - enable_private_cluster_public_fqdn: Optional[bool] - enable_vnet_integration: Optional[bool] - private_dns_zone: Optional[str] - subnet_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfile(_Model): + effective_outbound_i_ps: Optional[list[ResourceReference]] + idle_timeout_in_minutes: Optional[int] + managed_outbound_ip_profile: Optional[ManagedClusterManagedOutboundIPProfile] + outbound_i_ps: Optional[ManagedClusterNATGatewayProfileOutboundIPs] + outbound_ip_prefixes: Optional[ManagedClusterNATGatewayProfileOutboundIpPrefixes] + sku: Optional[Union[str, ManagedClusterNATGatewaySku]] @overload def __init__( self, *, - authorized_ip_ranges: Optional[list[str]] = ..., - disable_run_command: Optional[bool] = ..., - enable_private_cluster: Optional[bool] = ..., - enable_private_cluster_public_fqdn: Optional[bool] = ..., - enable_vnet_integration: Optional[bool] = ..., - private_dns_zone: Optional[str] = ..., - subnet_id: Optional[str] = ... + idle_timeout_in_minutes: Optional[int] = ..., + managed_outbound_ip_profile: Optional[ManagedClusterManagedOutboundIPProfile] = ..., + outbound_i_ps: Optional[ManagedClusterNATGatewayProfileOutboundIPs] = ..., + outbound_ip_prefixes: Optional[ManagedClusterNATGatewayProfileOutboundIpPrefixes] = ..., + sku: Optional[Union[str, ManagedClusterNATGatewaySku]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAccessProfile(TrackedResource): - id: str - location: str - name: str - properties: Optional[AccessProfile] - system_data: SystemData - tags: dict[str, str] - type: str - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIPs(_Model): + public_i_ps: Optional[list[str]] @overload def __init__( self, *, - location: str, - properties: Optional[AccessProfile] = ..., - tags: Optional[dict[str, str]] = ... + public_i_ps: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.containerservice.models.ManagedClusterAddonProfile(_Model): - config: Optional[dict[str, str]] - enabled: bool - identity: Optional[ManagedClusterAddonProfileIdentity] + class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIpPrefixes(_Model): + public_ip_prefixes: Optional[list[str]] @overload def __init__( self, *, - config: Optional[dict[str, str]] = ..., - enabled: bool + public_ip_prefixes: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAddonProfileIdentity(UserAssignedIdentity): - client_id: str - object_id: str - resource_id: str + class azure.mgmt.containerservice.models.ManagedClusterNATGatewaySku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + STANDARD = "Standard" + STANDARD_V2 = "StandardV2" + + + class azure.mgmt.containerservice.models.ManagedClusterNodeProvisioningProfile(_Model): + default_node_pools: Optional[Union[str, NodeProvisioningDefaultNodePools]] + mode: Optional[Union[str, NodeProvisioningMode]] @overload def __init__( self, *, - client_id: Optional[str] = ..., - object_id: Optional[str] = ..., - resource_id: Optional[str] = ... + default_node_pools: Optional[Union[str, NodeProvisioningDefaultNodePools]] = ..., + mode: Optional[Union[str, NodeProvisioningMode]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): - artifact_streaming_profile: AgentPoolArtifactStreamingProfile - availability_zones: list[str] - capacity_reservation_group_id: str - count: int - creation_data: CreationData - current_orchestrator_version: str - e_tag: str - enable_auto_scaling: bool - enable_encryption_at_host: bool - enable_fips: bool - enable_node_public_ip: bool - enable_ultra_ssd: bool - gateway_profile: AgentPoolGatewayProfile - gpu_instance_profile: Union[str, GPUInstanceProfile] - gpu_profile: GPUProfile - host_group_id: str - kubelet_config: KubeletConfig - kubelet_disk_type: Union[str, KubeletDiskType] - linux_os_config: LinuxOSConfig - local_dns_profile: LocalDNSProfile - max_count: int - max_pods: int - message_of_the_day: str - min_count: int - mode: Union[str, AgentPoolMode] - name: str - network_profile: AgentPoolNetworkProfile - node_image_version: str - node_labels: dict[str, str] - node_public_ip_prefix_id: str - node_taints: list[str] - orchestrator_version: str - os_disk_size_gb: int - os_disk_type: Union[str, OSDiskType] - os_sku: Union[str, azure.mgmt.containerservice.models.OSSKU] - os_type: Union[str, OSType] - pod_ip_allocation_mode: Union[str, PodIPAllocationMode] - pod_subnet_id: str - power_state: PowerState - provisioning_state: str - proximity_placement_group_id: str - scale_down_mode: Union[str, ScaleDownMode] - scale_set_eviction_policy: Union[str, ScaleSetEvictionPolicy] - scale_set_priority: Union[str, ScaleSetPriority] - security_profile: AgentPoolSecurityProfile - spot_max_price: float - status: AgentPoolStatus - tags: dict[str, str] - type: Union[str, AgentPoolType] - upgrade_settings: AgentPoolUpgradeSettings - virtual_machine_nodes_status: list[VirtualMachineNodes] - virtual_machines_profile: VirtualMachinesProfile - vm_size: str - vnet_subnet_id: str - windows_profile: AgentPoolWindowsProfile - workload_runtime: Union[str, WorkloadRuntime] + class azure.mgmt.containerservice.models.ManagedClusterNodeResourceGroupProfile(_Model): + restriction_level: Optional[Union[str, RestrictionLevel]] @overload def __init__( self, *, - artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., - availability_zones: Optional[list[str]] = ..., - capacity_reservation_group_id: Optional[str] = ..., - count: Optional[int] = ..., - creation_data: Optional[CreationData] = ..., - enable_auto_scaling: Optional[bool] = ..., - enable_encryption_at_host: Optional[bool] = ..., - enable_fips: Optional[bool] = ..., - enable_node_public_ip: Optional[bool] = ..., - enable_ultra_ssd: Optional[bool] = ..., - gateway_profile: Optional[AgentPoolGatewayProfile] = ..., - gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., - gpu_profile: Optional[GPUProfile] = ..., - host_group_id: Optional[str] = ..., - kubelet_config: Optional[KubeletConfig] = ..., - kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., - linux_os_config: Optional[LinuxOSConfig] = ..., - local_dns_profile: Optional[LocalDNSProfile] = ..., - max_count: Optional[int] = ..., - max_pods: Optional[int] = ..., - message_of_the_day: Optional[str] = ..., - min_count: Optional[int] = ..., - mode: Optional[Union[str, AgentPoolMode]] = ..., - name: str, - network_profile: Optional[AgentPoolNetworkProfile] = ..., - node_image_version: Optional[str] = ..., - node_labels: Optional[dict[str, str]] = ..., - node_public_ip_prefix_id: Optional[str] = ..., - node_taints: Optional[list[str]] = ..., - orchestrator_version: Optional[str] = ..., - os_disk_size_gb: Optional[int] = ..., - os_disk_type: Optional[Union[str, OSDiskType]] = ..., - os_sku: Optional[Union[str, _models.OSSKU]] = ..., - os_type: Optional[Union[str, OSType]] = ..., - pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., - pod_subnet_id: Optional[str] = ..., - power_state: Optional[PowerState] = ..., - proximity_placement_group_id: Optional[str] = ..., - scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., - scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., - scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., - security_profile: Optional[AgentPoolSecurityProfile] = ..., - spot_max_price: Optional[float] = ..., - status: Optional[AgentPoolStatus] = ..., - tags: Optional[dict[str, str]] = ..., - type: Optional[Union[str, AgentPoolType]] = ..., - upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., - virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., - virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., - vm_size: Optional[str] = ..., - vnet_subnet_id: Optional[str] = ..., - windows_profile: Optional[AgentPoolWindowsProfile] = ..., - workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... + restriction_level: Optional[Union[str, RestrictionLevel]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfileProperties(_Model): - artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] - availability_zones: Optional[list[str]] - capacity_reservation_group_id: Optional[str] - count: Optional[int] - creation_data: Optional[CreationData] - current_orchestrator_version: Optional[str] - e_tag: Optional[str] - enable_auto_scaling: Optional[bool] - enable_encryption_at_host: Optional[bool] - enable_fips: Optional[bool] - enable_node_public_ip: Optional[bool] - enable_ultra_ssd: Optional[bool] - gateway_profile: Optional[AgentPoolGatewayProfile] - gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] - gpu_profile: Optional[GPUProfile] - host_group_id: Optional[str] - kubelet_config: Optional[KubeletConfig] - kubelet_disk_type: Optional[Union[str, KubeletDiskType]] - linux_os_config: Optional[LinuxOSConfig] - local_dns_profile: Optional[LocalDNSProfile] - max_count: Optional[int] - max_pods: Optional[int] - message_of_the_day: Optional[str] - min_count: Optional[int] - mode: Optional[Union[str, AgentPoolMode]] - network_profile: Optional[AgentPoolNetworkProfile] - node_image_version: Optional[str] - node_labels: Optional[dict[str, str]] - node_public_ip_prefix_id: Optional[str] - node_taints: Optional[list[str]] - orchestrator_version: Optional[str] - os_disk_size_gb: Optional[int] - os_disk_type: Optional[Union[str, OSDiskType]] - os_sku: Optional[Union[str, _models.OSSKU]] - os_type: Optional[Union[str, OSType]] - pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] - pod_subnet_id: Optional[str] - power_state: Optional[PowerState] - provisioning_state: Optional[str] - proximity_placement_group_id: Optional[str] - scale_down_mode: Optional[Union[str, ScaleDownMode]] - scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] - scale_set_priority: Optional[Union[str, ScaleSetPriority]] - security_profile: Optional[AgentPoolSecurityProfile] - spot_max_price: Optional[float] - status: Optional[AgentPoolStatus] - tags: Optional[dict[str, str]] - type: Optional[Union[str, AgentPoolType]] - upgrade_settings: Optional[AgentPoolUpgradeSettings] - virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] - virtual_machines_profile: Optional[VirtualMachinesProfile] - vm_size: Optional[str] - vnet_subnet_id: Optional[str] - windows_profile: Optional[AgentPoolWindowsProfile] - workload_runtime: Optional[Union[str, WorkloadRuntime]] + class azure.mgmt.containerservice.models.ManagedClusterOIDCIssuerProfile(_Model): + enabled: Optional[bool] + issuer_url: Optional[str] @overload def __init__( self, *, - artifact_streaming_profile: Optional[AgentPoolArtifactStreamingProfile] = ..., - availability_zones: Optional[list[str]] = ..., - capacity_reservation_group_id: Optional[str] = ..., - count: Optional[int] = ..., - creation_data: Optional[CreationData] = ..., - enable_auto_scaling: Optional[bool] = ..., - enable_encryption_at_host: Optional[bool] = ..., - enable_fips: Optional[bool] = ..., - enable_node_public_ip: Optional[bool] = ..., - enable_ultra_ssd: Optional[bool] = ..., - gateway_profile: Optional[AgentPoolGatewayProfile] = ..., - gpu_instance_profile: Optional[Union[str, GPUInstanceProfile]] = ..., - gpu_profile: Optional[GPUProfile] = ..., - host_group_id: Optional[str] = ..., - kubelet_config: Optional[KubeletConfig] = ..., - kubelet_disk_type: Optional[Union[str, KubeletDiskType]] = ..., - linux_os_config: Optional[LinuxOSConfig] = ..., - local_dns_profile: Optional[LocalDNSProfile] = ..., - max_count: Optional[int] = ..., - max_pods: Optional[int] = ..., - message_of_the_day: Optional[str] = ..., - min_count: Optional[int] = ..., - mode: Optional[Union[str, AgentPoolMode]] = ..., - network_profile: Optional[AgentPoolNetworkProfile] = ..., - node_image_version: Optional[str] = ..., - node_labels: Optional[dict[str, str]] = ..., - node_public_ip_prefix_id: Optional[str] = ..., - node_taints: Optional[list[str]] = ..., - orchestrator_version: Optional[str] = ..., - os_disk_size_gb: Optional[int] = ..., - os_disk_type: Optional[Union[str, OSDiskType]] = ..., - os_sku: Optional[Union[str, _models.OSSKU]] = ..., - os_type: Optional[Union[str, OSType]] = ..., - pod_ip_allocation_mode: Optional[Union[str, PodIPAllocationMode]] = ..., - pod_subnet_id: Optional[str] = ..., - power_state: Optional[PowerState] = ..., - proximity_placement_group_id: Optional[str] = ..., - scale_down_mode: Optional[Union[str, ScaleDownMode]] = ..., - scale_set_eviction_policy: Optional[Union[str, ScaleSetEvictionPolicy]] = ..., - scale_set_priority: Optional[Union[str, ScaleSetPriority]] = ..., - security_profile: Optional[AgentPoolSecurityProfile] = ..., - spot_max_price: Optional[float] = ..., - status: Optional[AgentPoolStatus] = ..., - tags: Optional[dict[str, str]] = ..., - type: Optional[Union[str, AgentPoolType]] = ..., - upgrade_settings: Optional[AgentPoolUpgradeSettings] = ..., - virtual_machine_nodes_status: Optional[list[VirtualMachineNodes]] = ..., - virtual_machines_profile: Optional[VirtualMachinesProfile] = ..., - vm_size: Optional[str] = ..., - vnet_subnet_id: Optional[str] = ..., - windows_profile: Optional[AgentPoolWindowsProfile] = ..., - workload_runtime: Optional[Union[str, WorkloadRuntime]] = ... + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ManagedClusterPodIdentity(_Model): + binding_selector: Optional[str] + identity: UserAssignedIdentity + name: str + namespace: str + provisioning_info: Optional[ManagedClusterPodIdentityProvisioningInfo] + provisioning_state: Optional[Union[str, ManagedClusterPodIdentityProvisioningState]] + + @overload + def __init__( + self, + *, + binding_selector: Optional[str] = ..., + identity: UserAssignedIdentity, + name: str, + namespace: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAppRoutingIstio(_Model): - mode: Optional[Union[str, GatewayAPIIstioEnabled]] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityException(_Model): + name: str + namespace: str + pod_labels: dict[str, str] @overload def __init__( self, *, - mode: Optional[Union[str, GatewayAPIIstioEnabled]] = ... + name: str, + namespace: str, + pod_labels: dict[str, str] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAutoUpgradeProfile(_Model): - node_os_upgrade_channel: Optional[Union[str, NodeOSUpgradeChannel]] - upgrade_channel: Optional[Union[str, UpgradeChannel]] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProfile(_Model): + allow_network_plugin_kubenet: Optional[bool] + enabled: Optional[bool] + user_assigned_identities: Optional[list[ManagedClusterPodIdentity]] + user_assigned_identity_exceptions: Optional[list[ManagedClusterPodIdentityException]] @overload def __init__( self, *, - node_os_upgrade_channel: Optional[Union[str, NodeOSUpgradeChannel]] = ..., - upgrade_channel: Optional[Union[str, UpgradeChannel]] = ... + allow_network_plugin_kubenet: Optional[bool] = ..., + enabled: Optional[bool] = ..., + user_assigned_identities: Optional[list[ManagedClusterPodIdentity]] = ..., + user_assigned_identity_exceptions: Optional[list[ManagedClusterPodIdentityException]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile(_Model): - app_monitoring: Optional[ManagedClusterAzureMonitorProfileAppMonitoring] - container_insights: Optional[ManagedClusterAzureMonitorProfileContainerInsights] - metrics: Optional[ManagedClusterAzureMonitorProfileMetrics] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningError(_Model): + error: Optional[ManagedClusterPodIdentityProvisioningErrorBody] @overload def __init__( self, *, - app_monitoring: Optional[ManagedClusterAzureMonitorProfileAppMonitoring] = ..., - container_insights: Optional[ManagedClusterAzureMonitorProfileContainerInsights] = ..., - metrics: Optional[ManagedClusterAzureMonitorProfileMetrics] = ... + error: Optional[ManagedClusterPodIdentityProvisioningErrorBody] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring(_Model): - auto_instrumentation: Optional[ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation] - open_telemetry_logs_and_traces: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces] - open_telemetry_metrics: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningErrorBody(_Model): + code: Optional[str] + details: Optional[list[ManagedClusterPodIdentityProvisioningErrorBody]] + message: Optional[str] + target: Optional[str] @overload def __init__( self, *, - auto_instrumentation: Optional[ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation] = ..., - open_telemetry_logs_and_traces: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces] = ..., - open_telemetry_metrics: Optional[ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics] = ... + code: Optional[str] = ..., + details: Optional[list[ManagedClusterPodIdentityProvisioningErrorBody]] = ..., + message: Optional[str] = ..., + target: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningInfo(_Model): + error: Optional[ManagedClusterPodIdentityProvisioningError] @overload def __init__( self, *, - enabled: Optional[bool] = ... + error: Optional[ManagedClusterPodIdentityProvisioningError] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces(_Model): - enabled: Optional[bool] - grpc_port: Optional[int] - http_port: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ASSIGNED = "Assigned" + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile(_Model): + components_by_releases: Optional[list[ComponentsByRelease]] + kubernetes_version: str + name: Optional[str] + os_type: Union[str, OSType] + upgrades: Optional[list[ManagedClusterPoolUpgradeProfileUpgradesItem]] @overload def __init__( self, *, - enabled: Optional[bool] = ..., - grpc_port: Optional[int] = ..., - http_port: Optional[int] = ... + components_by_releases: Optional[list[ComponentsByRelease]] = ..., + kubernetes_version: str, + name: Optional[str] = ..., + os_type: Union[str, OSType], + upgrades: Optional[list[ManagedClusterPoolUpgradeProfileUpgradesItem]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(_Model): - enabled: Optional[bool] - grpc_port: Optional[int] - http_port: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem(_Model): + is_out_of_support: Optional[bool] + is_preview: Optional[bool] + kubernetes_version: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ..., - grpc_port: Optional[int] = ..., - http_port: Optional[int] = ... + is_out_of_support: Optional[bool] = ..., + is_preview: Optional[bool] = ..., + kubernetes_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ManagedClusterProperties(_Model): + aad_profile: Optional[ManagedClusterAADProfile] + addon_profiles: Optional[dict[str, ManagedClusterAddonProfile]] + agent_pool_profiles: Optional[list[ManagedClusterAgentPoolProfile]] + ai_toolchain_operator_profile: Optional[ManagedClusterAIToolchainOperatorProfile] + api_server_access_profile: Optional[ManagedClusterAPIServerAccessProfile] + auto_scaler_profile: Optional[ManagedClusterPropertiesAutoScalerProfile] + auto_upgrade_profile: Optional[ManagedClusterAutoUpgradeProfile] + azure_monitor_profile: Optional[ManagedClusterAzureMonitorProfile] + azure_portal_fqdn: Optional[str] + bootstrap_profile: Optional[ManagedClusterBootstrapProfile] + control_plane_scaling_profile: Optional[ManagedClusterControlPlaneScalingProfile] + creation_data: Optional[CreationData] + current_kubernetes_version: Optional[str] + disable_local_accounts: Optional[bool] + disk_encryption_set_id: Optional[str] + dns_prefix: Optional[str] + enable_fips: Optional[bool] + enable_namespace_resources: Optional[bool] + enable_node_hardening: Optional[bool] + enable_rbac: Optional[bool] + fqdn: Optional[str] + fqdn_subdomain: Optional[str] + health_monitor_profile: Optional[ManagedClusterHealthMonitorProfile] + hosted_system_profile: Optional[ManagedClusterHostedSystemProfile] + http_proxy_config: Optional[ManagedClusterHTTPProxyConfig] + identity_profile: Optional[dict[str, UserAssignedIdentity]] + ingress_profile: Optional[ManagedClusterIngressProfile] + kubernetes_version: Optional[str] + linux_profile: Optional[ContainerServiceLinuxProfile] + max_agent_pools: Optional[int] + metrics_profile: Optional[ManagedClusterMetricsProfile] + network_profile: Optional[ContainerServiceNetworkProfile] + node_disruption_profile: Optional[NodeDisruptionProfile] + node_provisioning_profile: Optional[ManagedClusterNodeProvisioningProfile] + node_resource_group: Optional[str] + node_resource_group_profile: Optional[ManagedClusterNodeResourceGroupProfile] + oidc_issuer_profile: Optional[ManagedClusterOIDCIssuerProfile] + pod_identity_profile: Optional[ManagedClusterPodIdentityProfile] + power_state: Optional[PowerState] + private_fqdn: Optional[str] + private_link_resources: Optional[list[PrivateLinkResource]] + provisioning_state: Optional[str] + public_network_access: Optional[Union[str, PublicNetworkAccess]] + resource_uid: Optional[str] + scheduler_profile: Optional[SchedulerProfile] + security_profile: Optional[ManagedClusterSecurityProfile] + service_mesh_profile: Optional[ServiceMeshProfile] + service_principal_profile: Optional[ManagedClusterServicePrincipalProfile] + status: Optional[ManagedClusterStatus] + storage_profile: Optional[ManagedClusterStorageProfile] + support_plan: Optional[Union[str, KubernetesSupportPlan]] + upgrade_settings: Optional[ClusterUpgradeSettings] + windows_profile: Optional[ManagedClusterWindowsProfile] + workload_auto_scaler_profile: Optional[ManagedClusterWorkloadAutoScalerProfile] + + @overload + def __init__( + self, + *, + aad_profile: Optional[ManagedClusterAADProfile] = ..., + addon_profiles: Optional[dict[str, ManagedClusterAddonProfile]] = ..., + agent_pool_profiles: Optional[list[ManagedClusterAgentPoolProfile]] = ..., + ai_toolchain_operator_profile: Optional[ManagedClusterAIToolchainOperatorProfile] = ..., + api_server_access_profile: Optional[ManagedClusterAPIServerAccessProfile] = ..., + auto_scaler_profile: Optional[ManagedClusterPropertiesAutoScalerProfile] = ..., + auto_upgrade_profile: Optional[ManagedClusterAutoUpgradeProfile] = ..., + azure_monitor_profile: Optional[ManagedClusterAzureMonitorProfile] = ..., + bootstrap_profile: Optional[ManagedClusterBootstrapProfile] = ..., + control_plane_scaling_profile: Optional[ManagedClusterControlPlaneScalingProfile] = ..., + creation_data: Optional[CreationData] = ..., + disable_local_accounts: Optional[bool] = ..., + disk_encryption_set_id: Optional[str] = ..., + dns_prefix: Optional[str] = ..., + enable_fips: Optional[bool] = ..., + enable_namespace_resources: Optional[bool] = ..., + enable_node_hardening: Optional[bool] = ..., + enable_rbac: Optional[bool] = ..., + fqdn_subdomain: Optional[str] = ..., + health_monitor_profile: Optional[ManagedClusterHealthMonitorProfile] = ..., + hosted_system_profile: Optional[ManagedClusterHostedSystemProfile] = ..., + http_proxy_config: Optional[ManagedClusterHTTPProxyConfig] = ..., + identity_profile: Optional[dict[str, UserAssignedIdentity]] = ..., + ingress_profile: Optional[ManagedClusterIngressProfile] = ..., + kubernetes_version: Optional[str] = ..., + linux_profile: Optional[ContainerServiceLinuxProfile] = ..., + metrics_profile: Optional[ManagedClusterMetricsProfile] = ..., + network_profile: Optional[ContainerServiceNetworkProfile] = ..., + node_disruption_profile: Optional[NodeDisruptionProfile] = ..., + node_provisioning_profile: Optional[ManagedClusterNodeProvisioningProfile] = ..., + node_resource_group: Optional[str] = ..., + node_resource_group_profile: Optional[ManagedClusterNodeResourceGroupProfile] = ..., + oidc_issuer_profile: Optional[ManagedClusterOIDCIssuerProfile] = ..., + pod_identity_profile: Optional[ManagedClusterPodIdentityProfile] = ..., + private_link_resources: Optional[list[PrivateLinkResource]] = ..., + public_network_access: Optional[Union[str, PublicNetworkAccess]] = ..., + scheduler_profile: Optional[SchedulerProfile] = ..., + security_profile: Optional[ManagedClusterSecurityProfile] = ..., + service_mesh_profile: Optional[ServiceMeshProfile] = ..., + service_principal_profile: Optional[ManagedClusterServicePrincipalProfile] = ..., + status: Optional[ManagedClusterStatus] = ..., + storage_profile: Optional[ManagedClusterStorageProfile] = ..., + support_plan: Optional[Union[str, KubernetesSupportPlan]] = ..., + upgrade_settings: Optional[ClusterUpgradeSettings] = ..., + windows_profile: Optional[ManagedClusterWindowsProfile] = ..., + workload_auto_scaler_profile: Optional[ManagedClusterWorkloadAutoScalerProfile] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ManagedClusterPropertiesAutoScalerProfile(_Model): + balance_similar_node_groups: Optional[str] + daemonset_eviction_for_empty_nodes: Optional[bool] + daemonset_eviction_for_occupied_nodes: Optional[bool] + expander: Optional[Union[str, Expander]] + ignore_daemonsets_utilization: Optional[bool] + max_empty_bulk_delete: Optional[str] + max_graceful_termination_sec: Optional[str] + max_node_provision_time: Optional[str] + max_total_unready_percentage: Optional[str] + new_pod_scale_up_delay: Optional[str] + ok_total_unready_count: Optional[str] + scale_down_delay_after_add: Optional[str] + scale_down_delay_after_delete: Optional[str] + scale_down_delay_after_failure: Optional[str] + scale_down_unneeded_time: Optional[str] + scale_down_unready_time: Optional[str] + scale_down_utilization_threshold: Optional[str] + scan_interval: Optional[str] + skip_nodes_with_local_storage: Optional[str] + skip_nodes_with_system_pods: Optional[str] + + @overload + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = ..., + daemonset_eviction_for_empty_nodes: Optional[bool] = ..., + daemonset_eviction_for_occupied_nodes: Optional[bool] = ..., + expander: Optional[Union[str, Expander]] = ..., + ignore_daemonsets_utilization: Optional[bool] = ..., + max_empty_bulk_delete: Optional[str] = ..., + max_graceful_termination_sec: Optional[str] = ..., + max_node_provision_time: Optional[str] = ..., + max_total_unready_percentage: Optional[str] = ..., + new_pod_scale_up_delay: Optional[str] = ..., + ok_total_unready_count: Optional[str] = ..., + scale_down_delay_after_add: Optional[str] = ..., + scale_down_delay_after_delete: Optional[str] = ..., + scale_down_delay_after_failure: Optional[str] = ..., + scale_down_unneeded_time: Optional[str] = ..., + scale_down_unready_time: Optional[str] = ..., + scale_down_utilization_threshold: Optional[str] = ..., + scan_interval: Optional[str] = ..., + skip_nodes_with_local_storage: Optional[str] = ..., + skip_nodes_with_system_pods: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights(_Model): - container_network_logs: Optional[Union[str, ContainerNetworkLogs]] - disable_prometheus_metrics_scraping: Optional[bool] - enabled: Optional[bool] - log_analytics_workspace_resource_id: Optional[str] - syslog_port: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterPropertiesForSnapshot(_Model): + enable_rbac: Optional[bool] + kubernetes_version: Optional[str] + network_profile: Optional[NetworkProfileForSnapshot] + sku: Optional[ManagedClusterSKU] + + + class azure.mgmt.containerservice.models.ManagedClusterSKU(_Model): + name: Optional[Union[str, ManagedClusterSKUName]] + tier: Optional[Union[str, ManagedClusterSKUTier]] @overload def __init__( self, *, - container_network_logs: Optional[Union[str, ContainerNetworkLogs]] = ..., - disable_prometheus_metrics_scraping: Optional[bool] = ..., - enabled: Optional[bool] = ..., - log_analytics_workspace_resource_id: Optional[str] = ..., - syslog_port: Optional[int] = ... + name: Optional[Union[str, ManagedClusterSKUName]] = ..., + tier: Optional[Union[str, ManagedClusterSKUTier]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics(_Model): - metric_annotations_allow_list: Optional[str] - metric_labels_allowlist: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterSKUName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC = "Automatic" + BASE = "Base" + + + class azure.mgmt.containerservice.models.ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FREE = "Free" + PREMIUM = "Premium" + STANDARD = "Standard" + + + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfile(_Model): + azure_key_vault_kms: Optional[AzureKeyVaultKms] + custom_ca_trust_certificates: Optional[list[bytes]] + defender: Optional[ManagedClusterSecurityProfileDefender] + image_cleaner: Optional[ManagedClusterSecurityProfileImageCleaner] + image_integrity: Optional[ManagedClusterSecurityProfileImageIntegrity] + kubernetes_resource_object_encryption_profile: Optional[KubernetesResourceObjectEncryptionProfile] + node_restriction: Optional[ManagedClusterSecurityProfileNodeRestriction] + service_account_image_pull_profile: Optional[ServiceAccountImagePullProfile] + workload_identity: Optional[ManagedClusterSecurityProfileWorkloadIdentity] @overload def __init__( self, *, - metric_annotations_allow_list: Optional[str] = ..., - metric_labels_allowlist: Optional[str] = ... + azure_key_vault_kms: Optional[AzureKeyVaultKms] = ..., + custom_ca_trust_certificates: Optional[list[bytes]] = ..., + defender: Optional[ManagedClusterSecurityProfileDefender] = ..., + image_cleaner: Optional[ManagedClusterSecurityProfileImageCleaner] = ..., + image_integrity: Optional[ManagedClusterSecurityProfileImageIntegrity] = ..., + kubernetes_resource_object_encryption_profile: Optional[KubernetesResourceObjectEncryptionProfile] = ..., + node_restriction: Optional[ManagedClusterSecurityProfileNodeRestriction] = ..., + service_account_image_pull_profile: Optional[ServiceAccountImagePullProfile] = ..., + workload_identity: Optional[ManagedClusterSecurityProfileWorkloadIdentity] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics(_Model): - control_plane: Optional[ManagedClusterAzureMonitorProfileMetricsControlPlane] - enabled: bool - kube_state_metrics: Optional[ManagedClusterAzureMonitorProfileKubeStateMetrics] + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefender(_Model): + log_analytics_workspace_resource_id: Optional[str] + security_gating: Optional[ManagedClusterSecurityProfileDefenderSecurityGating] + security_monitoring: Optional[ManagedClusterSecurityProfileDefenderSecurityMonitoring] @overload def __init__( self, *, - control_plane: Optional[ManagedClusterAzureMonitorProfileMetricsControlPlane] = ..., - enabled: bool, - kube_state_metrics: Optional[ManagedClusterAzureMonitorProfileKubeStateMetrics] = ... + log_analytics_workspace_resource_id: Optional[str] = ..., + security_gating: Optional[ManagedClusterSecurityProfileDefenderSecurityGating] = ..., + security_monitoring: Optional[ManagedClusterSecurityProfileDefenderSecurityMonitoring] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetricsControlPlane(_Model): + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating(_Model): + allow_secret_access: Optional[bool] enabled: Optional[bool] + identities: Optional[list[ManagedClusterSecurityProfileDefenderSecurityGatingIdentity]] @overload def __init__( self, *, - enabled: Optional[bool] = ... + allow_secret_access: Optional[bool] = ..., + enabled: Optional[bool] = ..., + identities: Optional[list[ManagedClusterSecurityProfileDefenderSecurityGatingIdentity]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile(_Model): - artifact_source: Optional[Union[str, ArtifactSource]] - container_registry_id: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentity(_Model): + azure_container_registry: Optional[str] + identity: Optional[UserAssignedIdentity] @overload def __init__( self, *, - artifact_source: Optional[Union[str, ArtifactSource]] = ..., - container_registry_id: Optional[str] = ... + azure_container_registry: Optional[str] = ..., + identity: Optional[UserAssignedIdentity] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterCostAnalysis(_Model): + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring(_Model): enabled: Optional[bool] @overload @@ -3340,895 +6018,953 @@ namespace azure.mgmt.containerservice.models def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterHTTPProxyConfig(_Model): + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner(_Model): enabled: Optional[bool] - http_proxy: Optional[str] - https_proxy: Optional[str] - no_proxy: Optional[list[str]] - trusted_ca: Optional[str] + interval_hours: Optional[int] @overload def __init__( self, *, enabled: Optional[bool] = ..., - http_proxy: Optional[str] = ..., - https_proxy: Optional[str] = ..., - no_proxy: Optional[list[str]] = ..., - trusted_ca: Optional[str] = ... + interval_hours: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile(_Model): + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity(_Model): enabled: Optional[bool] - node_subnet_id: Optional[str] - system_node_subnet_id: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ..., - node_subnet_id: Optional[str] = ..., - system_node_subnet_id: Optional[str] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterIdentity(_Model): - delegated_resources: Optional[dict[str, DelegatedResource]] - principal_id: Optional[str] - tenant_id: Optional[str] - type: Optional[Union[str, ResourceIdentityType]] - user_assigned_identities: Optional[dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue]] + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - delegated_resources: Optional[dict[str, DelegatedResource]] = ..., - type: Optional[Union[str, ResourceIdentityType]] = ..., - user_assigned_identities: Optional[dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue]] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterIngressProfile(_Model): - gateway_api: Optional[ManagedClusterIngressProfileGatewayConfiguration] - web_app_routing: Optional[ManagedClusterIngressProfileWebAppRouting] + class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - gateway_api: Optional[ManagedClusterIngressProfileGatewayConfiguration] = ..., - web_app_routing: Optional[ManagedClusterIngressProfileWebAppRouting] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration(_Model): - installation: Optional[Union[str, ManagedGatewayType]] + class azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile(_Model): + client_id: str + secret: Optional[str] @overload def __init__( self, *, - installation: Optional[Union[str, ManagedGatewayType]] = ... + client_id: str, + secret: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx(_Model): - default_ingress_controller_type: Optional[Union[str, NginxIngressControllerType]] + class azure.mgmt.containerservice.models.ManagedClusterSnapshot(TrackedResource): + id: str + location: str + name: str + properties: Optional[ManagedClusterSnapshotProperties] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - default_ingress_controller_type: Optional[Union[str, NginxIngressControllerType]] = ... + location: str, + properties: Optional[ManagedClusterSnapshotProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting(_Model): - dns_zone_resource_ids: Optional[list[str]] - enabled: Optional[bool] - gateway_api_implementations: Optional[ManagedClusterWebAppRoutingGatewayAPIImplementations] - identity: Optional[UserAssignedIdentity] - nginx: Optional[ManagedClusterIngressProfileNginx] + + class azure.mgmt.containerservice.models.ManagedClusterSnapshotProperties(_Model): + creation_data: Optional[CreationData] + managed_cluster_properties_read_only: Optional[ManagedClusterPropertiesForSnapshot] + snapshot_type: Optional[Union[str, SnapshotType]] @overload def __init__( self, *, - dns_zone_resource_ids: Optional[list[str]] = ..., - enabled: Optional[bool] = ..., - gateway_api_implementations: Optional[ManagedClusterWebAppRoutingGatewayAPIImplementations] = ..., - nginx: Optional[ManagedClusterIngressProfileNginx] = ... + creation_data: Optional[CreationData] = ..., + snapshot_type: Optional[Union[str, SnapshotType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfile(_Model): - allocated_outbound_ports: Optional[int] - backend_pool_type: Optional[Union[str, BackendPoolType]] - effective_outbound_i_ps: Optional[list[ResourceReference]] - enable_multiple_standard_load_balancers: Optional[bool] - idle_timeout_in_minutes: Optional[int] - managed_outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileManagedOutboundIPs] - outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileOutboundIPs] - outbound_ip_prefixes: Optional[ManagedClusterLoadBalancerProfileOutboundIPPrefixes] + class azure.mgmt.containerservice.models.ManagedClusterStaticEgressGatewayProfile(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - allocated_outbound_ports: Optional[int] = ..., - backend_pool_type: Optional[Union[str, BackendPoolType]] = ..., - enable_multiple_standard_load_balancers: Optional[bool] = ..., - idle_timeout_in_minutes: Optional[int] = ..., - managed_outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileManagedOutboundIPs] = ..., - outbound_i_ps: Optional[ManagedClusterLoadBalancerProfileOutboundIPs] = ..., - outbound_ip_prefixes: Optional[ManagedClusterLoadBalancerProfileOutboundIPPrefixes] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs(_Model): - count: Optional[int] - count_ipv6: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterStatus(_Model): + provisioning_error: Optional[ErrorDetail] + + + class azure.mgmt.containerservice.models.ManagedClusterStorageProfile(_Model): + blob_csi_driver: Optional[ManagedClusterStorageProfileBlobCSIDriver] + disk_csi_driver: Optional[ManagedClusterStorageProfileDiskCSIDriver] + file_csi_driver: Optional[ManagedClusterStorageProfileFileCSIDriver] + snapshot_controller: Optional[ManagedClusterStorageProfileSnapshotController] @overload def __init__( self, *, - count: Optional[int] = ..., - count_ipv6: Optional[int] = ... + blob_csi_driver: Optional[ManagedClusterStorageProfileBlobCSIDriver] = ..., + disk_csi_driver: Optional[ManagedClusterStorageProfileDiskCSIDriver] = ..., + file_csi_driver: Optional[ManagedClusterStorageProfileFileCSIDriver] = ..., + snapshot_controller: Optional[ManagedClusterStorageProfileSnapshotController] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_Model): - public_ip_prefixes: Optional[list[ResourceReference]] + class azure.mgmt.containerservice.models.ManagedClusterStorageProfileBlobCSIDriver(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - public_ip_prefixes: Optional[list[ResourceReference]] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfileOutboundIPs(_Model): - public_i_ps: Optional[list[ResourceReference]] + class azure.mgmt.containerservice.models.ManagedClusterStorageProfileDiskCSIDriver(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - public_i_ps: Optional[list[ResourceReference]] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterManagedOutboundIPProfile(_Model): - count: Optional[int] - count_ipv6: Optional[int] + class azure.mgmt.containerservice.models.ManagedClusterStorageProfileFileCSIDriver(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - count: Optional[int] = ..., - count_ipv6: Optional[int] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterMetricsProfile(_Model): - cost_analysis: Optional[ManagedClusterCostAnalysis] + class azure.mgmt.containerservice.models.ManagedClusterStorageProfileSnapshotController(_Model): + enabled: Optional[bool] @overload def __init__( self, *, - cost_analysis: Optional[ManagedClusterCostAnalysis] = ... + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfile(_Model): - effective_outbound_i_ps: Optional[list[ResourceReference]] - idle_timeout_in_minutes: Optional[int] - managed_outbound_ip_profile: Optional[ManagedClusterManagedOutboundIPProfile] - outbound_i_ps: Optional[ManagedClusterNATGatewayProfileOutboundIPs] - outbound_ip_prefixes: Optional[ManagedClusterNATGatewayProfileOutboundIpPrefixes] - sku: Optional[Union[str, ManagedClusterNATGatewaySku]] + class azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile(ProxyResource): + id: str + name: str + properties: ManagedClusterUpgradeProfileProperties + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - idle_timeout_in_minutes: Optional[int] = ..., - managed_outbound_ip_profile: Optional[ManagedClusterManagedOutboundIPProfile] = ..., - outbound_i_ps: Optional[ManagedClusterNATGatewayProfileOutboundIPs] = ..., - outbound_ip_prefixes: Optional[ManagedClusterNATGatewayProfileOutboundIpPrefixes] = ..., - sku: Optional[Union[str, ManagedClusterNATGatewaySku]] = ... + properties: ManagedClusterUpgradeProfileProperties ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIPs(_Model): - public_i_ps: Optional[list[str]] + + class azure.mgmt.containerservice.models.ManagedClusterUpgradeProfileProperties(_Model): + agent_pool_profiles: list[ManagedClusterPoolUpgradeProfile] + control_plane_profile: ManagedClusterPoolUpgradeProfile @overload def __init__( self, *, - public_i_ps: Optional[list[str]] = ... + agent_pool_profiles: list[ManagedClusterPoolUpgradeProfile], + control_plane_profile: ManagedClusterPoolUpgradeProfile ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIpPrefixes(_Model): - public_ip_prefixes: Optional[list[str]] + class azure.mgmt.containerservice.models.ManagedClusterWebAppRoutingGatewayAPIImplementations(_Model): + app_routing_istio: Optional[ManagedClusterAppRoutingIstio] @overload def __init__( self, *, - public_ip_prefixes: Optional[list[str]] = ... + app_routing_istio: Optional[ManagedClusterAppRoutingIstio] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterNATGatewaySku(str, Enum, metaclass=CaseInsensitiveEnumMeta): - STANDARD = "Standard" - STANDARD_V2 = "StandardV2" - - - class azure.mgmt.containerservice.models.ManagedClusterNodeProvisioningProfile(_Model): - default_node_pools: Optional[Union[str, NodeProvisioningDefaultNodePools]] - mode: Optional[Union[str, NodeProvisioningMode]] + class azure.mgmt.containerservice.models.ManagedClusterWindowsProfile(_Model): + admin_password: Optional[str] + admin_username: str + enable_csi_proxy: Optional[bool] + gmsa_profile: Optional[WindowsGmsaProfile] + license_type: Optional[Union[str, LicenseType]] @overload def __init__( self, *, - default_node_pools: Optional[Union[str, NodeProvisioningDefaultNodePools]] = ..., - mode: Optional[Union[str, NodeProvisioningMode]] = ... + admin_password: Optional[str] = ..., + admin_username: str, + enable_csi_proxy: Optional[bool] = ..., + gmsa_profile: Optional[WindowsGmsaProfile] = ..., + license_type: Optional[Union[str, LicenseType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterNodeResourceGroupProfile(_Model): - restriction_level: Optional[Union[str, RestrictionLevel]] + class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfile(_Model): + keda: Optional[ManagedClusterWorkloadAutoScalerProfileKeda] + vertical_pod_autoscaler: Optional[ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler] @overload def __init__( self, *, - restriction_level: Optional[Union[str, RestrictionLevel]] = ... + keda: Optional[ManagedClusterWorkloadAutoScalerProfileKeda] = ..., + vertical_pod_autoscaler: Optional[ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterOIDCIssuerProfile(_Model): - enabled: Optional[bool] - issuer_url: Optional[str] + class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileKeda(_Model): + enabled: bool @overload def __init__( self, *, - enabled: Optional[bool] = ... + enabled: bool ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentity(_Model): - binding_selector: Optional[str] - identity: UserAssignedIdentity - name: str - namespace: str - provisioning_info: Optional[ManagedClusterPodIdentityProvisioningInfo] - provisioning_state: Optional[Union[str, ManagedClusterPodIdentityProvisioningState]] + class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(_Model): + addon_autoscaling: Optional[Union[str, AddonAutoscaling]] + enabled: bool @overload def __init__( self, *, - binding_selector: Optional[str] = ..., - identity: UserAssignedIdentity, - name: str, - namespace: str + addon_autoscaling: Optional[Union[str, AddonAutoscaling]] = ..., + enabled: bool ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityException(_Model): + class azure.mgmt.containerservice.models.ManagedGatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + STANDARD = "Standard" + + + class azure.mgmt.containerservice.models.ManagedNamespace(TrackedResource): + e_tag: Optional[str] + id: str + location: str name: str - namespace: str - pod_labels: dict[str, str] + properties: Optional[NamespaceProperties] + system_data: SystemData + tags: dict[str, str] + type: str @overload def __init__( self, *, - name: str, - namespace: str, - pod_labels: dict[str, str] + location: str, + properties: Optional[NamespaceProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProfile(_Model): - allow_network_plugin_kubenet: Optional[bool] - enabled: Optional[bool] - user_assigned_identities: Optional[list[ManagedClusterPodIdentity]] - user_assigned_identity_exceptions: Optional[list[ManagedClusterPodIdentityException]] + class azure.mgmt.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue(_Model): + client_id: Optional[str] + principal_id: Optional[str] + + + class azure.mgmt.containerservice.models.ManagementMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MANAGED = "Managed" + UNMANAGED = "Unmanaged" + + + class azure.mgmt.containerservice.models.ManualScaleProfile(_Model): + count: Optional[int] + size: Optional[str] @overload def __init__( self, *, - allow_network_plugin_kubenet: Optional[bool] = ..., - enabled: Optional[bool] = ..., - user_assigned_identities: Optional[list[ManagedClusterPodIdentity]] = ..., - user_assigned_identity_exceptions: Optional[list[ManagedClusterPodIdentityException]] = ... + count: Optional[int] = ..., + size: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningError(_Model): - error: Optional[ManagedClusterPodIdentityProvisioningErrorBody] + class azure.mgmt.containerservice.models.MeshMembership(ProxyResource): + e_tag: Optional[str] + id: str + managed_by: Optional[str] + name: str + properties: Optional[MeshMembershipProperties] + system_data: SystemData + type: str @overload def __init__( self, *, - error: Optional[ManagedClusterPodIdentityProvisioningErrorBody] = ... + managed_by: Optional[str] = ..., + properties: Optional[MeshMembershipProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningErrorBody(_Model): - code: Optional[str] - details: Optional[list[ManagedClusterPodIdentityProvisioningErrorBody]] - message: Optional[str] - target: Optional[str] + class azure.mgmt.containerservice.models.MeshMembershipPrivateConnectProfile(_Model): + private_ip_address: Optional[str] + subnet_resource_id: Optional[str] @overload def __init__( self, *, - code: Optional[str] = ..., - details: Optional[list[ManagedClusterPodIdentityProvisioningErrorBody]] = ..., - message: Optional[str] = ..., - target: Optional[str] = ... + subnet_resource_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningInfo(_Model): - error: Optional[ManagedClusterPodIdentityProvisioningError] + class azure.mgmt.containerservice.models.MeshMembershipProperties(_Model): + managed_mesh_id: str + private_connect_profile: Optional[MeshMembershipPrivateConnectProfile] + provisioning_state: Optional[Union[str, MeshMembershipProvisioningState]] @overload def __init__( self, *, - error: Optional[ManagedClusterPodIdentityProvisioningError] = ... + managed_mesh_id: str, + private_connect_profile: Optional[MeshMembershipPrivateConnectProfile] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ASSIGNED = "Assigned" + class azure.mgmt.containerservice.models.MeshMembershipProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): CANCELED = "Canceled" + CREATING = "Creating" DELETING = "Deleting" FAILED = "Failed" SUCCEEDED = "Succeeded" UPDATING = "Updating" - class azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile(_Model): - kubernetes_version: str - name: Optional[str] - os_type: Union[str, OSType] - upgrades: Optional[list[ManagedClusterPoolUpgradeProfileUpgradesItem]] - - @overload - def __init__( - self, - *, - kubernetes_version: str, - name: Optional[str] = ..., - os_type: Union[str, OSType], - upgrades: Optional[list[ManagedClusterPoolUpgradeProfileUpgradesItem]] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem(_Model): - is_preview: Optional[bool] - kubernetes_version: Optional[str] + class azure.mgmt.containerservice.models.MeshRevision(_Model): + compatible_with: Optional[list[CompatibleVersions]] + revision: Optional[str] + upgrades: Optional[list[str]] @overload def __init__( self, *, - is_preview: Optional[bool] = ..., - kubernetes_version: Optional[str] = ... + compatible_with: Optional[list[CompatibleVersions]] = ..., + revision: Optional[str] = ..., + upgrades: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.containerservice.models.ManagedClusterProperties(_Model): - aad_profile: Optional[ManagedClusterAADProfile] - addon_profiles: Optional[dict[str, ManagedClusterAddonProfile]] - agent_pool_profiles: Optional[list[ManagedClusterAgentPoolProfile]] - ai_toolchain_operator_profile: Optional[ManagedClusterAIToolchainOperatorProfile] - api_server_access_profile: Optional[ManagedClusterAPIServerAccessProfile] - auto_scaler_profile: Optional[ManagedClusterPropertiesAutoScalerProfile] - auto_upgrade_profile: Optional[ManagedClusterAutoUpgradeProfile] - azure_monitor_profile: Optional[ManagedClusterAzureMonitorProfile] - azure_portal_fqdn: Optional[str] - bootstrap_profile: Optional[ManagedClusterBootstrapProfile] - current_kubernetes_version: Optional[str] - disable_local_accounts: Optional[bool] - disk_encryption_set_id: Optional[str] - dns_prefix: Optional[str] - enable_rbac: Optional[bool] - fqdn: Optional[str] - fqdn_subdomain: Optional[str] - hosted_system_profile: Optional[ManagedClusterHostedSystemProfile] - http_proxy_config: Optional[ManagedClusterHTTPProxyConfig] - identity_profile: Optional[dict[str, UserAssignedIdentity]] - ingress_profile: Optional[ManagedClusterIngressProfile] - kubernetes_version: Optional[str] - linux_profile: Optional[ContainerServiceLinuxProfile] - max_agent_pools: Optional[int] - metrics_profile: Optional[ManagedClusterMetricsProfile] - network_profile: Optional[ContainerServiceNetworkProfile] - node_provisioning_profile: Optional[ManagedClusterNodeProvisioningProfile] - node_resource_group: Optional[str] - node_resource_group_profile: Optional[ManagedClusterNodeResourceGroupProfile] - oidc_issuer_profile: Optional[ManagedClusterOIDCIssuerProfile] - pod_identity_profile: Optional[ManagedClusterPodIdentityProfile] - power_state: Optional[PowerState] - private_fqdn: Optional[str] - private_link_resources: Optional[list[PrivateLinkResource]] - provisioning_state: Optional[str] - public_network_access: Optional[Union[str, PublicNetworkAccess]] - resource_uid: Optional[str] - scheduler_profile: Optional[SchedulerProfile] - security_profile: Optional[ManagedClusterSecurityProfile] - service_mesh_profile: Optional[ServiceMeshProfile] - service_principal_profile: Optional[ManagedClusterServicePrincipalProfile] - status: Optional[ManagedClusterStatus] - storage_profile: Optional[ManagedClusterStorageProfile] - support_plan: Optional[Union[str, KubernetesSupportPlan]] - upgrade_settings: Optional[ClusterUpgradeSettings] - windows_profile: Optional[ManagedClusterWindowsProfile] - workload_auto_scaler_profile: Optional[ManagedClusterWorkloadAutoScalerProfile] - - @overload - def __init__( - self, - *, - aad_profile: Optional[ManagedClusterAADProfile] = ..., - addon_profiles: Optional[dict[str, ManagedClusterAddonProfile]] = ..., - agent_pool_profiles: Optional[list[ManagedClusterAgentPoolProfile]] = ..., - ai_toolchain_operator_profile: Optional[ManagedClusterAIToolchainOperatorProfile] = ..., - api_server_access_profile: Optional[ManagedClusterAPIServerAccessProfile] = ..., - auto_scaler_profile: Optional[ManagedClusterPropertiesAutoScalerProfile] = ..., - auto_upgrade_profile: Optional[ManagedClusterAutoUpgradeProfile] = ..., - azure_monitor_profile: Optional[ManagedClusterAzureMonitorProfile] = ..., - bootstrap_profile: Optional[ManagedClusterBootstrapProfile] = ..., - disable_local_accounts: Optional[bool] = ..., - disk_encryption_set_id: Optional[str] = ..., - dns_prefix: Optional[str] = ..., - enable_rbac: Optional[bool] = ..., - fqdn_subdomain: Optional[str] = ..., - hosted_system_profile: Optional[ManagedClusterHostedSystemProfile] = ..., - http_proxy_config: Optional[ManagedClusterHTTPProxyConfig] = ..., - identity_profile: Optional[dict[str, UserAssignedIdentity]] = ..., - ingress_profile: Optional[ManagedClusterIngressProfile] = ..., - kubernetes_version: Optional[str] = ..., - linux_profile: Optional[ContainerServiceLinuxProfile] = ..., - metrics_profile: Optional[ManagedClusterMetricsProfile] = ..., - network_profile: Optional[ContainerServiceNetworkProfile] = ..., - node_provisioning_profile: Optional[ManagedClusterNodeProvisioningProfile] = ..., - node_resource_group: Optional[str] = ..., - node_resource_group_profile: Optional[ManagedClusterNodeResourceGroupProfile] = ..., - oidc_issuer_profile: Optional[ManagedClusterOIDCIssuerProfile] = ..., - pod_identity_profile: Optional[ManagedClusterPodIdentityProfile] = ..., - private_link_resources: Optional[list[PrivateLinkResource]] = ..., - public_network_access: Optional[Union[str, PublicNetworkAccess]] = ..., - scheduler_profile: Optional[SchedulerProfile] = ..., - security_profile: Optional[ManagedClusterSecurityProfile] = ..., - service_mesh_profile: Optional[ServiceMeshProfile] = ..., - service_principal_profile: Optional[ManagedClusterServicePrincipalProfile] = ..., - status: Optional[ManagedClusterStatus] = ..., - storage_profile: Optional[ManagedClusterStorageProfile] = ..., - support_plan: Optional[Union[str, KubernetesSupportPlan]] = ..., - upgrade_settings: Optional[ClusterUpgradeSettings] = ..., - windows_profile: Optional[ManagedClusterWindowsProfile] = ..., - workload_auto_scaler_profile: Optional[ManagedClusterWorkloadAutoScalerProfile] = ... + + class azure.mgmt.containerservice.models.MeshRevisionProfile(ProxyResource): + id: str + name: str + properties: Optional[MeshRevisionProfileProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[MeshRevisionProfileProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterPropertiesAutoScalerProfile(_Model): - balance_similar_node_groups: Optional[str] - daemonset_eviction_for_empty_nodes: Optional[bool] - daemonset_eviction_for_occupied_nodes: Optional[bool] - expander: Optional[Union[str, Expander]] - ignore_daemonsets_utilization: Optional[bool] - max_empty_bulk_delete: Optional[str] - max_graceful_termination_sec: Optional[str] - max_node_provision_time: Optional[str] - max_total_unready_percentage: Optional[str] - new_pod_scale_up_delay: Optional[str] - ok_total_unready_count: Optional[str] - scale_down_delay_after_add: Optional[str] - scale_down_delay_after_delete: Optional[str] - scale_down_delay_after_failure: Optional[str] - scale_down_unneeded_time: Optional[str] - scale_down_unready_time: Optional[str] - scale_down_utilization_threshold: Optional[str] - scan_interval: Optional[str] - skip_nodes_with_local_storage: Optional[str] - skip_nodes_with_system_pods: Optional[str] + class azure.mgmt.containerservice.models.MeshRevisionProfileProperties(_Model): + mesh_revisions: Optional[list[MeshRevision]] @overload def __init__( self, *, - balance_similar_node_groups: Optional[str] = ..., - daemonset_eviction_for_empty_nodes: Optional[bool] = ..., - daemonset_eviction_for_occupied_nodes: Optional[bool] = ..., - expander: Optional[Union[str, Expander]] = ..., - ignore_daemonsets_utilization: Optional[bool] = ..., - max_empty_bulk_delete: Optional[str] = ..., - max_graceful_termination_sec: Optional[str] = ..., - max_node_provision_time: Optional[str] = ..., - max_total_unready_percentage: Optional[str] = ..., - new_pod_scale_up_delay: Optional[str] = ..., - ok_total_unready_count: Optional[str] = ..., - scale_down_delay_after_add: Optional[str] = ..., - scale_down_delay_after_delete: Optional[str] = ..., - scale_down_delay_after_failure: Optional[str] = ..., - scale_down_unneeded_time: Optional[str] = ..., - scale_down_unready_time: Optional[str] = ..., - scale_down_utilization_threshold: Optional[str] = ..., - scan_interval: Optional[str] = ..., - skip_nodes_with_local_storage: Optional[str] = ..., - skip_nodes_with_system_pods: Optional[str] = ... + mesh_revisions: Optional[list[MeshRevision]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSKU(_Model): - name: Optional[Union[str, ManagedClusterSKUName]] - tier: Optional[Union[str, ManagedClusterSKUTier]] + class azure.mgmt.containerservice.models.MeshUpgradeProfile(ProxyResource): + id: str + name: str + properties: Optional[MeshUpgradeProfileProperties] + system_data: SystemData + type: str @overload def __init__( self, *, - name: Optional[Union[str, ManagedClusterSKUName]] = ..., - tier: Optional[Union[str, ManagedClusterSKUTier]] = ... + properties: Optional[MeshUpgradeProfileProperties] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSKUName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AUTOMATIC = "Automatic" - BASE = "Base" + class azure.mgmt.containerservice.models.MeshUpgradeProfileProperties(MeshRevision): + compatible_with: list[CompatibleVersions] + revision: str + upgrades: list[str] + @overload + def __init__( + self, + *, + compatible_with: Optional[list[CompatibleVersions]] = ..., + revision: Optional[str] = ..., + upgrades: Optional[list[str]] = ... + ) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FREE = "Free" - PREMIUM = "Premium" - STANDARD = "Standard" + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfile(_Model): - azure_key_vault_kms: Optional[AzureKeyVaultKms] - custom_ca_trust_certificates: Optional[list[bytes]] - defender: Optional[ManagedClusterSecurityProfileDefender] - image_cleaner: Optional[ManagedClusterSecurityProfileImageCleaner] - workload_identity: Optional[ManagedClusterSecurityProfileWorkloadIdentity] + class azure.mgmt.containerservice.models.MigStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MIXED = "Mixed" + NONE = "None" + SINGLE = "Single" + + + class azure.mgmt.containerservice.models.Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + IPTABLES = "IPTABLES" + IPVS = "IPVS" + NFTABLES = "NFTABLES" + + + class azure.mgmt.containerservice.models.NamespaceProperties(_Model): + adoption_policy: Optional[Union[str, AdoptionPolicy]] + annotations: Optional[dict[str, str]] + default_network_policy: Optional[NetworkPolicies] + default_resource_quota: Optional[ResourceQuota] + delete_policy: Optional[Union[str, DeletePolicy]] + labels: Optional[dict[str, str]] + portal_fqdn: Optional[str] + provisioning_state: Optional[Union[str, NamespaceProvisioningState]] @overload def __init__( self, *, - azure_key_vault_kms: Optional[AzureKeyVaultKms] = ..., - custom_ca_trust_certificates: Optional[list[bytes]] = ..., - defender: Optional[ManagedClusterSecurityProfileDefender] = ..., - image_cleaner: Optional[ManagedClusterSecurityProfileImageCleaner] = ..., - workload_identity: Optional[ManagedClusterSecurityProfileWorkloadIdentity] = ... + adoption_policy: Optional[Union[str, AdoptionPolicy]] = ..., + annotations: Optional[dict[str, str]] = ..., + default_network_policy: Optional[NetworkPolicies] = ..., + default_resource_quota: Optional[ResourceQuota] = ..., + delete_policy: Optional[Union[str, DeletePolicy]] = ..., + labels: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefender(_Model): - log_analytics_workspace_resource_id: Optional[str] - security_gating: Optional[ManagedClusterSecurityProfileDefenderSecurityGating] - security_monitoring: Optional[ManagedClusterSecurityProfileDefenderSecurityMonitoring] + class azure.mgmt.containerservice.models.NamespaceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + + + class azure.mgmt.containerservice.models.NetworkDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE = "azure" + CILIUM = "cilium" + + + class azure.mgmt.containerservice.models.NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BRIDGE = "bridge" + TRANSPARENT = "transparent" + + + class azure.mgmt.containerservice.models.NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE = "azure" + KUBENET = "kubenet" + NONE = "none" + + + class azure.mgmt.containerservice.models.NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + OVERLAY = "overlay" + + + class azure.mgmt.containerservice.models.NetworkPolicies(_Model): + egress: Optional[Union[str, PolicyRule]] + ingress: Optional[Union[str, PolicyRule]] @overload def __init__( self, *, - log_analytics_workspace_resource_id: Optional[str] = ..., - security_gating: Optional[ManagedClusterSecurityProfileDefenderSecurityGating] = ..., - security_monitoring: Optional[ManagedClusterSecurityProfileDefenderSecurityMonitoring] = ... + egress: Optional[Union[str, PolicyRule]] = ..., + ingress: Optional[Union[str, PolicyRule]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating(_Model): - allow_secret_access: Optional[bool] - enabled: Optional[bool] - identities: Optional[list[ManagedClusterSecurityProfileDefenderSecurityGatingIdentity]] + class azure.mgmt.containerservice.models.NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE = "azure" + CALICO = "calico" + CILIUM = "cilium" + NONE = "none" + + + class azure.mgmt.containerservice.models.NetworkProfileForSnapshot(_Model): + load_balancer_sku: Optional[Union[str, LoadBalancerSku]] + network_mode: Optional[Union[str, NetworkMode]] + network_plugin: Optional[Union[str, NetworkPlugin]] + network_plugin_mode: Optional[Union[str, NetworkPluginMode]] + network_policy: Optional[Union[str, NetworkPolicy]] @overload def __init__( self, *, - allow_secret_access: Optional[bool] = ..., - enabled: Optional[bool] = ..., - identities: Optional[list[ManagedClusterSecurityProfileDefenderSecurityGatingIdentity]] = ... + load_balancer_sku: Optional[Union[str, LoadBalancerSku]] = ..., + network_mode: Optional[Union[str, NetworkMode]] = ..., + network_plugin: Optional[Union[str, NetworkPlugin]] = ..., + network_plugin_mode: Optional[Union[str, NetworkPluginMode]] = ..., + network_policy: Optional[Union[str, NetworkPolicy]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentity(_Model): - azure_container_registry: Optional[str] - identity: Optional[UserAssignedIdentity] + class azure.mgmt.containerservice.models.NginxIngressControllerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ANNOTATION_CONTROLLED = "AnnotationControlled" + EXTERNAL = "External" + INTERNAL = "Internal" + NONE = "None" + + + class azure.mgmt.containerservice.models.NodeDisruptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW = "Allow" + ALLOW_DURING_MAINTENANCE_WINDOW = "AllowDuringMaintenanceWindow" + BLOCK = "Block" + + + class azure.mgmt.containerservice.models.NodeDisruptionProfile(_Model): + node_disruption_policy: Optional[Union[str, NodeDisruptionPolicy]] @overload def __init__( self, *, - azure_container_registry: Optional[str] = ..., - identity: Optional[UserAssignedIdentity] = ... + node_disruption_policy: Optional[Union[str, NodeDisruptionPolicy]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.NodeImageVersion(_Model): + full_name: Optional[str] + os: Optional[str] + sku: Optional[str] + version: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ... + full_name: Optional[str] = ..., + os: Optional[str] = ..., + sku: Optional[str] = ..., + version: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner(_Model): - enabled: Optional[bool] - interval_hours: Optional[int] + class azure.mgmt.containerservice.models.NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NODE_IMAGE = "NodeImage" + NONE = "None" + SECURITY_PATCH = "SecurityPatch" + UNMANAGED = "Unmanaged" + + + class azure.mgmt.containerservice.models.NodeProvisioningDefaultNodePools(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTO = "Auto" + NONE = "None" + + + class azure.mgmt.containerservice.models.NodeProvisioningMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTO = "Auto" + MANUAL = "Manual" + + + class azure.mgmt.containerservice.models.NvidiaDriverMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEVICE_PLUGIN = "DevicePlugin" + DRA = "DRA" + + + class azure.mgmt.containerservice.models.NvidiaGPUProfile(_Model): + driver_mode: Optional[Union[str, NvidiaDriverMode]] + management_mode: Optional[Union[str, ManagementMode]] + mig_strategy: Optional[Union[str, MigStrategy]] @overload def __init__( self, *, - enabled: Optional[bool] = ..., - interval_hours: Optional[int] = ... + driver_mode: Optional[Union[str, NvidiaDriverMode]] = ..., + management_mode: Optional[Union[str, ManagementMode]] = ..., + mig_strategy: Optional[Union[str, MigStrategy]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EPHEMERAL = "Ephemeral" + MANAGED = "Managed" + + + class azure.mgmt.containerservice.models.OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AZURE_CONTAINER_LINUX = "AzureContainerLinux" + AZURE_LINUX = "AzureLinux" + AZURE_LINUX3 = "AzureLinux3" + CBL_MARINER = "CBLMariner" + FLATCAR = "Flatcar" + MARINER = "Mariner" + UBUNTU = "Ubuntu" + UBUNTU2204 = "Ubuntu2204" + UBUNTU2404 = "Ubuntu2404" + UBUNTU2604 = "Ubuntu2604" + WINDOWS2019 = "Windows2019" + WINDOWS2022 = "Windows2022" + WINDOWS2025 = "Windows2025" + WINDOWS_ANNUAL = "WindowsAnnual" + + + class azure.mgmt.containerservice.models.OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LINUX = "Linux" + WINDOWS = "Windows" + + + class azure.mgmt.containerservice.models.OperationStatusResult(_Model): + end_time: Optional[datetime] + error: Optional[ErrorDetail] + id: Optional[str] + name: Optional[str] + operation_type: Optional[str] + operations: Optional[list[OperationStatusResult]] + percent_complete: Optional[float] + resource_id: Optional[str] + start_time: Optional[datetime] + status: str + sub_operation_type: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ... + end_time: Optional[datetime] = ..., + error: Optional[ErrorDetail] = ..., + id: Optional[str] = ..., + name: Optional[str] = ..., + operations: Optional[list[OperationStatusResult]] = ..., + percent_complete: Optional[float] = ..., + start_time: Optional[datetime] = ..., + status: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile(_Model): - client_id: str - secret: Optional[str] + class azure.mgmt.containerservice.models.OperationValue(_Model): + display: Optional[OperationValueDisplay] + name: Optional[str] + origin: Optional[str] + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - client_id: str, - secret: Optional[str] = ... + display: Optional[OperationValueDisplay] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.containerservice.models.ManagedClusterStaticEgressGatewayProfile(_Model): - enabled: Optional[bool] - - @overload - def __init__( + def __setattr__( self, - *, - enabled: Optional[bool] = ... + key: str, + value: Any ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + class azure.mgmt.containerservice.models.OperationValueDisplay(_Model): + description: Optional[str] + operation: Optional[str] + provider: Optional[str] + resource: Optional[str] - class azure.mgmt.containerservice.models.ManagedClusterStatus(_Model): - provisioning_error: Optional[ErrorDetail] + class azure.mgmt.containerservice.models.Operator(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DOES_NOT_EXIST = "DoesNotExist" + EXISTS = "Exists" + IN = "In" + NOT_IN = "NotIn" - class azure.mgmt.containerservice.models.ManagedClusterStorageProfile(_Model): - blob_csi_driver: Optional[ManagedClusterStorageProfileBlobCSIDriver] - disk_csi_driver: Optional[ManagedClusterStorageProfileDiskCSIDriver] - file_csi_driver: Optional[ManagedClusterStorageProfileFileCSIDriver] - snapshot_controller: Optional[ManagedClusterStorageProfileSnapshotController] + class azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint(_Model): + category: Optional[str] + endpoints: Optional[list[EndpointDependency]] @overload def __init__( self, *, - blob_csi_driver: Optional[ManagedClusterStorageProfileBlobCSIDriver] = ..., - disk_csi_driver: Optional[ManagedClusterStorageProfileDiskCSIDriver] = ..., - file_csi_driver: Optional[ManagedClusterStorageProfileFileCSIDriver] = ..., - snapshot_controller: Optional[ManagedClusterStorageProfileSnapshotController] = ... + category: Optional[str] = ..., + endpoints: Optional[list[EndpointDependency]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterStorageProfileBlobCSIDriver(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LOAD_BALANCER = "loadBalancer" + MANAGED_NAT_GATEWAY = "managedNATGateway" + NONE = "none" + USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + USER_DEFINED_ROUTING = "userDefinedRouting" + + + class azure.mgmt.containerservice.models.PodIPAllocationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DYNAMIC_INDIVIDUAL = "DynamicIndividual" + STATIC_BLOCK = "StaticBlock" + + + class azure.mgmt.containerservice.models.PodLinkLocalAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + IMDS = "IMDS" + NONE = "None" + + + class azure.mgmt.containerservice.models.PolicyRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW_ALL = "AllowAll" + ALLOW_SAME_NAMESPACE = "AllowSameNamespace" + DENY_ALL = "DenyAll" + + + class azure.mgmt.containerservice.models.PoolBootstrapData(_Model): + azure: Optional[BootstrapAzureConfig] + components: Optional[BootstrapComponentVersions] + networking: Optional[BootstrapNetworkingConfig] + node: Optional[BootstrapNodeConfig] + + + class azure.mgmt.containerservice.models.PortRange(_Model): + port_end: Optional[int] + port_start: Optional[int] + protocol: Optional[Union[str, Protocol]] @overload def __init__( self, *, - enabled: Optional[bool] = ... + port_end: Optional[int] = ..., + port_start: Optional[int] = ..., + protocol: Optional[Union[str, Protocol]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterStorageProfileDiskCSIDriver(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.PowerState(_Model): + code: Optional[Union[str, Code]] @overload def __init__( self, *, - enabled: Optional[bool] = ... + code: Optional[Union[str, Code]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterStorageProfileFileCSIDriver(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.PreparedImageSpecificationProfile(_Model): + prepared_image_specification_id: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ... + prepared_image_specification_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterStorageProfileSnapshotController(_Model): - enabled: Optional[bool] + class azure.mgmt.containerservice.models.PrivateEndpoint(_Model): + id: Optional[str] @overload def __init__( self, *, - enabled: Optional[bool] = ... + id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile(ProxyResource): + class azure.mgmt.containerservice.models.PrivateEndpointConnection(ProxyResource): id: str name: str - properties: ManagedClusterUpgradeProfileProperties + properties: Optional[PrivateEndpointConnectionProperties] system_data: SystemData type: str @@ -4238,7 +6974,7 @@ namespace azure.mgmt.containerservice.models def __init__( self, *, - properties: ManagedClusterUpgradeProfileProperties + properties: Optional[PrivateEndpointConnectionProperties] = ... ) -> None: ... @overload @@ -4251,366 +6987,307 @@ namespace azure.mgmt.containerservice.models ) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterUpgradeProfileProperties(_Model): - agent_pool_profiles: list[ManagedClusterPoolUpgradeProfile] - control_plane_profile: ManagedClusterPoolUpgradeProfile - - @overload - def __init__( - self, - *, - agent_pool_profiles: list[ManagedClusterPoolUpgradeProfile], - control_plane_profile: ManagedClusterPoolUpgradeProfile - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.ManagedClusterWebAppRoutingGatewayAPIImplementations(_Model): - app_routing_istio: Optional[ManagedClusterAppRoutingIstio] - - @overload - def __init__( - self, - *, - app_routing_istio: Optional[ManagedClusterAppRoutingIstio] = ... - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.ManagedClusterWindowsProfile(_Model): - admin_password: Optional[str] - admin_username: str - enable_csi_proxy: Optional[bool] - gmsa_profile: Optional[WindowsGmsaProfile] - license_type: Optional[Union[str, LicenseType]] + class azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult(_Model): + value: Optional[list[PrivateEndpointConnection]] @overload def __init__( self, *, - admin_password: Optional[str] = ..., - admin_username: str, - enable_csi_proxy: Optional[bool] = ..., - gmsa_profile: Optional[WindowsGmsaProfile] = ..., - license_type: Optional[Union[str, LicenseType]] = ... + value: Optional[list[PrivateEndpointConnection]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfile(_Model): - keda: Optional[ManagedClusterWorkloadAutoScalerProfileKeda] - vertical_pod_autoscaler: Optional[ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler] + class azure.mgmt.containerservice.models.PrivateEndpointConnectionProperties(_Model): + private_endpoint: Optional[PrivateEndpoint] + private_link_service_connection_state: PrivateLinkServiceConnectionState + provisioning_state: Optional[Union[str, PrivateEndpointConnectionProvisioningState]] @overload def __init__( self, *, - keda: Optional[ManagedClusterWorkloadAutoScalerProfileKeda] = ..., - vertical_pod_autoscaler: Optional[ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler] = ... + private_endpoint: Optional[PrivateEndpoint] = ..., + private_link_service_connection_state: PrivateLinkServiceConnectionState ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileKeda(_Model): - enabled: bool - - @overload - def __init__( - self, - *, - enabled: bool - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.containerservice.models.PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" - class azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(_Model): - enabled: bool + class azure.mgmt.containerservice.models.PrivateLinkResource(_Model): + group_id: Optional[str] + id: Optional[str] + name: Optional[str] + private_link_service_id: Optional[str] + required_members: Optional[list[str]] + type: Optional[str] @overload def __init__( self, *, - enabled: bool + group_id: Optional[str] = ..., + id: Optional[str] = ..., + name: Optional[str] = ..., + required_members: Optional[list[str]] = ..., + type: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedGatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - STANDARD = "Standard" - - - class azure.mgmt.containerservice.models.ManagedNamespace(TrackedResource): - e_tag: Optional[str] - id: str - location: str - name: str - properties: Optional[NamespaceProperties] - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.containerservice.models.PrivateLinkResourcesListResult(_Model): + value: Optional[list[PrivateLinkResource]] @overload def __init__( self, *, - location: str, - properties: Optional[NamespaceProperties] = ..., - tags: Optional[dict[str, str]] = ... + value: Optional[list[PrivateLinkResource]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue(_Model): - client_id: Optional[str] - principal_id: Optional[str] - - - class azure.mgmt.containerservice.models.ManualScaleProfile(_Model): - count: Optional[int] - size: Optional[str] + class azure.mgmt.containerservice.models.PrivateLinkServiceConnectionState(_Model): + description: Optional[str] + status: Optional[Union[str, ConnectionStatus]] @overload def __init__( self, *, - count: Optional[int] = ..., - size: Optional[str] = ... + description: Optional[str] = ..., + status: Optional[Union[str, ConnectionStatus]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MeshRevision(_Model): - compatible_with: Optional[list[CompatibleVersions]] - revision: Optional[str] - upgrades: Optional[list[str]] + class azure.mgmt.containerservice.models.Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + TCP = "TCP" + UDP = "UDP" - @overload - def __init__( - self, - *, - compatible_with: Optional[list[CompatibleVersions]] = ..., - revision: Optional[str] = ..., - upgrades: Optional[list[str]] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.containerservice.models.ProxyRedirectionMechanism(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CNI_CHAINING = "CNIChaining" + INIT_CONTAINERS = "InitContainers" - class azure.mgmt.containerservice.models.MeshRevisionProfile(ProxyResource): + class azure.mgmt.containerservice.models.ProxyResource(Resource): id: str name: str - properties: Optional[MeshRevisionProfileProperties] system_data: SystemData type: str + + class azure.mgmt.containerservice.models.PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + SECURED_BY_PERIMETER = "SecuredByPerimeter" + + + class azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody(_Model): + load_balancer_names: Optional[list[str]] + @overload def __init__( self, *, - properties: Optional[MeshRevisionProfileProperties] = ... + load_balancer_names: Optional[list[str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MeshRevisionProfileProperties(_Model): - mesh_revisions: Optional[list[MeshRevision]] + class azure.mgmt.containerservice.models.RelativeMonthlySchedule(_Model): + day_of_week: Union[str, WeekDay] + interval_months: int + week_index: Union[str, Type] @overload def __init__( self, *, - mesh_revisions: Optional[list[MeshRevision]] = ... + day_of_week: Union[str, WeekDay], + interval_months: int, + week_index: Union[str, Type] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.MeshUpgradeProfile(ProxyResource): - id: str - name: str - properties: Optional[MeshUpgradeProfileProperties] - system_data: SystemData - type: str + class azure.mgmt.containerservice.models.Resource(_Model): + id: Optional[str] + name: Optional[str] + system_data: Optional[SystemData] + type: Optional[str] - @overload - def __init__( - self, - *, - properties: Optional[MeshUpgradeProfileProperties] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.containerservice.models.ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" - class azure.mgmt.containerservice.models.MeshUpgradeProfileProperties(MeshRevision): - compatible_with: list[CompatibleVersions] - revision: str - upgrades: list[str] + class azure.mgmt.containerservice.models.ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + + + class azure.mgmt.containerservice.models.ResourceQuota(_Model): + cpu_limit: Optional[str] + cpu_request: Optional[str] + memory_limit: Optional[str] + memory_request: Optional[str] @overload def __init__( self, *, - compatible_with: Optional[list[CompatibleVersions]] = ..., - revision: Optional[str] = ..., - upgrades: Optional[list[str]] = ... + cpu_limit: Optional[str] = ..., + cpu_request: Optional[str] = ..., + memory_limit: Optional[str] = ..., + memory_request: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.NamespaceProperties(_Model): - adoption_policy: Optional[Union[str, AdoptionPolicy]] - annotations: Optional[dict[str, str]] - default_network_policy: Optional[NetworkPolicies] - default_resource_quota: Optional[ResourceQuota] - delete_policy: Optional[Union[str, DeletePolicy]] - labels: Optional[dict[str, str]] - portal_fqdn: Optional[str] - provisioning_state: Optional[Union[str, NamespaceProvisioningState]] + class azure.mgmt.containerservice.models.ResourceReference(_Model): + id: Optional[str] @overload def __init__( self, *, - adoption_policy: Optional[Union[str, AdoptionPolicy]] = ..., - annotations: Optional[dict[str, str]] = ..., - default_network_policy: Optional[NetworkPolicies] = ..., - default_resource_quota: Optional[ResourceQuota] = ..., - delete_policy: Optional[Union[str, DeletePolicy]] = ..., - labels: Optional[dict[str, str]] = ... + id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.NamespaceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - CREATING = "Creating" - DELETING = "Deleting" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - - - class azure.mgmt.containerservice.models.NetworkDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE = "azure" - CILIUM = "cilium" + class azure.mgmt.containerservice.models.ResourceSku(_Model): + api_versions: Optional[list[str]] + capabilities: Optional[list[ResourceSkuCapabilities]] + capacity: Optional[ResourceSkuCapacity] + costs: Optional[list[ResourceSkuCosts]] + family: Optional[str] + kind: Optional[str] + location_info: Optional[list[ResourceSkuLocationInfo]] + locations: Optional[list[str]] + name: Optional[str] + resource_type: Optional[str] + restrictions: Optional[list[ResourceSkuRestrictions]] + size: Optional[str] + tier: Optional[str] - class azure.mgmt.containerservice.models.NetworkMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - BRIDGE = "bridge" - TRANSPARENT = "transparent" + class azure.mgmt.containerservice.models.ResourceSkuCapabilities(_Model): + name: Optional[str] + value: Optional[str] - class azure.mgmt.containerservice.models.NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE = "azure" - KUBENET = "kubenet" - NONE = "none" + class azure.mgmt.containerservice.models.ResourceSkuCapacity(_Model): + default: Optional[int] + maximum: Optional[int] + minimum: Optional[int] + scale_type: Optional[Union[str, ResourceSkuCapacityScaleType]] - class azure.mgmt.containerservice.models.NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - OVERLAY = "overlay" + class azure.mgmt.containerservice.models.ResourceSkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC = "Automatic" + MANUAL = "Manual" + NONE = "None" - class azure.mgmt.containerservice.models.NetworkPolicies(_Model): - egress: Optional[Union[str, PolicyRule]] - ingress: Optional[Union[str, PolicyRule]] + class azure.mgmt.containerservice.models.ResourceSkuCosts(_Model): + extended_unit: Optional[str] + meter_id: Optional[str] + quantity: Optional[int] - @overload - def __init__( - self, - *, - egress: Optional[Union[str, PolicyRule]] = ..., - ingress: Optional[Union[str, PolicyRule]] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.containerservice.models.ResourceSkuLocationInfo(_Model): + extended_locations: Optional[list[str]] + location: Optional[str] + type: Optional[Union[str, ExtendedLocationTypes]] + zone_details: Optional[list[ResourceSkuZoneDetails]] + zones: Optional[list[str]] - class azure.mgmt.containerservice.models.NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE = "azure" - CALICO = "calico" - CILIUM = "cilium" - NONE = "none" + class azure.mgmt.containerservice.models.ResourceSkuRestrictionInfo(_Model): + locations: Optional[list[str]] + zones: Optional[list[str]] - class azure.mgmt.containerservice.models.NginxIngressControllerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ANNOTATION_CONTROLLED = "AnnotationControlled" - EXTERNAL = "External" - INTERNAL = "Internal" - NONE = "None" + class azure.mgmt.containerservice.models.ResourceSkuRestrictions(_Model): + reason_code: Optional[Union[str, ResourceSkuRestrictionsReasonCode]] + restriction_info: Optional[ResourceSkuRestrictionInfo] + type: Optional[Union[str, ResourceSkuRestrictionsType]] + values_property: Optional[list[str]] - class azure.mgmt.containerservice.models.NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NODE_IMAGE = "NodeImage" - NONE = "None" - SECURITY_PATCH = "SecurityPatch" - UNMANAGED = "Unmanaged" + class azure.mgmt.containerservice.models.ResourceSkuRestrictionsReasonCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + QUOTA_ID = "QuotaId" - class azure.mgmt.containerservice.models.NodeProvisioningDefaultNodePools(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AUTO = "Auto" - NONE = "None" + class azure.mgmt.containerservice.models.ResourceSkuRestrictionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LOCATION = "Location" + ZONE = "Zone" - class azure.mgmt.containerservice.models.NodeProvisioningMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AUTO = "Auto" - MANUAL = "Manual" + class azure.mgmt.containerservice.models.ResourceSkuZoneDetails(_Model): + capabilities: Optional[list[ResourceSkuCapabilities]] + name: Optional[list[str]] - class azure.mgmt.containerservice.models.OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - EPHEMERAL = "Ephemeral" - MANAGED = "Managed" + class azure.mgmt.containerservice.models.RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + READ_ONLY = "ReadOnly" + UNRESTRICTED = "Unrestricted" - class azure.mgmt.containerservice.models.OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): - AZURE_CONTAINER_LINUX = "AzureContainerLinux" - AZURE_LINUX = "AzureLinux" - AZURE_LINUX3 = "AzureLinux3" - CBL_MARINER = "CBLMariner" - UBUNTU = "Ubuntu" - UBUNTU2204 = "Ubuntu2204" - UBUNTU2404 = "Ubuntu2404" - WINDOWS2019 = "Windows2019" - WINDOWS2022 = "Windows2022" - WINDOWS2025 = "Windows2025" + class azure.mgmt.containerservice.models.RunCommandRequest(_Model): + cluster_token: Optional[str] + command: str + context: Optional[str] + @overload + def __init__( + self, + *, + cluster_token: Optional[str] = ..., + command: str, + context: Optional[str] = ... + ) -> None: ... - class azure.mgmt.containerservice.models.OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - LINUX = "Linux" - WINDOWS = "Windows" + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.OperationValue(_Model): - display: Optional[OperationValueDisplay] - name: Optional[str] - origin: Optional[str] + class azure.mgmt.containerservice.models.RunCommandResult(_Model): + id: Optional[str] + properties: Optional[CommandResultProperties] def __getattr__(self, name: str) -> Any: ... @@ -4618,7 +7295,7 @@ namespace azure.mgmt.containerservice.models def __init__( self, *, - display: Optional[OperationValueDisplay] = ... + properties: Optional[CommandResultProperties] = ... ) -> None: ... @overload @@ -4631,872 +7308,1183 @@ namespace azure.mgmt.containerservice.models ) -> None: ... - class azure.mgmt.containerservice.models.OperationValueDisplay(_Model): - description: Optional[str] - operation: Optional[str] - provider: Optional[str] - resource: Optional[str] - - - class azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint(_Model): - category: Optional[str] - endpoints: Optional[list[EndpointDependency]] + class azure.mgmt.containerservice.models.SafeguardsAvailableVersion(ProxyResource): + id: str + name: str + properties: SafeguardsAvailableVersionsProperties + system_data: SystemData + type: str @overload def __init__( self, *, - category: Optional[str] = ..., - endpoints: Optional[list[EndpointDependency]] = ... + properties: SafeguardsAvailableVersionsProperties ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - LOAD_BALANCER = "loadBalancer" - MANAGED_NAT_GATEWAY = "managedNATGateway" - NONE = "none" - USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" - USER_DEFINED_ROUTING = "userDefinedRouting" + class azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties(_Model): + is_default_version: Optional[bool] + support: Optional[Union[str, SafeguardsSupport]] - class azure.mgmt.containerservice.models.PodIPAllocationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DYNAMIC_INDIVIDUAL = "DynamicIndividual" - STATIC_BLOCK = "StaticBlock" + class azure.mgmt.containerservice.models.SafeguardsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PREVIEW = "Preview" + STABLE = "Stable" - class azure.mgmt.containerservice.models.PolicyRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): - ALLOW_ALL = "AllowAll" - ALLOW_SAME_NAMESPACE = "AllowSameNamespace" - DENY_ALL = "DenyAll" + class azure.mgmt.containerservice.models.ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEALLOCATE = "Deallocate" + DELETE = "Delete" - class azure.mgmt.containerservice.models.PortRange(_Model): - port_end: Optional[int] - port_start: Optional[int] - protocol: Optional[Union[str, Protocol]] + class azure.mgmt.containerservice.models.ScaleProfile(_Model): + autoscale: Optional[list[AutoScaleProfile]] + manual: Optional[list[ManualScaleProfile]] @overload def __init__( self, *, - port_end: Optional[int] = ..., - port_start: Optional[int] = ..., - protocol: Optional[Union[str, Protocol]] = ... + autoscale: Optional[list[AutoScaleProfile]] = ..., + manual: Optional[list[ManualScaleProfile]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.containerservice.models.ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEALLOCATE = "Deallocate" + DELETE = "Delete" + + + class azure.mgmt.containerservice.models.ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): + REGULAR = "Regular" + SPOT = "Spot" + + + class azure.mgmt.containerservice.models.Schedule(_Model): + absolute_monthly: Optional[AbsoluteMonthlySchedule] + daily: Optional[DailySchedule] + relative_monthly: Optional[RelativeMonthlySchedule] + weekly: Optional[WeeklySchedule] + + @overload + def __init__( + self, + *, + absolute_monthly: Optional[AbsoluteMonthlySchedule] = ..., + daily: Optional[DailySchedule] = ..., + relative_monthly: Optional[RelativeMonthlySchedule] = ..., + weekly: Optional[WeeklySchedule] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PowerState(_Model): - code: Optional[Union[str, Code]] + class azure.mgmt.containerservice.models.SchedulerConfigMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "Default" + MANAGED_BY_CRD = "ManagedByCRD" + + + class azure.mgmt.containerservice.models.SchedulerInstanceProfile(_Model): + scheduler_config_mode: Optional[Union[str, SchedulerConfigMode]] @overload def __init__( self, *, - code: Optional[Union[str, Code]] = ... + scheduler_config_mode: Optional[Union[str, SchedulerConfigMode]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PrivateEndpoint(_Model): - id: Optional[str] + class azure.mgmt.containerservice.models.SchedulerProfile(_Model): + upstream: Optional[SchedulerInstanceProfile] @overload def __init__( self, *, - id: Optional[str] = ... + upstream: Optional[SchedulerInstanceProfile] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PrivateEndpointConnection(ProxyResource): - id: str - name: str - properties: Optional[PrivateEndpointConnectionProperties] - system_data: SystemData - type: str + class azure.mgmt.containerservice.models.SeccompDefault(str, Enum, metaclass=CaseInsensitiveEnumMeta): + RUNTIME_DEFAULT = "RuntimeDefault" + UNCONFINED = "Unconfined" - def __getattr__(self, name: str) -> Any: ... + + class azure.mgmt.containerservice.models.ServiceAccountImagePullProfile(_Model): + default_managed_identity_id: Optional[str] + enabled: Optional[bool] @overload def __init__( self, *, - properties: Optional[PrivateEndpointConnectionProperties] = ... + default_managed_identity_id: Optional[str] = ..., + enabled: Optional[bool] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... + class azure.mgmt.containerservice.models.ServiceMeshMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ISTIO = "Istio" - class azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult(_Model): - value: Optional[list[PrivateEndpointConnection]] + + class azure.mgmt.containerservice.models.ServiceMeshProfile(_Model): + istio: Optional[IstioServiceMesh] + mode: Union[str, ServiceMeshMode] @overload def __init__( self, *, - value: Optional[list[PrivateEndpointConnection]] = ... + istio: Optional[IstioServiceMesh] = ..., + mode: Union[str, ServiceMeshMode] ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PrivateEndpointConnectionProperties(_Model): - private_endpoint: Optional[PrivateEndpoint] - private_link_service_connection_state: PrivateLinkServiceConnectionState - provisioning_state: Optional[Union[str, PrivateEndpointConnectionProvisioningState]] + class azure.mgmt.containerservice.models.Snapshot(TrackedResource): + id: str + location: str + name: str + properties: Optional[SnapshotProperties] + system_data: SystemData + tags: dict[str, str] + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - private_endpoint: Optional[PrivateEndpoint] = ..., - private_link_service_connection_state: PrivateLinkServiceConnectionState + location: str, + properties: Optional[SnapshotProperties] = ..., + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.containerservice.models.PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - CREATING = "Creating" - DELETING = "Deleting" - FAILED = "Failed" - SUCCEEDED = "Succeeded" + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.PrivateLinkResource(_Model): - group_id: Optional[str] - id: Optional[str] - name: Optional[str] - private_link_service_id: Optional[str] - required_members: Optional[list[str]] - type: Optional[str] + class azure.mgmt.containerservice.models.SnapshotProperties(_Model): + creation_data: Optional[CreationData] + enable_fips: Optional[bool] + kubernetes_version: Optional[str] + node_image_version: Optional[str] + os_sku: Optional[Union[str, _models.OSSKU]] + os_type: Optional[Union[str, OSType]] + snapshot_type: Optional[Union[str, SnapshotType]] + vm_size: Optional[str] @overload def __init__( self, *, - group_id: Optional[str] = ..., - id: Optional[str] = ..., - name: Optional[str] = ..., - required_members: Optional[list[str]] = ..., - type: Optional[str] = ... + creation_data: Optional[CreationData] = ..., + snapshot_type: Optional[Union[str, SnapshotType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PrivateLinkResourcesListResult(_Model): - value: Optional[list[PrivateLinkResource]] + class azure.mgmt.containerservice.models.SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MANAGED_CLUSTER = "ManagedCluster" + NODE_POOL = "NodePool" + + + class azure.mgmt.containerservice.models.SoftEvictionGracePeriod(_Model): + memory_available: Optional[str] + node_fs_available: Optional[str] + node_fs_inodes_free: Optional[str] @overload def __init__( self, *, - value: Optional[list[PrivateLinkResource]] = ... + memory_available: Optional[str] = ..., + node_fs_available: Optional[str] = ..., + node_fs_inodes_free: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.PrivateLinkServiceConnectionState(_Model): - description: Optional[str] - status: Optional[Union[str, ConnectionStatus]] + class azure.mgmt.containerservice.models.SoftEvictionThreshold(_Model): + memory_available: Optional[str] + node_fs_available: Optional[str] + node_fs_inodes_free: Optional[str] @overload def __init__( self, *, - description: Optional[str] = ..., - status: Optional[Union[str, ConnectionStatus]] = ... + memory_available: Optional[str] = ..., + node_fs_available: Optional[str] = ..., + node_fs_inodes_free: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - TCP = "TCP" - UDP = "UDP" - - - class azure.mgmt.containerservice.models.ProxyRedirectionMechanism(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CNI_CHAINING = "CNIChaining" - INIT_CONTAINERS = "InitContainers" - - - class azure.mgmt.containerservice.models.ProxyResource(Resource): - id: str - name: str - system_data: SystemData - type: str - - - class azure.mgmt.containerservice.models.PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ENABLED = "Enabled" - - - class azure.mgmt.containerservice.models.RelativeMonthlySchedule(_Model): - day_of_week: Union[str, WeekDay] - interval_months: int - week_index: Union[str, Type] + class azure.mgmt.containerservice.models.SysctlConfig(_Model): + fs_aio_max_nr: Optional[int] + fs_file_max: Optional[int] + fs_inotify_max_user_watches: Optional[int] + fs_nr_open: Optional[int] + kernel_threads_max: Optional[int] + net_core_netdev_max_backlog: Optional[int] + net_core_optmem_max: Optional[int] + net_core_rmem_default: Optional[int] + net_core_rmem_max: Optional[int] + net_core_somaxconn: Optional[int] + net_core_wmem_default: Optional[int] + net_core_wmem_max: Optional[int] + net_ipv4_ip_local_port_range: Optional[str] + net_ipv4_neigh_default_gc_thresh1: Optional[int] + net_ipv4_neigh_default_gc_thresh2: Optional[int] + net_ipv4_neigh_default_gc_thresh3: Optional[int] + net_ipv4_tcp_fin_timeout: Optional[int] + net_ipv4_tcp_keepalive_probes: Optional[int] + net_ipv4_tcp_keepalive_time: Optional[int] + net_ipv4_tcp_max_syn_backlog: Optional[int] + net_ipv4_tcp_max_tw_buckets: Optional[int] + net_ipv4_tcp_tw_reuse: Optional[bool] + net_ipv4_tcpkeepalive_intvl: Optional[int] + net_netfilter_nf_conntrack_buckets: Optional[int] + net_netfilter_nf_conntrack_max: Optional[int] + vm_max_map_count: Optional[int] + vm_swappiness: Optional[int] + vm_vfs_cache_pressure: Optional[int] @overload def __init__( self, *, - day_of_week: Union[str, WeekDay], - interval_months: int, - week_index: Union[str, Type] + fs_aio_max_nr: Optional[int] = ..., + fs_file_max: Optional[int] = ..., + fs_inotify_max_user_watches: Optional[int] = ..., + fs_nr_open: Optional[int] = ..., + kernel_threads_max: Optional[int] = ..., + net_core_netdev_max_backlog: Optional[int] = ..., + net_core_optmem_max: Optional[int] = ..., + net_core_rmem_default: Optional[int] = ..., + net_core_rmem_max: Optional[int] = ..., + net_core_somaxconn: Optional[int] = ..., + net_core_wmem_default: Optional[int] = ..., + net_core_wmem_max: Optional[int] = ..., + net_ipv4_ip_local_port_range: Optional[str] = ..., + net_ipv4_neigh_default_gc_thresh1: Optional[int] = ..., + net_ipv4_neigh_default_gc_thresh2: Optional[int] = ..., + net_ipv4_neigh_default_gc_thresh3: Optional[int] = ..., + net_ipv4_tcp_fin_timeout: Optional[int] = ..., + net_ipv4_tcp_keepalive_probes: Optional[int] = ..., + net_ipv4_tcp_keepalive_time: Optional[int] = ..., + net_ipv4_tcp_max_syn_backlog: Optional[int] = ..., + net_ipv4_tcp_max_tw_buckets: Optional[int] = ..., + net_ipv4_tcp_tw_reuse: Optional[bool] = ..., + net_ipv4_tcpkeepalive_intvl: Optional[int] = ..., + net_netfilter_nf_conntrack_buckets: Optional[int] = ..., + net_netfilter_nf_conntrack_max: Optional[int] = ..., + vm_max_map_count: Optional[int] = ..., + vm_swappiness: Optional[int] = ..., + vm_vfs_cache_pressure: Optional[int] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Resource(_Model): - id: Optional[str] - name: Optional[str] - system_data: Optional[SystemData] - type: Optional[str] - - - class azure.mgmt.containerservice.models.ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NONE = "None" - SYSTEM_ASSIGNED = "SystemAssigned" - USER_ASSIGNED = "UserAssigned" - - - class azure.mgmt.containerservice.models.ResourceQuota(_Model): - cpu_limit: Optional[str] - cpu_request: Optional[str] - memory_limit: Optional[str] - memory_request: Optional[str] + class azure.mgmt.containerservice.models.SystemData(_Model): + created_at: Optional[datetime] + created_by: Optional[str] + created_by_type: Optional[Union[str, CreatedByType]] + last_modified_at: Optional[datetime] + last_modified_by: Optional[str] + last_modified_by_type: Optional[Union[str, CreatedByType]] @overload def __init__( self, *, - cpu_limit: Optional[str] = ..., - cpu_request: Optional[str] = ..., - memory_limit: Optional[str] = ..., - memory_request: Optional[str] = ... + created_at: Optional[datetime] = ..., + created_by: Optional[str] = ..., + created_by_type: Optional[Union[str, CreatedByType]] = ..., + last_modified_at: Optional[datetime] = ..., + last_modified_by: Optional[str] = ..., + last_modified_by_type: Optional[Union[str, CreatedByType]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ResourceReference(_Model): - id: Optional[str] + class azure.mgmt.containerservice.models.TagsObject(_Model): + tags: Optional[dict[str, str]] @overload def __init__( self, *, - id: Optional[str] = ... + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - READ_ONLY = "ReadOnly" - UNRESTRICTED = "Unrestricted" - - - class azure.mgmt.containerservice.models.RunCommandRequest(_Model): - cluster_token: Optional[str] - command: str - context: Optional[str] + class azure.mgmt.containerservice.models.TimeInWeek(_Model): + day: Optional[Union[str, WeekDay]] + hour_slots: Optional[list[int]] @overload def __init__( self, - *, - cluster_token: Optional[str] = ..., - command: str, - context: Optional[str] = ... + *, + day: Optional[Union[str, WeekDay]] = ..., + hour_slots: Optional[list[int]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.RunCommandResult(_Model): - id: Optional[str] - properties: Optional[CommandResultProperties] - - def __getattr__(self, name: str) -> Any: ... + class azure.mgmt.containerservice.models.TimeSpan(_Model): + end: Optional[datetime] + start: Optional[datetime] @overload def __init__( self, *, - properties: Optional[CommandResultProperties] = ... + end: Optional[datetime] = ..., + start: Optional[datetime] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - - class azure.mgmt.containerservice.models.ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEALLOCATE = "Deallocate" - DELETE = "Delete" - - class azure.mgmt.containerservice.models.ScaleProfile(_Model): - autoscale: Optional[list[AutoScaleProfile]] - manual: Optional[list[ManualScaleProfile]] + class azure.mgmt.containerservice.models.TrackedResource(Resource): + id: str + location: str + name: str + system_data: SystemData + tags: Optional[dict[str, str]] + type: str @overload def __init__( self, *, - autoscale: Optional[list[AutoScaleProfile]] = ..., - manual: Optional[list[ManualScaleProfile]] = ... + location: str, + tags: Optional[dict[str, str]] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.ScaleSetEvictionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEALLOCATE = "Deallocate" - DELETE = "Delete" + class azure.mgmt.containerservice.models.TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + M_TLS = "mTLS" + NONE = "None" + WIRE_GUARD = "WireGuard" - class azure.mgmt.containerservice.models.ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): - REGULAR = "Regular" - SPOT = "Spot" + class azure.mgmt.containerservice.models.TrustedAccessRole(_Model): + name: Optional[str] + rules: Optional[list[TrustedAccessRoleRule]] + source_resource_type: Optional[str] - class azure.mgmt.containerservice.models.Schedule(_Model): - absolute_monthly: Optional[AbsoluteMonthlySchedule] - daily: Optional[DailySchedule] - relative_monthly: Optional[RelativeMonthlySchedule] - weekly: Optional[WeeklySchedule] + class azure.mgmt.containerservice.models.TrustedAccessRoleBinding(ProxyResource): + id: str + name: str + properties: TrustedAccessRoleBindingProperties + system_data: SystemData + type: str + + def __getattr__(self, name: str) -> Any: ... @overload def __init__( self, *, - absolute_monthly: Optional[AbsoluteMonthlySchedule] = ..., - daily: Optional[DailySchedule] = ..., - relative_monthly: Optional[RelativeMonthlySchedule] = ..., - weekly: Optional[WeeklySchedule] = ... + properties: TrustedAccessRoleBindingProperties ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - class azure.mgmt.containerservice.models.SchedulerConfigMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DEFAULT = "Default" - MANAGED_BY_CRD = "ManagedByCRD" + def __setattr__( + self, + key: str, + value: Any + ) -> None: ... - class azure.mgmt.containerservice.models.SchedulerInstanceProfile(_Model): - scheduler_config_mode: Optional[Union[str, SchedulerConfigMode]] + class azure.mgmt.containerservice.models.TrustedAccessRoleBindingProperties(_Model): + provisioning_state: Optional[Union[str, TrustedAccessRoleBindingProvisioningState]] + roles: list[str] + source_resource_id: str @overload def __init__( self, *, - scheduler_config_mode: Optional[Union[str, SchedulerConfigMode]] = ... + roles: list[str], + source_resource_id: str ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.SchedulerProfile(_Model): - upstream: Optional[SchedulerInstanceProfile] + class azure.mgmt.containerservice.models.TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANCELED = "Canceled" + DELETING = "Deleting" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + UPDATING = "Updating" - @overload - def __init__( - self, - *, - upstream: Optional[SchedulerInstanceProfile] = ... - ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + class azure.mgmt.containerservice.models.TrustedAccessRoleRule(_Model): + api_groups: Optional[list[str]] + non_resource_ur_ls: Optional[list[str]] + resource_names: Optional[list[str]] + resources: Optional[list[str]] + verbs: Optional[list[str]] - class azure.mgmt.containerservice.models.ServiceMeshMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - DISABLED = "Disabled" - ISTIO = "Istio" + class azure.mgmt.containerservice.models.Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FIRST = "First" + FOURTH = "Fourth" + LAST = "Last" + SECOND = "Second" + THIRD = "Third" - class azure.mgmt.containerservice.models.ServiceMeshProfile(_Model): - istio: Optional[IstioServiceMesh] - mode: Union[str, ServiceMeshMode] + class azure.mgmt.containerservice.models.UndrainableNodeBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CORDON = "Cordon" + SCHEDULE = "Schedule" + + + class azure.mgmt.containerservice.models.UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NODE_IMAGE = "node-image" + NONE = "none" + PATCH = "patch" + RAPID = "rapid" + STABLE = "stable" + + + class azure.mgmt.containerservice.models.UpgradeOverrideSettings(_Model): + force_upgrade: Optional[bool] + until: Optional[datetime] @overload def __init__( self, *, - istio: Optional[IstioServiceMesh] = ..., - mode: Union[str, ServiceMeshMode] + force_upgrade: Optional[bool] = ..., + until: Optional[datetime] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.Snapshot(TrackedResource): - id: str - location: str - name: str - properties: Optional[SnapshotProperties] - system_data: SystemData - tags: dict[str, str] - type: str + class azure.mgmt.containerservice.models.UpgradeStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BLUE_GREEN = "BlueGreen" + ROLLING = "Rolling" - def __getattr__(self, name: str) -> Any: ... + + class azure.mgmt.containerservice.models.UserAssignedIdentity(_Model): + client_id: Optional[str] + object_id: Optional[str] + resource_id: Optional[str] @overload def __init__( self, *, - location: str, - properties: Optional[SnapshotProperties] = ..., - tags: Optional[dict[str, str]] = ... + client_id: Optional[str] = ..., + object_id: Optional[str] = ..., + resource_id: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - def __setattr__( - self, - key: str, - value: Any - ) -> None: ... - - class azure.mgmt.containerservice.models.SnapshotProperties(_Model): - creation_data: Optional[CreationData] - enable_fips: Optional[bool] - kubernetes_version: Optional[str] - node_image_version: Optional[str] - os_sku: Optional[Union[str, _models.OSSKU]] - os_type: Optional[Union[str, OSType]] - snapshot_type: Optional[Union[str, SnapshotType]] - vm_size: Optional[str] + class azure.mgmt.containerservice.models.VirtualMachineNodes(_Model): + count: Optional[int] + size: Optional[str] @overload def __init__( self, *, - creation_data: Optional[CreationData] = ..., - snapshot_type: Optional[Union[str, SnapshotType]] = ... + count: Optional[int] = ..., + size: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NODE_POOL = "NodePool" - - - class azure.mgmt.containerservice.models.SysctlConfig(_Model): - fs_aio_max_nr: Optional[int] - fs_file_max: Optional[int] - fs_inotify_max_user_watches: Optional[int] - fs_nr_open: Optional[int] - kernel_threads_max: Optional[int] - net_core_netdev_max_backlog: Optional[int] - net_core_optmem_max: Optional[int] - net_core_rmem_default: Optional[int] - net_core_rmem_max: Optional[int] - net_core_somaxconn: Optional[int] - net_core_wmem_default: Optional[int] - net_core_wmem_max: Optional[int] - net_ipv4_ip_local_port_range: Optional[str] - net_ipv4_neigh_default_gc_thresh1: Optional[int] - net_ipv4_neigh_default_gc_thresh2: Optional[int] - net_ipv4_neigh_default_gc_thresh3: Optional[int] - net_ipv4_tcp_fin_timeout: Optional[int] - net_ipv4_tcp_keepalive_probes: Optional[int] - net_ipv4_tcp_keepalive_time: Optional[int] - net_ipv4_tcp_max_syn_backlog: Optional[int] - net_ipv4_tcp_max_tw_buckets: Optional[int] - net_ipv4_tcp_tw_reuse: Optional[bool] - net_ipv4_tcpkeepalive_intvl: Optional[int] - net_netfilter_nf_conntrack_buckets: Optional[int] - net_netfilter_nf_conntrack_max: Optional[int] - vm_max_map_count: Optional[int] - vm_swappiness: Optional[int] - vm_vfs_cache_pressure: Optional[int] + class azure.mgmt.containerservice.models.VirtualMachinesProfile(_Model): + scale: Optional[ScaleProfile] @overload def __init__( self, *, - fs_aio_max_nr: Optional[int] = ..., - fs_file_max: Optional[int] = ..., - fs_inotify_max_user_watches: Optional[int] = ..., - fs_nr_open: Optional[int] = ..., - kernel_threads_max: Optional[int] = ..., - net_core_netdev_max_backlog: Optional[int] = ..., - net_core_optmem_max: Optional[int] = ..., - net_core_rmem_default: Optional[int] = ..., - net_core_rmem_max: Optional[int] = ..., - net_core_somaxconn: Optional[int] = ..., - net_core_wmem_default: Optional[int] = ..., - net_core_wmem_max: Optional[int] = ..., - net_ipv4_ip_local_port_range: Optional[str] = ..., - net_ipv4_neigh_default_gc_thresh1: Optional[int] = ..., - net_ipv4_neigh_default_gc_thresh2: Optional[int] = ..., - net_ipv4_neigh_default_gc_thresh3: Optional[int] = ..., - net_ipv4_tcp_fin_timeout: Optional[int] = ..., - net_ipv4_tcp_keepalive_probes: Optional[int] = ..., - net_ipv4_tcp_keepalive_time: Optional[int] = ..., - net_ipv4_tcp_max_syn_backlog: Optional[int] = ..., - net_ipv4_tcp_max_tw_buckets: Optional[int] = ..., - net_ipv4_tcp_tw_reuse: Optional[bool] = ..., - net_ipv4_tcpkeepalive_intvl: Optional[int] = ..., - net_netfilter_nf_conntrack_buckets: Optional[int] = ..., - net_netfilter_nf_conntrack_max: Optional[int] = ..., - vm_max_map_count: Optional[int] = ..., - vm_swappiness: Optional[int] = ..., - vm_vfs_cache_pressure: Optional[int] = ... + scale: Optional[ScaleProfile] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.SystemData(_Model): - created_at: Optional[datetime] - created_by: Optional[str] - created_by_type: Optional[Union[str, CreatedByType]] - last_modified_at: Optional[datetime] - last_modified_by: Optional[str] - last_modified_by_type: Optional[Union[str, CreatedByType]] + class azure.mgmt.containerservice.models.VmState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETED = "Deleted" + RUNNING = "Running" + + + class azure.mgmt.containerservice.models.WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FRIDAY = "Friday" + MONDAY = "Monday" + SATURDAY = "Saturday" + SUNDAY = "Sunday" + THURSDAY = "Thursday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + + + class azure.mgmt.containerservice.models.WeeklySchedule(_Model): + day_of_week: Union[str, WeekDay] + interval_weeks: int @overload def __init__( self, *, - created_at: Optional[datetime] = ..., - created_by: Optional[str] = ..., - created_by_type: Optional[Union[str, CreatedByType]] = ..., - last_modified_at: Optional[datetime] = ..., - last_modified_by: Optional[str] = ..., - last_modified_by_type: Optional[Union[str, CreatedByType]] = ... + day_of_week: Union[str, WeekDay], + interval_weeks: int ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.TagsObject(_Model): - tags: Optional[dict[str, str]] + class azure.mgmt.containerservice.models.WindowsGmsaProfile(_Model): + dns_server: Optional[str] + enabled: Optional[bool] + root_domain_name: Optional[str] @overload def __init__( self, *, - tags: Optional[dict[str, str]] = ... + dns_server: Optional[str] = ..., + enabled: Optional[bool] = ..., + root_domain_name: Optional[str] = ... ) -> None: ... @overload def __init__(self, mapping: Mapping[str, Any]) -> None: ... - class azure.mgmt.containerservice.models.TimeInWeek(_Model): - day: Optional[Union[str, WeekDay]] - hour_slots: Optional[list[int]] + class azure.mgmt.containerservice.models.WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): + KATA_MSHV_VM_ISOLATION = "KataMshvVmIsolation" + KATA_VM_ISOLATION = "KataVmIsolation" + OCI_CONTAINER = "OCIContainer" + WASM_WASI = "WasmWasi" + + +namespace azure.mgmt.containerservice.operations + + class azure.mgmt.containerservice.operations.AgentPoolsOperations: - @overload def __init__( self, - *, - day: Optional[Union[str, WeekDay]] = ..., - hour_slots: Optional[list[int]] = ... + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + @distributed_trace + def begin_abort_latest_operation( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name']}, api_versions_list=['2026-06-02-preview']) + def begin_complete_upgrade( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.containerservice.models.TimeSpan(_Model): - end: Optional[datetime] - start: Optional[datetime] + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPool, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPool, *, - end: Optional[datetime] = ..., - start: Optional[datetime] = ... - ) -> None: ... + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + etag: Optional[str] = ..., + ignore_pod_disruption_budget: Optional[bool] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.containerservice.models.TrackedResource(Resource): - id: str - location: str - name: str - system_data: SystemData - tags: Optional[dict[str, str]] - type: str + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: AgentPoolDeleteMachinesParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def begin_delete_machines( self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: AgentPoolDeleteMachinesParameter, *, - location: str, - tags: Optional[dict[str, str]] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... - class azure.mgmt.containerservice.models.TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NONE = "None" - WIRE_GUARD = "WireGuard" + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = ..., + match_condition: Optional[MatchConditions] = ..., + **kwargs: Any + ) -> LROPoller[AgentPool]: ... + + @distributed_trace + def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + @distributed_trace + def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AgentPool: ... - class azure.mgmt.containerservice.models.TrustedAccessRole(_Model): - name: Optional[str] - rules: Optional[list[TrustedAccessRoleRule]] - source_resource_type: Optional[str] + @distributed_trace + def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AgentPoolAvailableVersions: ... + @distributed_trace + def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AgentPoolUpgradeProfile: ... - class azure.mgmt.containerservice.models.TrustedAccessRoleBinding(ProxyResource): - id: str - name: str - properties: TrustedAccessRoleBindingProperties - system_data: SystemData - type: str + @distributed_trace + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[AgentPool]: ... - def __getattr__(self, name: str) -> Any: ... + @overload + def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... @overload - def __init__( + def list_bootstrap_data( self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: ListBootstrapDataRequest, *, - properties: TrustedAccessRoleBindingProperties - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - def __setattr__( + def list_bootstrap_data( self, - key: str, - value: Any - ) -> None: ... + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> PoolBootstrapData: ... - class azure.mgmt.containerservice.models.TrustedAccessRoleBindingProperties(_Model): - provisioning_state: Optional[Union[str, TrustedAccessRoleBindingProvisioningState]] - roles: list[str] - source_resource_id: str + class azure.mgmt.containerservice.operations.AlertConfigurationsOperations: - @overload def __init__( self, - *, - roles: list[str], - source_resource_id: str + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + configuration_name: str, + resource: AlertConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AlertConfiguration]: ... - class azure.mgmt.containerservice.models.TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CANCELED = "Canceled" - DELETING = "Deleting" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - UPDATING = "Updating" + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + configuration_name: str, + resource: AlertConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AlertConfiguration]: ... + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + configuration_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AlertConfiguration]: ... - class azure.mgmt.containerservice.models.TrustedAccessRoleRule(_Model): - api_groups: Optional[list[str]] - non_resource_ur_ls: Optional[list[str]] - resource_names: Optional[list[str]] - resources: Optional[list[str]] - verbs: Optional[list[str]] + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'configuration_name']}, api_versions_list=['2026-06-02-preview']) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + configuration_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'configuration_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + configuration_name: str, + **kwargs: Any + ) -> AlertConfiguration: ... - class azure.mgmt.containerservice.models.Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FIRST = "First" - FOURTH = "Fourth" - LAST = "Last" - SECOND = "Second" - THIRD = "Third" + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[AlertConfiguration]: ... - class azure.mgmt.containerservice.models.UndrainableNodeBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): - CORDON = "Cordon" - SCHEDULE = "Schedule" + class azure.mgmt.containerservice.operations.ContainerServiceOperations: + def __init__( + self, + *args, + **kwargs + ) -> None: ... - class azure.mgmt.containerservice.models.UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - NODE_IMAGE = "node-image" - NONE = "none" - PATCH = "patch" - RAPID = "rapid" - STABLE = "stable" + @distributed_trace + def list_node_image_versions( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[NodeImageVersion]: ... - class azure.mgmt.containerservice.models.UpgradeOverrideSettings(_Model): - force_upgrade: Optional[bool] - until: Optional[datetime] + class azure.mgmt.containerservice.operations.IdentityBindingsOperations: - @overload def __init__( self, - *, - force_upgrade: Optional[bool] = ..., - until: Optional[datetime] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.UserAssignedIdentity(_Model): - client_id: Optional[str] - object_id: Optional[str] - resource_id: Optional[str] + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: IdentityBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[IdentityBinding]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: IdentityBinding, *, - client_id: Optional[str] = ..., - object_id: Optional[str] = ..., - resource_id: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[IdentityBinding]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[IdentityBinding]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.containerservice.models.VirtualMachineNodes(_Model): - count: Optional[int] - size: Optional[str] + @distributed_trace + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + **kwargs: Any + ) -> IdentityBinding: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[IdentityBinding]: ... + + + class azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations: - @overload def __init__( self, - *, - count: Optional[int] = ..., - size: Optional[str] = ... + *args, + **kwargs ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.VirtualMachinesProfile(_Model): - scale: Optional[ScaleProfile] + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + jwt_authenticator_name: str, + parameters: JWTAuthenticator, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[JWTAuthenticator]: ... @overload - def __init__( + def begin_create_or_update( self, + resource_group_name: str, + resource_name: str, + jwt_authenticator_name: str, + parameters: JWTAuthenticator, *, - scale: Optional[ScaleProfile] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[JWTAuthenticator]: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + jwt_authenticator_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[JWTAuthenticator]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'jwt_authenticator_name']}, api_versions_list=['2026-06-02-preview']) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + jwt_authenticator_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... - class azure.mgmt.containerservice.models.WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): - FRIDAY = "Friday" - MONDAY = "Monday" - SATURDAY = "Saturday" - SUNDAY = "Sunday" - THURSDAY = "Thursday" - TUESDAY = "Tuesday" - WEDNESDAY = "Wednesday" + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'jwt_authenticator_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + jwt_authenticator_name: str, + **kwargs: Any + ) -> JWTAuthenticator: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[JWTAuthenticator]: ... - class azure.mgmt.containerservice.models.WeeklySchedule(_Model): - day_of_week: Union[str, WeekDay] - interval_weeks: int + class azure.mgmt.containerservice.operations.LoadBalancersOperations: - @overload def __init__( self, - *, - day_of_week: Union[str, WeekDay], - interval_weeks: int + *args, + **kwargs ) -> None: ... - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... - - - class azure.mgmt.containerservice.models.WindowsGmsaProfile(_Model): - dns_server: Optional[str] - enabled: Optional[bool] - root_domain_name: Optional[str] + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'load_balancer_name']}, api_versions_list=['2026-06-02-preview']) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... @overload - def __init__( + def create_or_update( self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: LoadBalancer, *, - dns_server: Optional[str] = ..., - enabled: Optional[bool] = ..., - root_domain_name: Optional[str] = ... - ) -> None: ... + content_type: str = "application/json", + **kwargs: Any + ) -> LoadBalancer: ... @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: ... + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: LoadBalancer, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LoadBalancer: ... + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LoadBalancer: ... - class azure.mgmt.containerservice.models.WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): - KATA_VM_ISOLATION = "KataVmIsolation" - OCI_CONTAINER = "OCIContainer" - WASM_WASI = "WasmWasi" + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'load_balancer_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> LoadBalancer: ... + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[LoadBalancer]: ... -namespace azure.mgmt.containerservice.operations - class azure.mgmt.containerservice.operations.AgentPoolsOperations: + class azure.mgmt.containerservice.operations.MachinesOperations: def __init__( self, @@ -5504,28 +8492,20 @@ namespace azure.mgmt.containerservice.operations **kwargs ) -> None: ... - @distributed_trace - def begin_abort_latest_operation( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... - @overload def begin_create_or_update( self, resource_group_name: str, resource_name: str, agent_pool_name: str, - parameters: AgentPool, + machine_name: str, + parameters: Machine, *, content_type: str = "application/json", etag: Optional[str] = ..., match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> LROPoller[AgentPool]: ... + ) -> LROPoller[Machine]: ... @overload def begin_create_or_update( @@ -5533,13 +8513,14 @@ namespace azure.mgmt.containerservice.operations resource_group_name: str, resource_name: str, agent_pool_name: str, - parameters: AgentPool, + machine_name: str, + parameters: Machine, *, content_type: str = "application/json", etag: Optional[str] = ..., match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> LROPoller[AgentPool]: ... + ) -> LROPoller[Machine]: ... @overload def begin_create_or_update( @@ -5547,108 +8528,107 @@ namespace azure.mgmt.containerservice.operations resource_group_name: str, resource_name: str, agent_pool_name: str, + machine_name: str, parameters: IO[bytes], *, content_type: str = "application/json", etag: Optional[str] = ..., match_condition: Optional[MatchConditions] = ..., **kwargs: Any - ) -> LROPoller[AgentPool]: ... + ) -> LROPoller[Machine]: ... @distributed_trace - def begin_delete( + def get( self, resource_group_name: str, resource_name: str, agent_pool_name: str, - *, - etag: Optional[str] = ..., - ignore_pod_disruption_budget: Optional[bool] = ..., - match_condition: Optional[MatchConditions] = ..., + machine_name: str, **kwargs: Any - ) -> LROPoller[None]: ... + ) -> Machine: ... - @overload - def begin_delete_machines( + @distributed_trace + def list( self, resource_group_name: str, resource_name: str, agent_pool_name: str, - machines: AgentPoolDeleteMachinesParameter, - *, - content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... + ) -> ItemPaged[Machine]: ... + + + class azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... @overload - def begin_delete_machines( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machines: AgentPoolDeleteMachinesParameter, + config_name: str, + parameters: MaintenanceConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... + ) -> MaintenanceConfiguration: ... @overload - def begin_delete_machines( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machines: IO[bytes], + config_name: str, + parameters: MaintenanceConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: ... - - @distributed_trace - def begin_upgrade_node_image_version( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - **kwargs: Any - ) -> LROPoller[None]: ... + ) -> MaintenanceConfiguration: ... - @distributed_trace - def get( + @overload + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, + config_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> AgentPool: ... + ) -> MaintenanceConfiguration: ... @distributed_trace - def get_available_agent_pool_versions( + def delete( self, resource_group_name: str, resource_name: str, + config_name: str, **kwargs: Any - ) -> AgentPoolAvailableVersions: ... + ) -> None: ... @distributed_trace - def get_upgrade_profile( + def get( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, + config_name: str, **kwargs: Any - ) -> AgentPoolUpgradeProfile: ... + ) -> MaintenanceConfiguration: ... @distributed_trace - def list( + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged[AgentPool]: ... + ) -> ItemPaged[MaintenanceConfiguration]: ... - class azure.mgmt.containerservice.operations.IdentityBindingsOperations: + class azure.mgmt.containerservice.operations.MaintenanceWindowsOperations: def __init__( self, @@ -5660,97 +8640,100 @@ namespace azure.mgmt.containerservice.operations def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: IdentityBinding, + maintenance_window_name: str, + resource: MaintenanceWindowResource, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[IdentityBinding]: ... + ) -> LROPoller[MaintenanceWindowResource]: ... @overload def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: IdentityBinding, + maintenance_window_name: str, + resource: MaintenanceWindowResource, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[IdentityBinding]: ... + ) -> LROPoller[MaintenanceWindowResource]: ... @overload def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: IO[bytes], + maintenance_window_name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[IdentityBinding]: ... + ) -> LROPoller[MaintenanceWindowResource]: ... @distributed_trace - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'maintenance_window_name']}, api_versions_list=['2026-06-02-preview']) def begin_delete( self, resource_group_name: str, - resource_name: str, - identity_binding_name: str, + maintenance_window_name: str, **kwargs: Any ) -> LROPoller[None]: ... @distributed_trace - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'identity_binding_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'maintenance_window_name', 'accept']}, api_versions_list=['2026-06-02-preview']) def get( self, resource_group_name: str, - resource_name: str, - identity_binding_name: str, + maintenance_window_name: str, **kwargs: Any - ) -> IdentityBinding: ... + ) -> MaintenanceWindowResource: ... @distributed_trace - @api_version_validation(method_added_on='2026-04-01', params_added_on={'2026-04-01': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-04-01', '2026-05-01', '2026-06-01']) - def list_by_managed_cluster( + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list( self, resource_group_name: str, - resource_name: str, **kwargs: Any - ) -> ItemPaged[IdentityBinding]: ... + ) -> ItemPaged[MaintenanceWindowResource]: ... + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged[MaintenanceWindowResource]: ... - class azure.mgmt.containerservice.operations.MachinesOperations: - - def __init__( + @overload + def update_tags( self, - *args, - **kwargs - ) -> None: ... + resource_group_name: str, + maintenance_window_name: str, + properties: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> MaintenanceWindowResource: ... - @distributed_trace - def get( + @overload + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, + maintenance_window_name: str, + properties: TagsObject, + *, + content_type: str = "application/json", **kwargs: Any - ) -> Machine: ... + ) -> MaintenanceWindowResource: ... - @distributed_trace - def list( + @overload + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, + maintenance_window_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> ItemPaged[Machine]: ... + ) -> MaintenanceWindowResource: ... - class azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations: + class azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations: def __init__( self, @@ -5763,62 +8746,96 @@ namespace azure.mgmt.containerservice.operations self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: MaintenanceConfiguration, + parameters: ManagedClusterSnapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> ManagedClusterSnapshot: ... @overload def create_or_update( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: MaintenanceConfiguration, + parameters: ManagedClusterSnapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> ManagedClusterSnapshot: ... @overload def create_or_update( self, resource_group_name: str, resource_name: str, - config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> ManagedClusterSnapshot: ... @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name']}, api_versions_list=['2026-06-02-preview']) def delete( self, resource_group_name: str, resource_name: str, - config_name: str, **kwargs: Any ) -> None: ... @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) def get( self, resource_group_name: str, resource_name: str, - config_name: str, **kwargs: Any - ) -> MaintenanceConfiguration: ... + ) -> ManagedClusterSnapshot: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list(self, **kwargs: Any) -> ItemPaged[ManagedClusterSnapshot]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> ItemPaged[ManagedClusterSnapshot]: ... + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedClusterSnapshot: ... + + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ManagedClusterSnapshot: ... - @distributed_trace - def list_by_managed_cluster( + @overload + def update_tags( self, resource_group_name: str, resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", **kwargs: Any - ) -> ItemPaged[MaintenanceConfiguration]: ... + ) -> ManagedClusterSnapshot: ... class azure.mgmt.containerservice.operations.ManagedClustersOperations: @@ -5877,16 +8894,51 @@ namespace azure.mgmt.containerservice.operations ) -> LROPoller[ManagedCluster]: ... @distributed_trace + @api_version_validation(params_added_on={'2026-06-02-preview': ['ignore_pod_disruption_budget']}, api_versions_list=['2025-10-01', '2026-01-01', '2026-02-01', '2026-03-01', '2026-04-01', '2026-05-01', '2026-06-01', '2026-06-02-preview']) def begin_delete( self, resource_group_name: str, resource_name: str, *, etag: Optional[str] = ..., + ignore_pod_disruption_budget: Optional[bool] = ..., match_condition: Optional[MatchConditions] = ..., **kwargs: Any ) -> LROPoller[None]: ... + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + @overload def begin_reset_aad_profile( self, @@ -6083,6 +9135,14 @@ namespace azure.mgmt.containerservice.operations **kwargs: Any ) -> Optional[RunCommandResult]: ... + @distributed_trace + def get_guardrails_versions( + self, + location: str, + version: str, + **kwargs: Any + ) -> GuardrailsAvailableVersion: ... + @distributed_trace def get_mesh_revision_profile( self, @@ -6100,6 +9160,14 @@ namespace azure.mgmt.containerservice.operations **kwargs: Any ) -> MeshUpgradeProfile: ... + @distributed_trace + def get_safeguards_versions( + self, + location: str, + version: str, + **kwargs: Any + ) -> SafeguardsAvailableVersion: ... + @distributed_trace def get_upgrade_profile( self, @@ -6149,6 +9217,13 @@ namespace azure.mgmt.containerservice.operations **kwargs: Any ) -> CredentialResults: ... + @distributed_trace + def list_guardrails_versions( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[GuardrailsAvailableVersion]: ... + @distributed_trace def list_kubernetes_versions( self, @@ -6179,6 +9254,13 @@ namespace azure.mgmt.containerservice.operations **kwargs: Any ) -> ItemPaged[OutboundEnvironmentEndpoint]: ... + @distributed_trace + def list_safeguards_versions( + self, + location: str, + **kwargs: Any + ) -> ItemPaged[SafeguardsAvailableVersion]: ... + class azure.mgmt.containerservice.operations.ManagedNamespacesOperations: @@ -6296,6 +9378,131 @@ namespace azure.mgmt.containerservice.operations ) -> ManagedNamespace: ... + class azure.mgmt.containerservice.operations.MeshMembershipsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: MeshMembership, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[MeshMembership]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: MeshMembership, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[MeshMembership]: ... + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[MeshMembership]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'mesh_membership_name']}, api_versions_list=['2026-06-02-preview']) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'mesh_membership_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + mesh_membership_name: str, + **kwargs: Any + ) -> MeshMembership: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[MeshMembership]: ... + + + class azure.mgmt.containerservice.operations.OperationStatusResultOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'operation_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get( + self, + resource_group_name: str, + resource_name: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name', 'operation_id', 'accept']}, api_versions_list=['2026-06-02-preview']) + def get_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + operation_id: str, + **kwargs: Any + ) -> OperationStatusResult: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> ItemPaged[OperationStatusResult]: ... + + @distributed_trace + @api_version_validation(method_added_on='2026-06-02-preview', params_added_on={'2026-06-02-preview': ['api_version', 'subscription_id', 'resource_group_name', 'resource_name', 'agent_pool_name', 'active_only', 'accept']}, api_versions_list=['2026-06-02-preview']) + def list_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + active_only: Optional[bool] = ..., + **kwargs: Any + ) -> ItemPaged[OperationStatusResult]: ... + + class azure.mgmt.containerservice.operations.Operations: def __init__( @@ -6626,6 +9833,24 @@ namespace azure.mgmt.containerservice.operations ) -> ItemPaged[TrustedAccessRole]: ... + class azure.mgmt.containerservice.operations.VmSkusOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @distributed_trace + def list( + self, + location: str, + *, + include_extended_locations: Optional[bool] = ..., + **kwargs: Any + ) -> ItemPaged[ResourceSku]: ... + + namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.AbsoluteMonthlySchedule(TypedDict, total=False): @@ -6688,6 +9913,17 @@ namespace azure.mgmt.containerservice.types enabled: bool + class azure.mgmt.containerservice.types.AgentPoolBlueGreenUpgradeSettings(TypedDict, total=False): + key "batchSoakDurationInMinutes": int + key "drainBatchSize": str + key "drainTimeoutInMinutes": int + key "finalSoakDurationInMinutes": int + batchSoakDurationInMinutes: int + drainBatchSize: str + drainTimeoutInMinutes: int + finalSoakDurationInMinutes: int + + class azure.mgmt.containerservice.types.AgentPoolDeleteMachinesParameter(TypedDict, total=False): key "machineNames": Required[list[str]] machineNames: list[str] @@ -6709,6 +9945,7 @@ namespace azure.mgmt.containerservice.types key "enableEncryptionAtHost": bool key "enableFIPS": bool key "enableNodePublicIP": bool + key "enableOSDiskFullCaching": bool key "enableUltraSSD": bool key "gatewayProfile": ForwardRef('AgentPoolGatewayProfile', module='types') key "gpuInstanceProfile": Union[str, GPUInstanceProfile] @@ -6734,6 +9971,7 @@ namespace azure.mgmt.containerservice.types key "podIPAllocationMode": Union[str, PodIPAllocationMode] key "podSubnetID": str key "powerState": ForwardRef('PowerState', module='types') + key "preparedImageSpecificationProfile": ForwardRef('PreparedImageSpecificationProfile', module='types') key "provisioningState": str key "proximityPlacementGroupID": str key "scaleDownMode": Union[str, ScaleDownMode] @@ -6744,6 +9982,8 @@ namespace azure.mgmt.containerservice.types key "status": ForwardRef('AgentPoolStatus', module='types') key "type": Union[str, AgentPoolType] key "upgradeSettings": ForwardRef('AgentPoolUpgradeSettings', module='types') + key "upgradeSettingsBlueGreen": ForwardRef('AgentPoolBlueGreenUpgradeSettings', module='types') + key "upgradeStrategy": Union[str, UpgradeStrategy] key "virtualMachinesProfile": ForwardRef('VirtualMachinesProfile', module='types') key "vmSize": str key "vnetSubnetID": str @@ -6760,6 +10000,7 @@ namespace azure.mgmt.containerservice.types enableEncryptionAtHost: bool enableFIPS: bool enableNodePublicIP: bool + enableOSDiskFullCaching: bool enableUltraSSD: bool gatewayProfile: AgentPoolGatewayProfile gpuInstanceProfile: Union[str, GPUInstanceProfile] @@ -6776,6 +10017,7 @@ namespace azure.mgmt.containerservice.types mode: Union[str, AgentPoolMode] networkProfile: AgentPoolNetworkProfile nodeImageVersion: str + nodeInitializationTaints: list[str] nodeLabels: dict[str, str] nodePublicIPPrefixID: str nodeTaints: list[str] @@ -6787,6 +10029,7 @@ namespace azure.mgmt.containerservice.types podIPAllocationMode: Union[str, PodIPAllocationMode] podSubnetID: str powerState: PowerState + preparedImageSpecificationProfile: PreparedImageSpecificationProfile provisioningState: str proximityPlacementGroupID: str scaleDownMode: Union[str, ScaleDownMode] @@ -6798,6 +10041,8 @@ namespace azure.mgmt.containerservice.types tags: dict[str, str] type: Union[str, AgentPoolType] upgradeSettings: AgentPoolUpgradeSettings + upgradeSettingsBlueGreen: AgentPoolBlueGreenUpgradeSettings + upgradeStrategy: Union[str, UpgradeStrategy] virtualMachineNodesStatus: list[VirtualMachineNodes] virtualMachinesProfile: VirtualMachinesProfile vmSize: str @@ -6806,12 +10051,33 @@ namespace azure.mgmt.containerservice.types workloadRuntime: Union[str, WorkloadRuntime] + class azure.mgmt.containerservice.types.AgentPoolNICPublicIPAddressConfiguration(TypedDict, total=False): + key "publicIPAddressVersion": Required[Union[str, AgentPoolNICPublicIPAddressVersion]] + key "publicIPPrefixID": str + ipTags: list[IPTag] + publicIPAddressVersion: Union[str, AgentPoolNICPublicIPAddressVersion] + publicIPPrefixID: str + + + class azure.mgmt.containerservice.types.AgentPoolNetworkInterface(TypedDict, total=False): + key "enableAcceleratedNetworking": bool + key "publicIPAddressConfiguration": ForwardRef('AgentPoolNICPublicIPAddressConfiguration', module='types') + key "type": Union[str, AgentPoolNetworkInterfaceType] + key "vnetSubnetId": str + enableAcceleratedNetworking: bool + publicIPAddressConfiguration: AgentPoolNICPublicIPAddressConfiguration + type: Union[str, AgentPoolNetworkInterfaceType] + vnetSubnetId: str + + class azure.mgmt.containerservice.types.AgentPoolNetworkProfile(TypedDict, total=False): key "dranet": ForwardRef('DRANETProfile', module='types') allowedHostPorts: list[PortRange] applicationSecurityGroups: list[str] dranet: DRANETProfile + nodePublicIPPrefixIDs: list[str] nodePublicIPTags: list[IPTag] + secondaryNetworkInterfaces: list[AgentPoolNetworkInterface] class azure.mgmt.containerservice.types.AgentPoolSecurityProfile(TypedDict, total=False): @@ -6828,13 +10094,43 @@ namespace azure.mgmt.containerservice.types provisioningError: ErrorDetail + class azure.mgmt.containerservice.types.AgentPoolUpdate(TypedDict, total=False): + key "properties": ForwardRef('AgentPoolUpdateProperties', module='types') + properties: AgentPoolUpdateProperties + + + class azure.mgmt.containerservice.types.AgentPoolUpdateManualScaleProfile(TypedDict, total=False): + key "count": int + key "size": str + count: int + size: str + + + class azure.mgmt.containerservice.types.AgentPoolUpdateProperties(TypedDict, total=False): + key "count": int + key "virtualMachinesProfile": ForwardRef('AgentPoolUpdateVirtualMachinesProfile', module='types') + count: int + virtualMachinesProfile: AgentPoolUpdateVirtualMachinesProfile + + + class azure.mgmt.containerservice.types.AgentPoolUpdateScaleProfile(TypedDict, total=False): + manual: list[AgentPoolUpdateManualScaleProfile] + + + class azure.mgmt.containerservice.types.AgentPoolUpdateVirtualMachinesProfile(TypedDict, total=False): + key "scale": ForwardRef('AgentPoolUpdateScaleProfile', module='types') + scale: AgentPoolUpdateScaleProfile + + class azure.mgmt.containerservice.types.AgentPoolUpgradeSettings(TypedDict, total=False): key "drainTimeoutInMinutes": int + key "maxBlockedNodes": str key "maxSurge": str key "maxUnavailable": str key "nodeSoakDurationInMinutes": int key "undrainableNodeBehavior": Union[str, UndrainableNodeBehavior] drainTimeoutInMinutes: int + maxBlockedNodes: str maxSurge: str maxUnavailable: str nodeSoakDurationInMinutes: int @@ -6846,6 +10142,40 @@ namespace azure.mgmt.containerservice.types disableOutboundNat: bool + class azure.mgmt.containerservice.types.AlertConfiguration(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('AlertConfigurationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: AlertConfigurationProperties + systemData: SystemData + type: str + + + class azure.mgmt.containerservice.types.AlertConfigurationProperties(TypedDict, total=False): + key "mode": Required[Union[str, AlertConfigurationMode]] + key "notification": Required[AlertNotification] + key "provisioningState": Union[str, AlertConfigurationProvisioningState] + mode: Union[str, AlertConfigurationMode] + notification: AlertNotification + provisioningState: Union[str, AlertConfigurationProvisioningState] + + + class azure.mgmt.containerservice.types.AlertNotification(TypedDict, total=False): + key "actionGroupId": Required[str] + actionGroupId: str + + + class azure.mgmt.containerservice.types.AllowedSubject(TypedDict, total=False): + key "namespaceSelector": Required[LabelSelector] + key "serviceAccountSelector": ForwardRef('LabelSelector', module='types') + namespaceSelector: LabelSelector + serviceAccountSelector: LabelSelector + + class azure.mgmt.containerservice.types.AutoScaleProfile(TypedDict, total=False): key "maxCount": int key "minCount": int @@ -6866,6 +10196,29 @@ namespace azure.mgmt.containerservice.types keyVaultResourceId: str + class azure.mgmt.containerservice.types.BastionProfile(TypedDict, total=False): + key "bastionId": str + key "enabled": bool + key "publicIpAddressId": str + key "scaleUnits": int + key "sku": Union[str, BastionSku] + bastionId: str + enabled: bool + publicIpAddressId: str + scaleUnits: int + sku: Union[str, BastionSku] + + + class azure.mgmt.containerservice.types.CapacityReservation(TypedDict, total=False): + key "capacityReservationGroup": ForwardRef('CapacityReservationGroup', module='types') + capacityReservationGroup: CapacityReservationGroup + + + class azure.mgmt.containerservice.types.CapacityReservationGroup(TypedDict, total=False): + key "id": str + id: str + + class azure.mgmt.containerservice.types.ClusterUpgradeSettings(TypedDict, total=False): key "overrideSettings": ForwardRef('UpgradeOverrideSettings', module='types') overrideSettings: UpgradeOverrideSettings @@ -6880,9 +10233,12 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.ContainerServiceNetworkProfile(TypedDict, total=False): key "advancedNetworking": ForwardRef('AdvancedNetworking', module='types') + key "bastionProfile": ForwardRef('BastionProfile', module='types') key "dnsServiceIP": str + key "kubeProxyConfig": ForwardRef('ContainerServiceNetworkProfileKubeProxyConfig', module='types') key "loadBalancerProfile": ForwardRef('ManagedClusterLoadBalancerProfile', module='types') key "loadBalancerSku": Union[str, LoadBalancerSku] + key "natGatewayId": str key "natGatewayProfile": ForwardRef('ManagedClusterNATGatewayProfile', module='types') key "networkDataplane": Union[str, NetworkDataplane] key "networkMode": Union[str, NetworkMode] @@ -6891,13 +10247,17 @@ namespace azure.mgmt.containerservice.types key "networkPolicy": Union[str, NetworkPolicy] key "outboundType": Union[str, OutboundType] key "podCidr": str + key "podLinkLocalAccess": Union[str, PodLinkLocalAccess] key "serviceCidr": str key "staticEgressGatewayProfile": ForwardRef('ManagedClusterStaticEgressGatewayProfile', module='types') advancedNetworking: AdvancedNetworking + bastionProfile: BastionProfile dnsServiceIP: str ipFamilies: list[Union[str, IPFamily]] + kubeProxyConfig: ContainerServiceNetworkProfileKubeProxyConfig loadBalancerProfile: ManagedClusterLoadBalancerProfile loadBalancerSku: Union[str, LoadBalancerSku] + natGatewayId: str natGatewayProfile: ManagedClusterNATGatewayProfile networkDataplane: Union[str, NetworkDataplane] networkMode: Union[str, NetworkMode] @@ -6907,11 +10267,32 @@ namespace azure.mgmt.containerservice.types outboundType: Union[str, OutboundType] podCidr: str podCidrs: list[str] + podLinkLocalAccess: Union[str, PodLinkLocalAccess] serviceCidr: str serviceCidrs: list[str] staticEgressGatewayProfile: ManagedClusterStaticEgressGatewayProfile + class azure.mgmt.containerservice.types.ContainerServiceNetworkProfileKubeProxyConfig(TypedDict, total=False): + key "enabled": bool + key "ipvsConfig": ForwardRef('ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig', module='types') + key "mode": Union[str, Mode] + enabled: bool + ipvsConfig: ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + mode: Union[str, Mode] + + + class azure.mgmt.containerservice.types.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(TypedDict, total=False): + key "scheduler": Union[str, IpvsScheduler] + key "tcpFinTimeoutSeconds": int + key "tcpTimeoutSeconds": int + key "udpTimeoutSeconds": int + scheduler: Union[str, IpvsScheduler] + tcpFinTimeoutSeconds: int + tcpTimeoutSeconds: int + udpTimeoutSeconds: int + + class azure.mgmt.containerservice.types.ContainerServiceSshConfiguration(TypedDict, total=False): key "publicKeys": Required[list[ContainerServiceSshPublicKey]] publicKeys: list[ContainerServiceSshPublicKey] @@ -6982,7 +10363,20 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.GPUProfile(TypedDict, total=False): key "driver": Union[str, GPUDriver] + key "driverType": Union[str, DriverType] + key "nvidia": ForwardRef('NvidiaGPUProfile', module='types') driver: Union[str, GPUDriver] + driverType: Union[str, DriverType] + nvidia: NvidiaGPUProfile + + + class azure.mgmt.containerservice.types.HardEvictionThreshold(TypedDict, total=False): + key "memoryAvailable": str + key "nodeFsAvailable": str + key "nodeFsInodesFree": str + memoryAvailable: str + nodeFsAvailable: str + nodeFsInodesFree: str class azure.mgmt.containerservice.types.IPTag(TypedDict, total=False): @@ -7027,6 +10421,7 @@ namespace azure.mgmt.containerservice.types key "managedIdentity": Required[IdentityBindingManagedIdentityProfile] key "oidcIssuer": ForwardRef('IdentityBindingOidcIssuerProfile', module='types') key "provisioningState": Union[str, IdentityBindingProvisioningState] + allowedSubjects: list[AllowedSubject] managedIdentity: IdentityBindingManagedIdentityProfile oidcIssuer: IdentityBindingOidcIssuerProfile provisioningState: Union[str, IdentityBindingProvisioningState] @@ -7075,12 +10470,81 @@ namespace azure.mgmt.containerservice.types rootCertObjectName: str - class azure.mgmt.containerservice.types.IstioServiceMesh(TypedDict, total=False): - key "certificateAuthority": ForwardRef('IstioCertificateAuthority', module='types') - key "components": ForwardRef('IstioComponents', module='types') - certificateAuthority: IstioCertificateAuthority - components: IstioComponents - revisions: list[str] + class azure.mgmt.containerservice.types.IstioServiceMesh(TypedDict, total=False): + key "certificateAuthority": ForwardRef('IstioCertificateAuthority', module='types') + key "components": ForwardRef('IstioComponents', module='types') + certificateAuthority: IstioCertificateAuthority + components: IstioComponents + revisions: list[str] + + + class azure.mgmt.containerservice.types.JWTAuthenticator(ProxyResource): + key "id": str + key "name": str + key "properties": Required[JWTAuthenticatorProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: JWTAuthenticatorProperties + systemData: SystemData + type: str + + + class azure.mgmt.containerservice.types.JWTAuthenticatorClaimMappingExpression(TypedDict, total=False): + key "expression": Required[str] + expression: str + + + class azure.mgmt.containerservice.types.JWTAuthenticatorClaimMappings(TypedDict, total=False): + key "groups": ForwardRef('JWTAuthenticatorClaimMappingExpression', module='types') + key "uid": ForwardRef('JWTAuthenticatorClaimMappingExpression', module='types') + key "username": Required[JWTAuthenticatorClaimMappingExpression] + extra: list[JWTAuthenticatorExtraClaimMappingExpression] + groups: JWTAuthenticatorClaimMappingExpression + uid: JWTAuthenticatorClaimMappingExpression + username: JWTAuthenticatorClaimMappingExpression + + + class azure.mgmt.containerservice.types.JWTAuthenticatorExtraClaimMappingExpression(TypedDict, total=False): + key "key": Required[str] + key "valueExpression": Required[str] + key: str + valueExpression: str + + + class azure.mgmt.containerservice.types.JWTAuthenticatorIssuer(TypedDict, total=False): + key "audiences": Required[list[str]] + key "url": Required[str] + audiences: list[str] + url: str + + + class azure.mgmt.containerservice.types.JWTAuthenticatorProperties(TypedDict, total=False): + key "certificateAuthorityBundle": str + key "claimMappings": Required[JWTAuthenticatorClaimMappings] + key "issuer": Required[JWTAuthenticatorIssuer] + key "provisioningState": Union[str, JWTAuthenticatorProvisioningState] + certificateAuthorityBundle: str + claimMappings: JWTAuthenticatorClaimMappings + claimValidationRules: list[JWTAuthenticatorValidationRule] + issuer: JWTAuthenticatorIssuer + provisioningState: Union[str, JWTAuthenticatorProvisioningState] + userValidationRules: list[JWTAuthenticatorValidationRule] + + + class azure.mgmt.containerservice.types.JWTAuthenticatorValidationRule(TypedDict, total=False): + key "expression": Required[str] + key "message": str + expression: str + message: str + + + class azure.mgmt.containerservice.types.KubeReserved(TypedDict, total=False): + key "cpuMillicores": int + key "memoryMB": int + cpuMillicores: int + memoryMB: int class azure.mgmt.containerservice.types.KubeletConfig(TypedDict, total=False): @@ -7089,10 +10553,16 @@ namespace azure.mgmt.containerservice.types key "cpuCfsQuota": bool key "cpuCfsQuotaPeriod": str key "cpuManagerPolicy": str + key "evictionMaxPodGracePeriodInSeconds": int key "failSwapOn": bool + key "hardEvictionThreshold": ForwardRef('HardEvictionThreshold', module='types') key "imageGcHighThreshold": int key "imageGcLowThreshold": int + key "kubeReserved": ForwardRef('KubeReserved', module='types') key "podMaxPids": int + key "seccompDefault": Union[str, SeccompDefault] + key "softEvictionGracePeriod": ForwardRef('SoftEvictionGracePeriod', module='types') + key "softEvictionThreshold": ForwardRef('SoftEvictionThreshold', module='types') key "topologyManagerPolicy": str allowedUnsafeSysctls: list[str] containerLogMaxFiles: int @@ -7100,13 +10570,37 @@ namespace azure.mgmt.containerservice.types cpuCfsQuota: bool cpuCfsQuotaPeriod: str cpuManagerPolicy: str + evictionMaxPodGracePeriodInSeconds: int failSwapOn: bool + hardEvictionThreshold: HardEvictionThreshold imageGcHighThreshold: int imageGcLowThreshold: int + kubeReserved: KubeReserved podMaxPids: int + seccompDefault: Union[str, SeccompDefault] + softEvictionGracePeriod: SoftEvictionGracePeriod + softEvictionThreshold: SoftEvictionThreshold topologyManagerPolicy: str + class azure.mgmt.containerservice.types.KubernetesResourceObjectEncryptionProfile(TypedDict, total=False): + key "infrastructureEncryption": Union[str, InfrastructureEncryption] + infrastructureEncryption: Union[str, InfrastructureEncryption] + + + class azure.mgmt.containerservice.types.LabelSelector(TypedDict, total=False): + matchExpressions: list[LabelSelectorRequirement] + matchLabels: list[str] + + + class azure.mgmt.containerservice.types.LabelSelectorRequirement(TypedDict, total=False): + key "key": str + key "operator": Union[str, Operator] + key: str + operator: Union[str, Operator] + values: list[str] + + class azure.mgmt.containerservice.types.LinuxOSConfig(TypedDict, total=False): key "swapFileSizeMB": int key "sysctls": ForwardRef('SysctlConfig', module='types') @@ -7118,6 +10612,37 @@ namespace azure.mgmt.containerservice.types transparentHugePageEnabled: str + class azure.mgmt.containerservice.types.ListBootstrapDataRequest(TypedDict, total=False): + + + class azure.mgmt.containerservice.types.LoadBalancer(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('LoadBalancerProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: LoadBalancerProperties + systemData: SystemData + type: str + + + class azure.mgmt.containerservice.types.LoadBalancerProperties(TypedDict, total=False): + key "allowServicePlacement": bool + key "nodeSelector": ForwardRef('LabelSelector', module='types') + key "primaryAgentPoolName": Required[str] + key "provisioningState": str + key "serviceLabelSelector": ForwardRef('LabelSelector', module='types') + key "serviceNamespaceSelector": ForwardRef('LabelSelector', module='types') + allowServicePlacement: bool + nodeSelector: LabelSelector + primaryAgentPoolName: str + provisioningState: str + serviceLabelSelector: LabelSelector + serviceNamespaceSelector: LabelSelector + + class azure.mgmt.containerservice.types.LocalDNSOverride(TypedDict, total=False): key "cacheDurationInSeconds": int key "forwardDestination": Union[str, LocalDNSForwardDestination] @@ -7146,6 +10671,162 @@ namespace azure.mgmt.containerservice.types vnetDNSOverrides: dict[str, LocalDNSOverride] + class azure.mgmt.containerservice.types.Machine(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('MachineProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: MachineProperties + systemData: SystemData + type: str + zones: list[str] + + + class azure.mgmt.containerservice.types.MachineBillingProfile(TypedDict, total=False): + key "spotMaxPrice": float + spotMaxPrice: float + + + class azure.mgmt.containerservice.types.MachineHardwareProfile(TypedDict, total=False): + key "gpuInstanceProfile": Union[str, GPUInstanceProfile] + key "gpuProfile": ForwardRef('GPUProfile', module='types') + key "ultraSsdEnabled": bool + key "vmSize": str + gpuInstanceProfile: Union[str, GPUInstanceProfile] + gpuProfile: GPUProfile + ultraSsdEnabled: bool + vmSize: str + + + class azure.mgmt.containerservice.types.MachineIpAddress(TypedDict, total=False): + key "family": Union[str, IPFamily] + key "ip": str + family: Union[str, IPFamily] + ip: str + + + class azure.mgmt.containerservice.types.MachineKubernetesProfile(TypedDict, total=False): + key "artifactStreamingProfile": ForwardRef('AgentPoolArtifactStreamingProfile', module='types') + key "currentOrchestratorVersion": str + key "kubeletConfig": ForwardRef('KubeletConfig', module='types') + key "kubeletDiskType": Union[str, KubeletDiskType] + key "maxPods": int + key "nodeName": str + key "orchestratorVersion": str + key "workloadRuntime": Union[str, WorkloadRuntime] + artifactStreamingProfile: AgentPoolArtifactStreamingProfile + currentOrchestratorVersion: str + kubeletConfig: KubeletConfig + kubeletDiskType: Union[str, KubeletDiskType] + maxPods: int + nodeInitializationTaints: list[str] + nodeLabels: dict[str, str] + nodeName: str + nodeTaints: list[str] + orchestratorVersion: str + workloadRuntime: Union[str, WorkloadRuntime] + + + class azure.mgmt.containerservice.types.MachineNetworkProperties(TypedDict, total=False): + key "enableNodePublicIP": bool + key "nodePublicIPPrefixID": str + key "podSubnetID": str + key "vnetSubnetID": str + enableNodePublicIP: bool + ipAddresses: list[MachineIpAddress] + nodePublicIPPrefixID: str + nodePublicIPTags: list[IPTag] + podSubnetID: str + vnetSubnetID: str + + + class azure.mgmt.containerservice.types.MachineOSProfile(TypedDict, total=False): + key "enableFIPS": bool + key "linuxProfile": ForwardRef('MachineOSProfileLinuxProfile', module='types') + key "osDiskSizeGB": int + key "osDiskType": Union[str, OSDiskType] + key "osSKU": Union[str, OSSKU] + key "osType": Union[str, OSType] + key "windowsProfile": ForwardRef('AgentPoolWindowsProfile', module='types') + enableFIPS: bool + linuxProfile: MachineOSProfileLinuxProfile + osDiskSizeGB: int + osDiskType: Union[str, OSDiskType] + osSKU: Union[str, OSSKU] + osType: Union[str, OSType] + windowsProfile: AgentPoolWindowsProfile + + + class azure.mgmt.containerservice.types.MachineOSProfileLinuxProfile(TypedDict, total=False): + key "linuxOSConfig": ForwardRef('LinuxOSConfig', module='types') + key "messageOfTheDay": str + linuxOSConfig: LinuxOSConfig + messageOfTheDay: str + + + class azure.mgmt.containerservice.types.MachineProperties(TypedDict, total=False): + key "billing": ForwardRef('MachineBillingProfile', module='types') + key "capacityReservation": ForwardRef('CapacityReservation', module='types') + key "eTag": str + key "evictionPolicy": Union[str, ScaleSetEvictionPolicy] + key "hardware": ForwardRef('MachineHardwareProfile', module='types') + key "kubernetes": ForwardRef('MachineKubernetesProfile', module='types') + key "localDNSProfile": ForwardRef('LocalDNSProfile', module='types') + key "mode": Union[str, AgentPoolMode] + key "network": ForwardRef('MachineNetworkProperties', module='types') + key "nodeImageVersion": str + key "operatingSystem": ForwardRef('MachineOSProfile', module='types') + key "priority": Union[str, ScaleSetPriority] + key "provisioningState": str + key "resourceId": str + key "security": ForwardRef('MachineSecurityProfile', module='types') + key "status": ForwardRef('MachineStatus', module='types') + billing: MachineBillingProfile + capacityReservation: CapacityReservation + eTag: str + evictionPolicy: Union[str, ScaleSetEvictionPolicy] + hardware: MachineHardwareProfile + kubernetes: MachineKubernetesProfile + localDNSProfile: LocalDNSProfile + mode: Union[str, AgentPoolMode] + network: MachineNetworkProperties + nodeImageVersion: str + operatingSystem: MachineOSProfile + priority: Union[str, ScaleSetPriority] + provisioningState: str + resourceId: str + security: MachineSecurityProfile + status: MachineStatus + tags: dict[str, str] + + + class azure.mgmt.containerservice.types.MachineSecurityProfile(TypedDict, total=False): + key "enableEncryptionAtHost": bool + key "enableSecureBoot": bool + key "enableVTPM": bool + key "sshAccess": Union[str, AgentPoolSSHAccess] + enableEncryptionAtHost: bool + enableSecureBoot: bool + enableVTPM: bool + sshAccess: Union[str, AgentPoolSSHAccess] + + + class azure.mgmt.containerservice.types.MachineStatus(TypedDict, total=False): + key "creationTimestamp": str + key "driftAction": Union[str, DriftAction] + key "driftReason": str + key "provisioningError": ForwardRef('ErrorDetail', module='types') + key "vmState": Union[str, VmState] + creationTimestamp: str + driftAction: Union[str, DriftAction] + driftReason: str + provisioningError: ErrorDetail + vmState: Union[str, VmState] + + class azure.mgmt.containerservice.types.MaintenanceConfiguration(ProxyResource): key "id": str key "name": str @@ -7161,7 +10842,9 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.MaintenanceConfigurationProperties(TypedDict, total=False): key "maintenanceWindow": ForwardRef('MaintenanceWindow', module='types') + key "maintenanceWindowId": str maintenanceWindow: MaintenanceWindow + maintenanceWindowId: str notAllowedTime: list[TimeSpan] timeInWeek: list[TimeInWeek] @@ -7180,6 +10863,38 @@ namespace azure.mgmt.containerservice.types utcOffset: str + class azure.mgmt.containerservice.types.MaintenanceWindowResource(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('MaintenanceWindowResourceProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: MaintenanceWindowResourceProperties + systemData: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.containerservice.types.MaintenanceWindowResourceProperties(TypedDict, total=False): + key "durationHours": Required[int] + key "provisioningState": Union[str, ResourceProvisioningState] + key "schedule": Required[Schedule] + key "startDate": str + key "startTime": Required[str] + key "utcOffset": str + durationHours: int + notAllowedDates: list[DateSpan] + provisioningState: Union[str, ResourceProvisioningState] + schedule: Schedule + startDate: str + startTime: str + utcOffset: str + + class azure.mgmt.containerservice.types.ManagedCluster(TrackedResource): key "eTag": str key "extendedLocation": ForwardRef('ExtendedLocation', module='types') @@ -7271,6 +10986,7 @@ namespace azure.mgmt.containerservice.types key "enableEncryptionAtHost": bool key "enableFIPS": bool key "enableNodePublicIP": bool + key "enableOSDiskFullCaching": bool key "enableUltraSSD": bool key "gatewayProfile": ForwardRef('AgentPoolGatewayProfile', module='types') key "gpuInstanceProfile": Union[str, GPUInstanceProfile] @@ -7297,6 +11013,7 @@ namespace azure.mgmt.containerservice.types key "podIPAllocationMode": Union[str, PodIPAllocationMode] key "podSubnetID": str key "powerState": ForwardRef('PowerState', module='types') + key "preparedImageSpecificationProfile": ForwardRef('PreparedImageSpecificationProfile', module='types') key "provisioningState": str key "proximityPlacementGroupID": str key "scaleDownMode": Union[str, ScaleDownMode] @@ -7307,6 +11024,8 @@ namespace azure.mgmt.containerservice.types key "status": ForwardRef('AgentPoolStatus', module='types') key "type": Union[str, AgentPoolType] key "upgradeSettings": ForwardRef('AgentPoolUpgradeSettings', module='types') + key "upgradeSettingsBlueGreen": ForwardRef('AgentPoolBlueGreenUpgradeSettings', module='types') + key "upgradeStrategy": Union[str, UpgradeStrategy] key "virtualMachinesProfile": ForwardRef('VirtualMachinesProfile', module='types') key "vmSize": str key "vnetSubnetID": str @@ -7323,6 +11042,7 @@ namespace azure.mgmt.containerservice.types enableEncryptionAtHost: bool enableFIPS: bool enableNodePublicIP: bool + enableOSDiskFullCaching: bool enableUltraSSD: bool gatewayProfile: AgentPoolGatewayProfile gpuInstanceProfile: Union[str, GPUInstanceProfile] @@ -7340,6 +11060,7 @@ namespace azure.mgmt.containerservice.types name: str networkProfile: AgentPoolNetworkProfile nodeImageVersion: str + nodeInitializationTaints: list[str] nodeLabels: dict[str, str] nodePublicIPPrefixID: str nodeTaints: list[str] @@ -7351,6 +11072,7 @@ namespace azure.mgmt.containerservice.types podIPAllocationMode: Union[str, PodIPAllocationMode] podSubnetID: str powerState: PowerState + preparedImageSpecificationProfile: PreparedImageSpecificationProfile provisioningState: str proximityPlacementGroupID: str scaleDownMode: Union[str, ScaleDownMode] @@ -7362,6 +11084,8 @@ namespace azure.mgmt.containerservice.types tags: dict[str, str] type: Union[str, AgentPoolType] upgradeSettings: AgentPoolUpgradeSettings + upgradeSettingsBlueGreen: AgentPoolBlueGreenUpgradeSettings + upgradeStrategy: Union[str, UpgradeStrategy] virtualMachineNodesStatus: list[VirtualMachineNodes] virtualMachinesProfile: VirtualMachinesProfile vmSize: str @@ -7381,6 +11105,7 @@ namespace azure.mgmt.containerservice.types key "enableEncryptionAtHost": bool key "enableFIPS": bool key "enableNodePublicIP": bool + key "enableOSDiskFullCaching": bool key "enableUltraSSD": bool key "gatewayProfile": ForwardRef('AgentPoolGatewayProfile', module='types') key "gpuInstanceProfile": Union[str, GPUInstanceProfile] @@ -7406,6 +11131,7 @@ namespace azure.mgmt.containerservice.types key "podIPAllocationMode": Union[str, PodIPAllocationMode] key "podSubnetID": str key "powerState": ForwardRef('PowerState', module='types') + key "preparedImageSpecificationProfile": ForwardRef('PreparedImageSpecificationProfile', module='types') key "provisioningState": str key "proximityPlacementGroupID": str key "scaleDownMode": Union[str, ScaleDownMode] @@ -7416,6 +11142,8 @@ namespace azure.mgmt.containerservice.types key "status": ForwardRef('AgentPoolStatus', module='types') key "type": Union[str, AgentPoolType] key "upgradeSettings": ForwardRef('AgentPoolUpgradeSettings', module='types') + key "upgradeSettingsBlueGreen": ForwardRef('AgentPoolBlueGreenUpgradeSettings', module='types') + key "upgradeStrategy": Union[str, UpgradeStrategy] key "virtualMachinesProfile": ForwardRef('VirtualMachinesProfile', module='types') key "vmSize": str key "vnetSubnetID": str @@ -7432,6 +11160,7 @@ namespace azure.mgmt.containerservice.types enableEncryptionAtHost: bool enableFIPS: bool enableNodePublicIP: bool + enableOSDiskFullCaching: bool enableUltraSSD: bool gatewayProfile: AgentPoolGatewayProfile gpuInstanceProfile: Union[str, GPUInstanceProfile] @@ -7448,6 +11177,7 @@ namespace azure.mgmt.containerservice.types mode: Union[str, AgentPoolMode] networkProfile: AgentPoolNetworkProfile nodeImageVersion: str + nodeInitializationTaints: list[str] nodeLabels: dict[str, str] nodePublicIPPrefixID: str nodeTaints: list[str] @@ -7459,6 +11189,7 @@ namespace azure.mgmt.containerservice.types podIPAllocationMode: Union[str, PodIPAllocationMode] podSubnetID: str powerState: PowerState + preparedImageSpecificationProfile: PreparedImageSpecificationProfile provisioningState: str proximityPlacementGroupID: str scaleDownMode: Union[str, ScaleDownMode] @@ -7470,6 +11201,8 @@ namespace azure.mgmt.containerservice.types tags: dict[str, str] type: Union[str, AgentPoolType] upgradeSettings: AgentPoolUpgradeSettings + upgradeSettingsBlueGreen: AgentPoolBlueGreenUpgradeSettings + upgradeStrategy: Union[str, UpgradeStrategy] virtualMachineNodesStatus: list[VirtualMachineNodes] virtualMachinesProfile: VirtualMachinesProfile vmSize: str @@ -7572,6 +11305,11 @@ namespace azure.mgmt.containerservice.types containerRegistryId: str + class azure.mgmt.containerservice.types.ManagedClusterControlPlaneScalingProfile(TypedDict, total=False): + key "scalingSize": Required[Union[str, ControlPlaneScalingSize]] + scalingSize: Union[str, ControlPlaneScalingSize] + + class azure.mgmt.containerservice.types.ManagedClusterCostAnalysis(TypedDict, total=False): key "enabled": bool enabled: bool @@ -7582,6 +11320,7 @@ namespace azure.mgmt.containerservice.types key "httpProxy": str key "httpsProxy": str key "trustedCa": str + effectiveNoProxy: list[str] enabled: bool httpProxy: str httpsProxy: str @@ -7589,6 +11328,13 @@ namespace azure.mgmt.containerservice.types trustedCa: str + class azure.mgmt.containerservice.types.ManagedClusterHealthMonitorProfile(TypedDict, total=False): + key "enableContinuousControlPlaneAndAddonMonitor": bool + key "enableOnDemandMonitor": bool + enableContinuousControlPlaneAndAddonMonitor: bool + enableOnDemandMonitor: bool + + class azure.mgmt.containerservice.types.ManagedClusterHostedSystemProfile(TypedDict, total=False): key "enabled": bool key "nodeSubnetID": str @@ -7609,13 +11355,29 @@ namespace azure.mgmt.containerservice.types userAssignedIdentities: dict[str, ManagedServiceIdentityUserAssignedIdentitiesValue] + class azure.mgmt.containerservice.types.ManagedClusterIngressDefaultDomainProfile(TypedDict, total=False): + key "domainName": str + key "enabled": bool + domainName: str + enabled: bool + + class azure.mgmt.containerservice.types.ManagedClusterIngressProfile(TypedDict, total=False): + key "applicationLoadBalancer": ForwardRef('ManagedClusterIngressProfileApplicationLoadBalancer', module='types') key "gatewayAPI": ForwardRef('ManagedClusterIngressProfileGatewayConfiguration', module='types') key "webAppRouting": ForwardRef('ManagedClusterIngressProfileWebAppRouting', module='types') + applicationLoadBalancer: ManagedClusterIngressProfileApplicationLoadBalancer gatewayAPI: ManagedClusterIngressProfileGatewayConfiguration webAppRouting: ManagedClusterIngressProfileWebAppRouting + class azure.mgmt.containerservice.types.ManagedClusterIngressProfileApplicationLoadBalancer(TypedDict, total=False): + key "enabled": bool + key "identity": ForwardRef('UserAssignedIdentity', module='types') + enabled: bool + identity: UserAssignedIdentity + + class azure.mgmt.containerservice.types.ManagedClusterIngressProfileGatewayConfiguration(TypedDict, total=False): key "installation": Union[str, ManagedGatewayType] installation: Union[str, ManagedGatewayType] @@ -7627,10 +11389,12 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.ManagedClusterIngressProfileWebAppRouting(TypedDict, total=False): + key "defaultDomain": ForwardRef('ManagedClusterIngressDefaultDomainProfile', module='types') key "enabled": bool key "gatewayAPIImplementations": ForwardRef('ManagedClusterWebAppRoutingGatewayAPIImplementations', module='types') key "identity": ForwardRef('UserAssignedIdentity', module='types') key "nginx": ForwardRef('ManagedClusterIngressProfileNginx', module='types') + defaultDomain: ManagedClusterIngressDefaultDomainProfile dnsZoneResourceIds: list[str] enabled: bool gatewayAPIImplementations: ManagedClusterWebAppRoutingGatewayAPIImplementations @@ -7641,6 +11405,7 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.ManagedClusterLoadBalancerProfile(TypedDict, total=False): key "allocatedOutboundPorts": int key "backendPoolType": Union[str, BackendPoolType] + key "clusterServiceLoadBalancerHealthProbeMode": Union[str, ClusterServiceLoadBalancerHealthProbeMode] key "enableMultipleStandardLoadBalancers": bool key "idleTimeoutInMinutes": int key "managedOutboundIPs": ForwardRef('ManagedClusterLoadBalancerProfileManagedOutboundIPs', module='types') @@ -7648,6 +11413,7 @@ namespace azure.mgmt.containerservice.types key "outboundIPs": ForwardRef('ManagedClusterLoadBalancerProfileOutboundIPs', module='types') allocatedOutboundPorts: int backendPoolType: Union[str, BackendPoolType] + clusterServiceLoadBalancerHealthProbeMode: Union[str, ClusterServiceLoadBalancerHealthProbeMode] effectiveOutboundIPs: list[ResourceReference] enableMultipleStandardLoadBalancers: bool idleTimeoutInMinutes: int @@ -7786,13 +11552,19 @@ namespace azure.mgmt.containerservice.types key "azureMonitorProfile": ForwardRef('ManagedClusterAzureMonitorProfile', module='types') key "azurePortalFQDN": str key "bootstrapProfile": ForwardRef('ManagedClusterBootstrapProfile', module='types') + key "controlPlaneScalingProfile": ForwardRef('ManagedClusterControlPlaneScalingProfile', module='types') + key "creationData": ForwardRef('CreationData', module='types') key "currentKubernetesVersion": str key "disableLocalAccounts": bool key "diskEncryptionSetID": str key "dnsPrefix": str + key "enableFIPS": bool + key "enableNamespaceResources": bool + key "enableNodeHardening": bool key "enableRBAC": bool key "fqdn": str key "fqdnSubdomain": str + key "healthMonitorProfile": ForwardRef('ManagedClusterHealthMonitorProfile', module='types') key "hostedSystemProfile": ForwardRef('ManagedClusterHostedSystemProfile', module='types') key "httpProxyConfig": ForwardRef('ManagedClusterHTTPProxyConfig', module='types') key "ingressProfile": ForwardRef('ManagedClusterIngressProfile', module='types') @@ -7801,6 +11573,7 @@ namespace azure.mgmt.containerservice.types key "maxAgentPools": int key "metricsProfile": ForwardRef('ManagedClusterMetricsProfile', module='types') key "networkProfile": ForwardRef('ContainerServiceNetworkProfile', module='types') + key "nodeDisruptionProfile": ForwardRef('NodeDisruptionProfile', module='types') key "nodeProvisioningProfile": ForwardRef('ManagedClusterNodeProvisioningProfile', module='types') key "nodeResourceGroup": str key "nodeResourceGroupProfile": ForwardRef('ManagedClusterNodeResourceGroupProfile', module='types') @@ -7831,13 +11604,19 @@ namespace azure.mgmt.containerservice.types azureMonitorProfile: ManagedClusterAzureMonitorProfile azurePortalFQDN: str bootstrapProfile: ManagedClusterBootstrapProfile + controlPlaneScalingProfile: ManagedClusterControlPlaneScalingProfile + creationData: CreationData currentKubernetesVersion: str disableLocalAccounts: bool diskEncryptionSetID: str dnsPrefix: str + enableFIPS: bool + enableNamespaceResources: bool + enableNodeHardening: bool enableRBAC: bool fqdn: str fqdnSubdomain: str + healthMonitorProfile: ManagedClusterHealthMonitorProfile hostedSystemProfile: ManagedClusterHostedSystemProfile httpProxyConfig: ManagedClusterHTTPProxyConfig identityProfile: dict[str, UserAssignedIdentity] @@ -7847,6 +11626,7 @@ namespace azure.mgmt.containerservice.types maxAgentPools: int metricsProfile: ManagedClusterMetricsProfile networkProfile: ContainerServiceNetworkProfile + nodeDisruptionProfile: NodeDisruptionProfile nodeProvisioningProfile: ManagedClusterNodeProvisioningProfile nodeResourceGroup: str nodeResourceGroupProfile: ManagedClusterNodeResourceGroupProfile @@ -7913,6 +11693,17 @@ namespace azure.mgmt.containerservice.types skip-nodes-with-system-pods: str + class azure.mgmt.containerservice.types.ManagedClusterPropertiesForSnapshot(TypedDict, total=False): + key "enableRbac": bool + key "kubernetesVersion": str + key "networkProfile": ForwardRef('NetworkProfileForSnapshot', module='types') + key "sku": ForwardRef('ManagedClusterSKU', module='types') + enableRbac: bool + kubernetesVersion: str + networkProfile: NetworkProfileForSnapshot + sku: ManagedClusterSKU + + class azure.mgmt.containerservice.types.ManagedClusterSKU(TypedDict, total=False): key "name": Union[str, ManagedClusterSKUName] key "tier": Union[str, ManagedClusterSKUTier] @@ -7924,11 +11715,19 @@ namespace azure.mgmt.containerservice.types key "azureKeyVaultKms": ForwardRef('AzureKeyVaultKms', module='types') key "defender": ForwardRef('ManagedClusterSecurityProfileDefender', module='types') key "imageCleaner": ForwardRef('ManagedClusterSecurityProfileImageCleaner', module='types') + key "imageIntegrity": ForwardRef('ManagedClusterSecurityProfileImageIntegrity', module='types') + key "kubernetesResourceObjectEncryptionProfile": ForwardRef('KubernetesResourceObjectEncryptionProfile', module='types') + key "nodeRestriction": ForwardRef('ManagedClusterSecurityProfileNodeRestriction', module='types') + key "serviceAccountImagePullProfile": ForwardRef('ServiceAccountImagePullProfile', module='types') key "workloadIdentity": ForwardRef('ManagedClusterSecurityProfileWorkloadIdentity', module='types') azureKeyVaultKms: AzureKeyVaultKms customCATrustCertificates: list[str] defender: ManagedClusterSecurityProfileDefender imageCleaner: ManagedClusterSecurityProfileImageCleaner + imageIntegrity: ManagedClusterSecurityProfileImageIntegrity + kubernetesResourceObjectEncryptionProfile: KubernetesResourceObjectEncryptionProfile + nodeRestriction: ManagedClusterSecurityProfileNodeRestriction + serviceAccountImagePullProfile: ServiceAccountImagePullProfile workloadIdentity: ManagedClusterSecurityProfileWorkloadIdentity @@ -7968,6 +11767,16 @@ namespace azure.mgmt.containerservice.types intervalHours: int + class azure.mgmt.containerservice.types.ManagedClusterSecurityProfileImageIntegrity(TypedDict, total=False): + key "enabled": bool + enabled: bool + + + class azure.mgmt.containerservice.types.ManagedClusterSecurityProfileNodeRestriction(TypedDict, total=False): + key "enabled": bool + enabled: bool + + class azure.mgmt.containerservice.types.ManagedClusterSecurityProfileWorkloadIdentity(TypedDict, total=False): key "enabled": bool enabled: bool @@ -7980,6 +11789,31 @@ namespace azure.mgmt.containerservice.types secret: str + class azure.mgmt.containerservice.types.ManagedClusterSnapshot(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('ManagedClusterSnapshotProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: ManagedClusterSnapshotProperties + systemData: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.containerservice.types.ManagedClusterSnapshotProperties(TypedDict, total=False): + key "creationData": ForwardRef('CreationData', module='types') + key "managedClusterPropertiesReadOnly": ForwardRef('ManagedClusterPropertiesForSnapshot', module='types') + key "snapshotType": Union[str, SnapshotType] + creationData: CreationData + managedClusterPropertiesReadOnly: ManagedClusterPropertiesForSnapshot + snapshotType: Union[str, SnapshotType] + + class azure.mgmt.containerservice.types.ManagedClusterStaticEgressGatewayProfile(TypedDict, total=False): key "enabled": bool enabled: bool @@ -8052,7 +11886,9 @@ namespace azure.mgmt.containerservice.types class azure.mgmt.containerservice.types.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(TypedDict, total=False): + key "addonAutoscaling": Union[str, AddonAutoscaling] key "enabled": Required[bool] + addonAutoscaling: Union[str, AddonAutoscaling] enabled: bool @@ -8088,6 +11924,39 @@ namespace azure.mgmt.containerservice.types size: str + class azure.mgmt.containerservice.types.MeshMembership(ProxyResource): + key "eTag": str + key "id": str + key "managedBy": str + key "name": str + key "properties": ForwardRef('MeshMembershipProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + eTag: str + id: str + managedBy: str + name: str + properties: MeshMembershipProperties + systemData: SystemData + type: str + + + class azure.mgmt.containerservice.types.MeshMembershipPrivateConnectProfile(TypedDict, total=False): + key "privateIpAddress": str + key "subnetResourceId": str + privateIpAddress: str + subnetResourceId: str + + + class azure.mgmt.containerservice.types.MeshMembershipProperties(TypedDict, total=False): + key "managedMeshID": Required[str] + key "privateConnectProfile": ForwardRef('MeshMembershipPrivateConnectProfile', module='types') + key "provisioningState": Union[str, MeshMembershipProvisioningState] + managedMeshID: str + privateConnectProfile: MeshMembershipPrivateConnectProfile + provisioningState: Union[str, MeshMembershipProvisioningState] + + class azure.mgmt.containerservice.types.NamespaceProperties(TypedDict, total=False): key "adoptionPolicy": Union[str, AdoptionPolicy] key "defaultNetworkPolicy": ForwardRef('NetworkPolicies', module='types') @@ -8112,6 +11981,33 @@ namespace azure.mgmt.containerservice.types ingress: Union[str, PolicyRule] + class azure.mgmt.containerservice.types.NetworkProfileForSnapshot(TypedDict, total=False): + key "loadBalancerSku": Union[str, LoadBalancerSku] + key "networkMode": Union[str, NetworkMode] + key "networkPlugin": Union[str, NetworkPlugin] + key "networkPluginMode": Union[str, NetworkPluginMode] + key "networkPolicy": Union[str, NetworkPolicy] + loadBalancerSku: Union[str, LoadBalancerSku] + networkMode: Union[str, NetworkMode] + networkPlugin: Union[str, NetworkPlugin] + networkPluginMode: Union[str, NetworkPluginMode] + networkPolicy: Union[str, NetworkPolicy] + + + class azure.mgmt.containerservice.types.NodeDisruptionProfile(TypedDict, total=False): + key "nodeDisruptionPolicy": Union[str, NodeDisruptionPolicy] + nodeDisruptionPolicy: Union[str, NodeDisruptionPolicy] + + + class azure.mgmt.containerservice.types.NvidiaGPUProfile(TypedDict, total=False): + key "driverMode": Union[str, NvidiaDriverMode] + key "managementMode": Union[str, ManagementMode] + key "migStrategy": Union[str, MigStrategy] + driverMode: Union[str, NvidiaDriverMode] + managementMode: Union[str, ManagementMode] + migStrategy: Union[str, MigStrategy] + + class azure.mgmt.containerservice.types.PortRange(TypedDict, total=False): key "portEnd": int key "portStart": int @@ -8126,6 +12022,11 @@ namespace azure.mgmt.containerservice.types code: Union[str, Code] + class azure.mgmt.containerservice.types.PreparedImageSpecificationProfile(TypedDict, total=False): + key "preparedImageSpecificationId": str + preparedImageSpecificationId: str + + class azure.mgmt.containerservice.types.PrivateEndpoint(TypedDict, total=False): key "id": str id: str @@ -8185,6 +12086,10 @@ namespace azure.mgmt.containerservice.types type: str + class azure.mgmt.containerservice.types.RebalanceLoadBalancersRequestBody(TypedDict, total=False): + loadBalancerNames: list[str] + + class azure.mgmt.containerservice.types.RelativeMonthlySchedule(TypedDict, total=False): key "dayOfWeek": Required[Union[str, WeekDay]] key "intervalMonths": Required[int] @@ -8256,6 +12161,13 @@ namespace azure.mgmt.containerservice.types upstream: SchedulerInstanceProfile + class azure.mgmt.containerservice.types.ServiceAccountImagePullProfile(TypedDict, total=False): + key "defaultManagedIdentityId": str + key "enabled": bool + defaultManagedIdentityId: str + enabled: bool + + class azure.mgmt.containerservice.types.ServiceMeshProfile(TypedDict, total=False): key "istio": ForwardRef('IstioServiceMesh', module='types') key "mode": Required[Union[str, ServiceMeshMode]] @@ -8298,6 +12210,24 @@ namespace azure.mgmt.containerservice.types vmSize: str + class azure.mgmt.containerservice.types.SoftEvictionGracePeriod(TypedDict, total=False): + key "memoryAvailable": str + key "nodeFsAvailable": str + key "nodeFsInodesFree": str + memoryAvailable: str + nodeFsAvailable: str + nodeFsInodesFree: str + + + class azure.mgmt.containerservice.types.SoftEvictionThreshold(TypedDict, total=False): + key "memoryAvailable": str + key "nodeFsAvailable": str + key "nodeFsInodesFree": str + memoryAvailable: str + nodeFsAvailable: str + nodeFsInodesFree: str + + class azure.mgmt.containerservice.types.SysctlConfig(TypedDict, total=False): key "fsAioMaxNr": int key "fsFileMax": int diff --git a/sdk/containerservice/azure-mgmt-containerservice/api.metadata.yml b/sdk/containerservice/azure-mgmt-containerservice/api.metadata.yml index c8e2f121e757..a50d1e024be4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/api.metadata.yml +++ b/sdk/containerservice/azure-mgmt-containerservice/api.metadata.yml @@ -1,3 +1,3 @@ -apiMdSha256: 0b547d46ceff29bc0b1b74dba6d75248b15fc0d78c22b16cdb5fc9b7b748e1aa +apiMdSha256: bbf551c511a3a05ae296c4d6e945520a1d12c89ca25495eb13e06aeb08b8861f parserVersion: 0.3.31 pythonVersion: 3.13.15 diff --git a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json index 8e7fc58d77c3..83df6144f1c5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json +++ b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json @@ -15,25 +15,51 @@ "azure.mgmt.containerservice.models.AgentPoolAvailableVersions": "Microsoft.ContainerService.AgentPoolAvailableVersions", "azure.mgmt.containerservice.models.AgentPoolAvailableVersionsProperties": "Microsoft.ContainerService.AgentPoolAvailableVersionsProperties", "azure.mgmt.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem": "Microsoft.ContainerService.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings": "Microsoft.ContainerService.AgentPoolBlueGreenUpgradeSettings", "azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter": "Microsoft.ContainerService.AgentPoolDeleteMachinesParameter", "azure.mgmt.containerservice.models.AgentPoolGatewayProfile": "Microsoft.ContainerService.AgentPoolGatewayProfile", "azure.mgmt.containerservice.models.AgentPoolManagedClusterAgentPoolProfileProperties": "Microsoft.ContainerService.AgentPoolManagedClusterAgentPoolProfileProperties", + "azure.mgmt.containerservice.models.AgentPoolNetworkInterface": "Microsoft.ContainerService.AgentPoolNetworkInterface", "azure.mgmt.containerservice.models.AgentPoolNetworkProfile": "Microsoft.ContainerService.AgentPoolNetworkProfile", + "azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressConfiguration": "Microsoft.ContainerService.AgentPoolNICPublicIPAddressConfiguration", "azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion": "Microsoft.ContainerService.AgentPoolRecentlyUsedVersion", "azure.mgmt.containerservice.models.AgentPoolSecurityProfile": "Microsoft.ContainerService.AgentPoolSecurityProfile", "azure.mgmt.containerservice.models.AgentPoolStatus": "Microsoft.ContainerService.AgentPoolStatus", + "azure.mgmt.containerservice.models.AgentPoolUpdate": "Microsoft.ContainerService.AgentPoolUpdate", + "azure.mgmt.containerservice.models.AgentPoolUpdateManualScaleProfile": "Microsoft.ContainerService.AgentPoolUpdateManualScaleProfile", + "azure.mgmt.containerservice.models.AgentPoolUpdateProperties": "Microsoft.ContainerService.AgentPoolUpdateProperties", + "azure.mgmt.containerservice.models.AgentPoolUpdateScaleProfile": "Microsoft.ContainerService.AgentPoolUpdateScaleProfile", + "azure.mgmt.containerservice.models.AgentPoolUpdateVirtualMachinesProfile": "Microsoft.ContainerService.AgentPoolUpdateVirtualMachinesProfile", "azure.mgmt.containerservice.models.AgentPoolUpgradeProfile": "Microsoft.ContainerService.AgentPoolUpgradeProfile", "azure.mgmt.containerservice.models.AgentPoolUpgradeProfileProperties": "Microsoft.ContainerService.AgentPoolUpgradeProfileProperties", "azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem": "Microsoft.ContainerService.AgentPoolUpgradeProfilePropertiesUpgradesItem", "azure.mgmt.containerservice.models.AgentPoolUpgradeSettings": "Microsoft.ContainerService.AgentPoolUpgradeSettings", "azure.mgmt.containerservice.models.AgentPoolWindowsProfile": "Microsoft.ContainerService.AgentPoolWindowsProfile", + "azure.mgmt.containerservice.models.AlertConfiguration": "Microsoft.ContainerService.AlertConfiguration", + "azure.mgmt.containerservice.models.AlertConfigurationProperties": "Microsoft.ContainerService.AlertConfigurationProperties", + "azure.mgmt.containerservice.models.AlertNotification": "Microsoft.ContainerService.AlertNotification", + "azure.mgmt.containerservice.models.AllowedSubject": "Microsoft.ContainerService.AllowedSubject", "azure.mgmt.containerservice.models.AutoScaleProfile": "Microsoft.ContainerService.AutoScaleProfile", "azure.mgmt.containerservice.models.AzureKeyVaultKms": "Microsoft.ContainerService.AzureKeyVaultKms", + "azure.mgmt.containerservice.models.BastionProfile": "Microsoft.ContainerService.BastionProfile", + "azure.mgmt.containerservice.models.BootstrapAzureConfig": "Microsoft.ContainerService.BootstrapAzureConfig", + "azure.mgmt.containerservice.models.BootstrapComponentVersions": "Microsoft.ContainerService.BootstrapComponentVersions", + "azure.mgmt.containerservice.models.BootstrapKubeletConfig": "Microsoft.ContainerService.BootstrapKubeletConfig", + "azure.mgmt.containerservice.models.BootstrapNetworkingConfig": "Microsoft.ContainerService.BootstrapNetworkingConfig", + "azure.mgmt.containerservice.models.BootstrapNodeConfig": "Microsoft.ContainerService.BootstrapNodeConfig", + "azure.mgmt.containerservice.models.BootstrapTargetCluster": "Microsoft.ContainerService.BootstrapTargetCluster", + "azure.mgmt.containerservice.models.BootstrapTokenInfo": "Microsoft.ContainerService.BootstrapTokenInfo", + "azure.mgmt.containerservice.models.CapacityReservation": "Microsoft.ContainerService.CapacityReservation", + "azure.mgmt.containerservice.models.CapacityReservationGroup": "Microsoft.ContainerService.CapacityReservationGroup", "azure.mgmt.containerservice.models.ClusterUpgradeSettings": "Microsoft.ContainerService.ClusterUpgradeSettings", "azure.mgmt.containerservice.models.CommandResultProperties": "Microsoft.ContainerService.CommandResultProperties", "azure.mgmt.containerservice.models.CompatibleVersions": "Microsoft.ContainerService.CompatibleVersions", + "azure.mgmt.containerservice.models.Component": "Microsoft.ContainerService.Component", + "azure.mgmt.containerservice.models.ComponentsByRelease": "Microsoft.ContainerService.ComponentsByRelease", "azure.mgmt.containerservice.models.ContainerServiceLinuxProfile": "Microsoft.ContainerService.ContainerServiceLinuxProfile", "azure.mgmt.containerservice.models.ContainerServiceNetworkProfile": "Microsoft.ContainerService.ContainerServiceNetworkProfile", + "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig": "Microsoft.ContainerService.ContainerServiceNetworkProfileKubeProxyConfig", + "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig": "Microsoft.ContainerService.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", "azure.mgmt.containerservice.models.ContainerServiceSshConfiguration": "Microsoft.ContainerService.ContainerServiceSshConfiguration", "azure.mgmt.containerservice.models.ContainerServiceSshPublicKey": "Microsoft.ContainerService.ContainerServiceSshPublicKey", "azure.mgmt.containerservice.models.CreationData": "Microsoft.ContainerService.CreationData", @@ -50,6 +76,9 @@ "azure.mgmt.containerservice.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", "azure.mgmt.containerservice.models.ExtendedLocation": "Microsoft.ContainerService.ExtendedLocation", "azure.mgmt.containerservice.models.GPUProfile": "Microsoft.ContainerService.GPUProfile", + "azure.mgmt.containerservice.models.GuardrailsAvailableVersion": "Microsoft.ContainerService.GuardrailsAvailableVersion", + "azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties": "Microsoft.ContainerService.GuardrailsAvailableVersionsProperties", + "azure.mgmt.containerservice.models.HardEvictionThreshold": "Microsoft.ContainerService.HardEvictionThreshold", "azure.mgmt.containerservice.models.IdentityBinding": "Microsoft.ContainerService.IdentityBinding", "azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile": "Microsoft.ContainerService.IdentityBindingManagedIdentityProfile", "azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile": "Microsoft.ContainerService.IdentityBindingOidcIssuerProfile", @@ -61,22 +90,45 @@ "azure.mgmt.containerservice.models.IstioIngressGateway": "Microsoft.ContainerService.IstioIngressGateway", "azure.mgmt.containerservice.models.IstioPluginCertificateAuthority": "Microsoft.ContainerService.IstioPluginCertificateAuthority", "azure.mgmt.containerservice.models.IstioServiceMesh": "Microsoft.ContainerService.IstioServiceMesh", + "azure.mgmt.containerservice.models.JWTAuthenticator": "Microsoft.ContainerService.JWTAuthenticator", + "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression": "Microsoft.ContainerService.JWTAuthenticatorClaimMappingExpression", + "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings": "Microsoft.ContainerService.JWTAuthenticatorClaimMappings", + "azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression": "Microsoft.ContainerService.JWTAuthenticatorExtraClaimMappingExpression", + "azure.mgmt.containerservice.models.JWTAuthenticatorIssuer": "Microsoft.ContainerService.JWTAuthenticatorIssuer", + "azure.mgmt.containerservice.models.JWTAuthenticatorProperties": "Microsoft.ContainerService.JWTAuthenticatorProperties", + "azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule": "Microsoft.ContainerService.JWTAuthenticatorValidationRule", "azure.mgmt.containerservice.models.KubeletConfig": "Microsoft.ContainerService.KubeletConfig", + "azure.mgmt.containerservice.models.KubeReserved": "Microsoft.ContainerService.KubeReserved", "azure.mgmt.containerservice.models.KubernetesPatchVersion": "Microsoft.ContainerService.KubernetesPatchVersion", + "azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile": "Microsoft.ContainerService.KubernetesResourceObjectEncryptionProfile", "azure.mgmt.containerservice.models.KubernetesVersion": "Microsoft.ContainerService.KubernetesVersion", "azure.mgmt.containerservice.models.KubernetesVersionCapabilities": "Microsoft.ContainerService.KubernetesVersionCapabilities", "azure.mgmt.containerservice.models.KubernetesVersionListResult": "Microsoft.ContainerService.KubernetesVersionListResult", + "azure.mgmt.containerservice.models.LabelSelector": "Microsoft.ContainerService.LabelSelector", + "azure.mgmt.containerservice.models.LabelSelectorRequirement": "Microsoft.ContainerService.LabelSelectorRequirement", "azure.mgmt.containerservice.models.LinuxOSConfig": "Microsoft.ContainerService.LinuxOSConfig", + "azure.mgmt.containerservice.models.ListBootstrapDataRequest": "Microsoft.ContainerService.ListBootstrapDataRequest", + "azure.mgmt.containerservice.models.LoadBalancer": "Microsoft.ContainerService.LoadBalancer", + "azure.mgmt.containerservice.models.LoadBalancerProperties": "Microsoft.ContainerService.LoadBalancerProperties", "azure.mgmt.containerservice.models.LocalDNSOverride": "Microsoft.ContainerService.LocalDNSOverride", "azure.mgmt.containerservice.models.LocalDNSProfile": "Microsoft.ContainerService.LocalDNSProfile", "azure.mgmt.containerservice.models.Machine": "Microsoft.ContainerService.Machine", + "azure.mgmt.containerservice.models.MachineBillingProfile": "Microsoft.ContainerService.MachineBillingProfile", + "azure.mgmt.containerservice.models.MachineHardwareProfile": "Microsoft.ContainerService.MachineHardwareProfile", "azure.mgmt.containerservice.models.MachineIpAddress": "Microsoft.ContainerService.MachineIpAddress", + "azure.mgmt.containerservice.models.MachineKubernetesProfile": "Microsoft.ContainerService.MachineKubernetesProfile", "azure.mgmt.containerservice.models.MachineNetworkProperties": "Microsoft.ContainerService.MachineNetworkProperties", + "azure.mgmt.containerservice.models.MachineOSProfile": "Microsoft.ContainerService.MachineOSProfile", + "azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile": "Microsoft.ContainerService.MachineOSProfileLinuxProfile", "azure.mgmt.containerservice.models.MachineProperties": "Microsoft.ContainerService.MachineProperties", + "azure.mgmt.containerservice.models.MachineSecurityProfile": "Microsoft.ContainerService.MachineSecurityProfile", + "azure.mgmt.containerservice.models.MachineStatus": "Microsoft.ContainerService.MachineStatus", "azure.mgmt.containerservice.models.MaintenanceConfiguration": "Microsoft.ContainerService.MaintenanceConfiguration", "azure.mgmt.containerservice.models.MaintenanceConfigurationProperties": "Microsoft.ContainerService.MaintenanceConfigurationProperties", "azure.mgmt.containerservice.models.MaintenanceWindow": "Microsoft.ContainerService.MaintenanceWindow", "azure.mgmt.containerservice.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.containerservice.models.MaintenanceWindowResource": "Microsoft.ContainerService.MaintenanceWindowResource", + "azure.mgmt.containerservice.models.MaintenanceWindowResourceProperties": "Microsoft.ContainerService.MaintenanceWindowResourceProperties", "azure.mgmt.containerservice.models.ManagedCluster": "Microsoft.ContainerService.ManagedCluster", "azure.mgmt.containerservice.models.ManagedClusterAADProfile": "Microsoft.ContainerService.ManagedClusterAADProfile", "azure.mgmt.containerservice.models.ManagedClusterAccessProfile": "Microsoft.ContainerService.ManagedClusterAccessProfile", @@ -99,11 +151,15 @@ "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileMetrics", "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetricsControlPlane": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileMetricsControlPlane", "azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile": "Microsoft.ContainerService.ManagedClusterBootstrapProfile", + "azure.mgmt.containerservice.models.ManagedClusterControlPlaneScalingProfile": "Microsoft.ContainerService.ManagedClusterControlPlaneScalingProfile", "azure.mgmt.containerservice.models.ManagedClusterCostAnalysis": "Microsoft.ContainerService.ManagedClusterCostAnalysis", + "azure.mgmt.containerservice.models.ManagedClusterHealthMonitorProfile": "Microsoft.ContainerService.ManagedClusterHealthMonitorProfile", "azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile": "Microsoft.ContainerService.ManagedClusterHostedSystemProfile", "azure.mgmt.containerservice.models.ManagedClusterHTTPProxyConfig": "Microsoft.ContainerService.ManagedClusterHTTPProxyConfig", "azure.mgmt.containerservice.models.ManagedClusterIdentity": "Microsoft.ContainerService.ManagedClusterIdentity", + "azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile": "Microsoft.ContainerService.ManagedClusterIngressDefaultDomainProfile", "azure.mgmt.containerservice.models.ManagedClusterIngressProfile": "Microsoft.ContainerService.ManagedClusterIngressProfile", + "azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer": "Microsoft.ContainerService.ManagedClusterIngressProfileApplicationLoadBalancer", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration": "Microsoft.ContainerService.ManagedClusterIngressProfileGatewayConfiguration", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx": "Microsoft.ContainerService.ManagedClusterIngressProfileNginx", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting": "Microsoft.ContainerService.ManagedClusterIngressProfileWebAppRouting", @@ -129,15 +185,20 @@ "azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem": "Microsoft.ContainerService.ManagedClusterPoolUpgradeProfileUpgradesItem", "azure.mgmt.containerservice.models.ManagedClusterProperties": "Microsoft.ContainerService.ManagedClusterProperties", "azure.mgmt.containerservice.models.ManagedClusterPropertiesAutoScalerProfile": "Microsoft.ContainerService.ManagedClusterPropertiesAutoScalerProfile", + "azure.mgmt.containerservice.models.ManagedClusterPropertiesForSnapshot": "Microsoft.ContainerService.ManagedClusterPropertiesForSnapshot", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfile": "Microsoft.ContainerService.ManagedClusterSecurityProfile", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefender": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefender", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityGating", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentity": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityGatingIdentity", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityMonitoring", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner": "Microsoft.ContainerService.ManagedClusterSecurityProfileImageCleaner", + "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity": "Microsoft.ContainerService.ManagedClusterSecurityProfileImageIntegrity", + "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction": "Microsoft.ContainerService.ManagedClusterSecurityProfileNodeRestriction", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity": "Microsoft.ContainerService.ManagedClusterSecurityProfileWorkloadIdentity", "azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile": "Microsoft.ContainerService.ManagedClusterServicePrincipalProfile", "azure.mgmt.containerservice.models.ManagedClusterSKU": "Microsoft.ContainerService.ManagedClusterSKU", + "azure.mgmt.containerservice.models.ManagedClusterSnapshot": "Microsoft.ContainerService.ManagedClusterSnapshot", + "azure.mgmt.containerservice.models.ManagedClusterSnapshotProperties": "Microsoft.ContainerService.ManagedClusterSnapshotProperties", "azure.mgmt.containerservice.models.ManagedClusterStaticEgressGatewayProfile": "Microsoft.ContainerService.ManagedClusterStaticEgressGatewayProfile", "azure.mgmt.containerservice.models.ManagedClusterStatus": "Microsoft.ContainerService.ManagedClusterStatus", "azure.mgmt.containerservice.models.ManagedClusterStorageProfile": "Microsoft.ContainerService.ManagedClusterStorageProfile", @@ -155,6 +216,9 @@ "azure.mgmt.containerservice.models.ManagedNamespace": "Microsoft.ContainerService.ManagedNamespace", "azure.mgmt.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue": "Microsoft.ContainerService.ManagedServiceIdentityUserAssignedIdentitiesValue", "azure.mgmt.containerservice.models.ManualScaleProfile": "Microsoft.ContainerService.ManualScaleProfile", + "azure.mgmt.containerservice.models.MeshMembership": "Microsoft.ContainerService.MeshMembership", + "azure.mgmt.containerservice.models.MeshMembershipPrivateConnectProfile": "Microsoft.ContainerService.MeshMembershipPrivateConnectProfile", + "azure.mgmt.containerservice.models.MeshMembershipProperties": "Microsoft.ContainerService.MeshMembershipProperties", "azure.mgmt.containerservice.models.MeshRevision": "Microsoft.ContainerService.MeshRevision", "azure.mgmt.containerservice.models.MeshRevisionProfile": "Microsoft.ContainerService.MeshRevisionProfile", "azure.mgmt.containerservice.models.MeshRevisionProfileProperties": "Microsoft.ContainerService.MeshRevisionProfileProperties", @@ -162,11 +226,18 @@ "azure.mgmt.containerservice.models.MeshUpgradeProfileProperties": "Microsoft.ContainerService.MeshUpgradeProfileProperties", "azure.mgmt.containerservice.models.NamespaceProperties": "Microsoft.ContainerService.NamespaceProperties", "azure.mgmt.containerservice.models.NetworkPolicies": "Microsoft.ContainerService.NetworkPolicies", + "azure.mgmt.containerservice.models.NetworkProfileForSnapshot": "Microsoft.ContainerService.NetworkProfileForSnapshot", + "azure.mgmt.containerservice.models.NodeDisruptionProfile": "Microsoft.ContainerService.NodeDisruptionProfile", + "azure.mgmt.containerservice.models.NodeImageVersion": "Microsoft.ContainerService.NodeImageVersion", + "azure.mgmt.containerservice.models.NvidiaGPUProfile": "Microsoft.ContainerService.NvidiaGPUProfile", + "azure.mgmt.containerservice.models.OperationStatusResult": "Microsoft.ContainerService.OperationStatusResult", "azure.mgmt.containerservice.models.OperationValue": "Microsoft.ContainerService.OperationValue", "azure.mgmt.containerservice.models.OperationValueDisplay": "Microsoft.ContainerService.OperationValueDisplay", "azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint": "Microsoft.ContainerService.OutboundEnvironmentEndpoint", + "azure.mgmt.containerservice.models.PoolBootstrapData": "Microsoft.ContainerService.PoolBootstrapData", "azure.mgmt.containerservice.models.PortRange": "Microsoft.ContainerService.PortRange", "azure.mgmt.containerservice.models.PowerState": "Microsoft.ContainerService.PowerState", + "azure.mgmt.containerservice.models.PreparedImageSpecificationProfile": "Microsoft.ContainerService.PreparedImageSpecificationProfile", "azure.mgmt.containerservice.models.PrivateEndpoint": "Microsoft.ContainerService.PrivateEndpoint", "azure.mgmt.containerservice.models.PrivateEndpointConnection": "Microsoft.ContainerService.PrivateEndpointConnection", "azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult": "Microsoft.ContainerService.PrivateEndpointConnectionListResult", @@ -174,18 +245,32 @@ "azure.mgmt.containerservice.models.PrivateLinkResource": "Microsoft.ContainerService.PrivateLinkResource", "azure.mgmt.containerservice.models.PrivateLinkResourcesListResult": "Microsoft.ContainerService.PrivateLinkResourcesListResult", "azure.mgmt.containerservice.models.PrivateLinkServiceConnectionState": "Microsoft.ContainerService.PrivateLinkServiceConnectionState", + "azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody": "Microsoft.ContainerService.RebalanceLoadBalancersRequestBody", "azure.mgmt.containerservice.models.RelativeMonthlySchedule": "Microsoft.ContainerService.RelativeMonthlySchedule", "azure.mgmt.containerservice.models.ResourceQuota": "Microsoft.ContainerService.ResourceQuota", "azure.mgmt.containerservice.models.ResourceReference": "Microsoft.ContainerService.ResourceReference", + "azure.mgmt.containerservice.models.ResourceSku": "Microsoft.ContainerService.ResourceSku", + "azure.mgmt.containerservice.models.ResourceSkuCapabilities": "Microsoft.ContainerService.ResourceSkuCapabilities", + "azure.mgmt.containerservice.models.ResourceSkuCapacity": "Microsoft.ContainerService.ResourceSkuCapacity", + "azure.mgmt.containerservice.models.ResourceSkuCosts": "Microsoft.ContainerService.ResourceSkuCosts", + "azure.mgmt.containerservice.models.ResourceSkuLocationInfo": "Microsoft.ContainerService.ResourceSkuLocationInfo", + "azure.mgmt.containerservice.models.ResourceSkuRestrictionInfo": "Microsoft.ContainerService.ResourceSkuRestrictionInfo", + "azure.mgmt.containerservice.models.ResourceSkuRestrictions": "Microsoft.ContainerService.ResourceSkuRestrictions", + "azure.mgmt.containerservice.models.ResourceSkuZoneDetails": "Microsoft.ContainerService.ResourceSkuZoneDetails", "azure.mgmt.containerservice.models.RunCommandRequest": "Microsoft.ContainerService.RunCommandRequest", "azure.mgmt.containerservice.models.RunCommandResult": "Microsoft.ContainerService.RunCommandResult", + "azure.mgmt.containerservice.models.SafeguardsAvailableVersion": "Microsoft.ContainerService.SafeguardsAvailableVersion", + "azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties": "Microsoft.ContainerService.SafeguardsAvailableVersionsProperties", "azure.mgmt.containerservice.models.ScaleProfile": "Microsoft.ContainerService.ScaleProfile", "azure.mgmt.containerservice.models.Schedule": "Microsoft.ContainerService.Schedule", "azure.mgmt.containerservice.models.SchedulerInstanceProfile": "Microsoft.ContainerService.SchedulerInstanceProfile", "azure.mgmt.containerservice.models.SchedulerProfile": "Microsoft.ContainerService.SchedulerProfile", + "azure.mgmt.containerservice.models.ServiceAccountImagePullProfile": "Microsoft.ContainerService.ServiceAccountImagePullProfile", "azure.mgmt.containerservice.models.ServiceMeshProfile": "Microsoft.ContainerService.ServiceMeshProfile", "azure.mgmt.containerservice.models.Snapshot": "Microsoft.ContainerService.Snapshot", "azure.mgmt.containerservice.models.SnapshotProperties": "Microsoft.ContainerService.SnapshotProperties", + "azure.mgmt.containerservice.models.SoftEvictionGracePeriod": "Microsoft.ContainerService.SoftEvictionGracePeriod", + "azure.mgmt.containerservice.models.SoftEvictionThreshold": "Microsoft.ContainerService.SoftEvictionThreshold", "azure.mgmt.containerservice.models.SysctlConfig": "Microsoft.ContainerService.SysctlConfig", "azure.mgmt.containerservice.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", "azure.mgmt.containerservice.models.TagsObject": "Microsoft.ContainerService.TagsObject", @@ -210,15 +295,23 @@ "azure.mgmt.containerservice.models.ScaleDownMode": "Microsoft.ContainerService.ScaleDownMode", "azure.mgmt.containerservice.models.AgentPoolType": "Microsoft.ContainerService.AgentPoolType", "azure.mgmt.containerservice.models.AgentPoolMode": "Microsoft.ContainerService.AgentPoolMode", + "azure.mgmt.containerservice.models.UpgradeStrategy": "Microsoft.ContainerService.UpgradeStrategy", "azure.mgmt.containerservice.models.UndrainableNodeBehavior": "Microsoft.ContainerService.UndrainableNodeBehavior", "azure.mgmt.containerservice.models.Code": "Microsoft.ContainerService.Code", "azure.mgmt.containerservice.models.ScaleSetPriority": "Microsoft.ContainerService.ScaleSetPriority", "azure.mgmt.containerservice.models.ScaleSetEvictionPolicy": "Microsoft.ContainerService.ScaleSetEvictionPolicy", + "azure.mgmt.containerservice.models.SeccompDefault": "Microsoft.ContainerService.SeccompDefault", "azure.mgmt.containerservice.models.GPUInstanceProfile": "Microsoft.ContainerService.GPUInstanceProfile", "azure.mgmt.containerservice.models.Protocol": "Microsoft.ContainerService.Protocol", + "azure.mgmt.containerservice.models.AgentPoolNetworkInterfaceType": "Microsoft.ContainerService.AgentPoolNetworkInterfaceType", + "azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressVersion": "Microsoft.ContainerService.AgentPoolNICPublicIPAddressVersion", "azure.mgmt.containerservice.models.DRANETMode": "Microsoft.ContainerService.DRANETMode", "azure.mgmt.containerservice.models.AgentPoolSSHAccess": "Microsoft.ContainerService.AgentPoolSSHAccess", "azure.mgmt.containerservice.models.GPUDriver": "Microsoft.ContainerService.GPUDriver", + "azure.mgmt.containerservice.models.DriverType": "Microsoft.ContainerService.DriverType", + "azure.mgmt.containerservice.models.ManagementMode": "Microsoft.ContainerService.ManagementMode", + "azure.mgmt.containerservice.models.NvidiaDriverMode": "Microsoft.ContainerService.NvidiaDriverMode", + "azure.mgmt.containerservice.models.MigStrategy": "Microsoft.ContainerService.MigStrategy", "azure.mgmt.containerservice.models.LocalDNSMode": "Microsoft.ContainerService.LocalDNSMode", "azure.mgmt.containerservice.models.LocalDNSState": "Microsoft.ContainerService.LocalDNSState", "azure.mgmt.containerservice.models.LocalDNSQueryLogging": "Microsoft.ContainerService.LocalDNSQueryLogging", @@ -241,16 +334,23 @@ "azure.mgmt.containerservice.models.OutboundType": "Microsoft.ContainerService.OutboundType", "azure.mgmt.containerservice.models.LoadBalancerSku": "Microsoft.ContainerService.LoadBalancerSku", "azure.mgmt.containerservice.models.BackendPoolType": "Microsoft.ContainerService.BackendPoolType", + "azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode": "Microsoft.ContainerService.ClusterServiceLoadBalancerHealthProbeMode", + "azure.mgmt.containerservice.models.BastionSku": "Microsoft.ContainerService.BastionSku", "azure.mgmt.containerservice.models.ManagedClusterNATGatewaySku": "Microsoft.ContainerService.ManagedClusterNATGatewaySku", "azure.mgmt.containerservice.models.IPFamily": "Microsoft.ContainerService.IPFamily", + "azure.mgmt.containerservice.models.PodLinkLocalAccess": "Microsoft.ContainerService.PodLinkLocalAccess", + "azure.mgmt.containerservice.models.Mode": "Microsoft.ContainerService.Mode", + "azure.mgmt.containerservice.models.IpvsScheduler": "Microsoft.ContainerService.IpvsScheduler", "azure.mgmt.containerservice.models.UpgradeChannel": "Microsoft.ContainerService.UpgradeChannel", "azure.mgmt.containerservice.models.NodeOSUpgradeChannel": "Microsoft.ContainerService.NodeOSUpgradeChannel", "azure.mgmt.containerservice.models.Expander": "Microsoft.ContainerService.Expander", "azure.mgmt.containerservice.models.KeyVaultNetworkAccessTypes": "Microsoft.ContainerService.KeyVaultNetworkAccessTypes", + "azure.mgmt.containerservice.models.InfrastructureEncryption": "Microsoft.ContainerService.InfrastructureEncryption", "azure.mgmt.containerservice.models.GatewayAPIIstioEnabled": "Microsoft.ContainerService.GatewayAPIIstioEnabled", "azure.mgmt.containerservice.models.NginxIngressControllerType": "Microsoft.ContainerService.NginxIngressControllerType", "azure.mgmt.containerservice.models.ManagedGatewayType": "Microsoft.ContainerService.ManagedGatewayType", "azure.mgmt.containerservice.models.PublicNetworkAccess": "Microsoft.ContainerService.PublicNetworkAccess", + "azure.mgmt.containerservice.models.AddonAutoscaling": "Microsoft.ContainerService.AddonAutoscaling", "azure.mgmt.containerservice.models.ContainerNetworkLogs": "Microsoft.ContainerService.ContainerNetworkLogs", "azure.mgmt.containerservice.models.ServiceMeshMode": "Microsoft.ContainerService.ServiceMeshMode", "azure.mgmt.containerservice.models.IstioIngressGatewayMode": "Microsoft.ContainerService.IstioIngressGatewayMode", @@ -259,22 +359,37 @@ "azure.mgmt.containerservice.models.NodeProvisioningDefaultNodePools": "Microsoft.ContainerService.NodeProvisioningDefaultNodePools", "azure.mgmt.containerservice.models.ArtifactSource": "Microsoft.ContainerService.ArtifactSource", "azure.mgmt.containerservice.models.SchedulerConfigMode": "Microsoft.ContainerService.SchedulerConfigMode", + "azure.mgmt.containerservice.models.ControlPlaneScalingSize": "Microsoft.ContainerService.ControlPlaneScalingSize", + "azure.mgmt.containerservice.models.NodeDisruptionPolicy": "Microsoft.ContainerService.NodeDisruptionPolicy", "azure.mgmt.containerservice.models.ManagedClusterSKUName": "Microsoft.ContainerService.ManagedClusterSKUName", "azure.mgmt.containerservice.models.ManagedClusterSKUTier": "Microsoft.ContainerService.ManagedClusterSKUTier", "azure.mgmt.containerservice.models.ExtendedLocationTypes": "Microsoft.ContainerService.ExtendedLocationTypes", "azure.mgmt.containerservice.models.ResourceIdentityType": "Microsoft.ContainerService.ResourceIdentityType", "azure.mgmt.containerservice.models.Format": "Microsoft.ContainerService.Format", + "azure.mgmt.containerservice.models.GuardrailsSupport": "Microsoft.ContainerService.GuardrailsSupport", + "azure.mgmt.containerservice.models.SafeguardsSupport": "Microsoft.ContainerService.SafeguardsSupport", "azure.mgmt.containerservice.models.WeekDay": "Microsoft.ContainerService.WeekDay", "azure.mgmt.containerservice.models.Type": "Microsoft.ContainerService.Type", + "azure.mgmt.containerservice.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", "azure.mgmt.containerservice.models.NamespaceProvisioningState": "Microsoft.ContainerService.NamespaceProvisioningState", "azure.mgmt.containerservice.models.PolicyRule": "Microsoft.ContainerService.PolicyRule", "azure.mgmt.containerservice.models.AdoptionPolicy": "Microsoft.ContainerService.AdoptionPolicy", "azure.mgmt.containerservice.models.DeletePolicy": "Microsoft.ContainerService.DeletePolicy", + "azure.mgmt.containerservice.models.DriftAction": "Microsoft.ContainerService.DriftAction", + "azure.mgmt.containerservice.models.VmState": "Microsoft.ContainerService.VmState", "azure.mgmt.containerservice.models.PrivateEndpointConnectionProvisioningState": "Microsoft.ContainerService.PrivateEndpointConnectionProvisioningState", "azure.mgmt.containerservice.models.ConnectionStatus": "Microsoft.ContainerService.ConnectionStatus", "azure.mgmt.containerservice.models.SnapshotType": "Microsoft.ContainerService.SnapshotType", "azure.mgmt.containerservice.models.TrustedAccessRoleBindingProvisioningState": "Microsoft.ContainerService.TrustedAccessRoleBindingProvisioningState", + "azure.mgmt.containerservice.models.Operator": "Microsoft.ContainerService.Operator", "azure.mgmt.containerservice.models.IdentityBindingProvisioningState": "Microsoft.ContainerService.IdentityBindingProvisioningState", + "azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState": "Microsoft.ContainerService.JWTAuthenticatorProvisioningState", + "azure.mgmt.containerservice.models.MeshMembershipProvisioningState": "Microsoft.ContainerService.MeshMembershipProvisioningState", + "azure.mgmt.containerservice.models.AlertConfigurationMode": "Microsoft.ContainerService.AlertConfigurationMode", + "azure.mgmt.containerservice.models.AlertConfigurationProvisioningState": "Microsoft.ContainerService.AlertConfigurationProvisioningState", + "azure.mgmt.containerservice.models.ResourceSkuCapacityScaleType": "Microsoft.ContainerService.ResourceSkuCapacityScaleType", + "azure.mgmt.containerservice.models.ResourceSkuRestrictionsType": "Microsoft.ContainerService.ResourceSkuRestrictionsType", + "azure.mgmt.containerservice.models.ResourceSkuRestrictionsReasonCode": "Microsoft.ContainerService.ResourceSkuRestrictionsReasonCode", "azure.mgmt.containerservice.operations.AgentPoolsOperations.get": "Microsoft.ContainerService.AgentPools.get", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.get": "Microsoft.ContainerService.AgentPools.get", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_create_or_update": "Microsoft.ContainerService.AgentPools.createOrUpdate", @@ -285,10 +400,16 @@ "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.list": "Microsoft.ContainerService.AgentPools.list", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_abort_latest_operation": "Microsoft.ContainerService.AgentPools.abortLatestOperation", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_abort_latest_operation": "Microsoft.ContainerService.AgentPools.abortLatestOperation", + "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_complete_upgrade": "Microsoft.ContainerService.AgentPools.completeUpgrade", + "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_complete_upgrade": "Microsoft.ContainerService.AgentPools.completeUpgrade", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_delete_machines": "Microsoft.ContainerService.AgentPools.deleteMachines", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_delete_machines": "Microsoft.ContainerService.AgentPools.deleteMachines", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_upgrade_node_image_version": "Microsoft.ContainerService.AgentPools.upgradeNodeImageVersion", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_upgrade_node_image_version": "Microsoft.ContainerService.AgentPools.upgradeNodeImageVersion", + "azure.mgmt.containerservice.operations.AgentPoolsOperations.list_bootstrap_data": "Microsoft.ContainerService.AgentPools.listBootstrapData", + "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.list_bootstrap_data": "Microsoft.ContainerService.AgentPools.listBootstrapData", + "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_update": "Microsoft.ContainerService.AgentPools.update", + "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_update": "Microsoft.ContainerService.AgentPools.update", "azure.mgmt.containerservice.operations.AgentPoolsOperations.get_available_agent_pool_versions": "Microsoft.ContainerService.ManagedClusters.getAvailableAgentPoolVersions", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.get_available_agent_pool_versions": "Microsoft.ContainerService.ManagedClusters.getAvailableAgentPoolVersions", "azure.mgmt.containerservice.operations.AgentPoolsOperations.get_upgrade_profile": "Microsoft.ContainerService.AgentPoolUpgradeProfiles.getUpgradeProfile", @@ -333,8 +454,18 @@ "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_command_result": "Microsoft.ContainerService.ManagedClusters.getCommandResult", "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.ContainerService.ManagedClusters.listOutboundNetworkDependenciesEndpoints", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.ContainerService.ManagedClusters.listOutboundNetworkDependenciesEndpoints", + "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_rebalance_load_balancers": "Microsoft.ContainerService.ManagedClusters.rebalanceLoadBalancers", + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_rebalance_load_balancers": "Microsoft.ContainerService.ManagedClusters.rebalanceLoadBalancers", "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_upgrade_profile": "Microsoft.ContainerService.ManagedClusterUpgradeProfiles.getUpgradeProfile", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_upgrade_profile": "Microsoft.ContainerService.ManagedClusterUpgradeProfiles.getUpgradeProfile", + "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.getGuardrailsVersions", + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.getGuardrailsVersions", + "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.listGuardrailsVersions", + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.listGuardrailsVersions", + "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.getSafeguardsVersions", + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.getSafeguardsVersions", + "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.listSafeguardsVersions", + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.listSafeguardsVersions", "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_mesh_revision_profile": "Microsoft.ContainerService.MeshRevisionProfiles.getMeshRevisionProfile", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_mesh_revision_profile": "Microsoft.ContainerService.MeshRevisionProfiles.getMeshRevisionProfile", "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_mesh_revision_profiles": "Microsoft.ContainerService.MeshRevisionProfiles.listMeshRevisionProfiles", @@ -353,6 +484,18 @@ "azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations.delete": "Microsoft.ContainerService.MaintenanceConfigurations.delete", "azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MaintenanceConfigurations.listByManagedCluster", "azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MaintenanceConfigurations.listByManagedCluster", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.get": "Microsoft.ContainerService.MaintenanceWindows.get", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.get": "Microsoft.ContainerService.MaintenanceWindows.get", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.begin_create_or_update": "Microsoft.ContainerService.MaintenanceWindows.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.begin_create_or_update": "Microsoft.ContainerService.MaintenanceWindows.createOrUpdate", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.update_tags": "Microsoft.ContainerService.MaintenanceWindows.updateTags", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.update_tags": "Microsoft.ContainerService.MaintenanceWindows.updateTags", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.begin_delete": "Microsoft.ContainerService.MaintenanceWindows.delete", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.begin_delete": "Microsoft.ContainerService.MaintenanceWindows.delete", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.list": "Microsoft.ContainerService.MaintenanceWindows.list", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.list": "Microsoft.ContainerService.MaintenanceWindows.list", + "azure.mgmt.containerservice.operations.MaintenanceWindowsOperations.list_by_subscription": "Microsoft.ContainerService.MaintenanceWindows.listBySubscription", + "azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations.list_by_subscription": "Microsoft.ContainerService.MaintenanceWindows.listBySubscription", "azure.mgmt.containerservice.operations.ManagedNamespacesOperations.get": "Microsoft.ContainerService.ManagedNamespaces.get", "azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations.get": "Microsoft.ContainerService.ManagedNamespaces.get", "azure.mgmt.containerservice.operations.ManagedNamespacesOperations.begin_create_or_update": "Microsoft.ContainerService.ManagedNamespaces.createOrUpdate", @@ -367,6 +510,8 @@ "azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations.list_credential": "Microsoft.ContainerService.ManagedNamespaces.listCredential", "azure.mgmt.containerservice.operations.MachinesOperations.get": "Microsoft.ContainerService.Machines.get", "azure.mgmt.containerservice.aio.operations.MachinesOperations.get": "Microsoft.ContainerService.Machines.get", + "azure.mgmt.containerservice.operations.MachinesOperations.begin_create_or_update": "Microsoft.ContainerService.Machines.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.MachinesOperations.begin_create_or_update": "Microsoft.ContainerService.Machines.createOrUpdate", "azure.mgmt.containerservice.operations.MachinesOperations.list": "Microsoft.ContainerService.Machines.list", "azure.mgmt.containerservice.aio.operations.MachinesOperations.list": "Microsoft.ContainerService.Machines.list", "azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.ContainerService.PrivateEndpointConnections.get", @@ -389,6 +534,18 @@ "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.Snapshots.listByResourceGroup", "azure.mgmt.containerservice.operations.SnapshotsOperations.list": "Microsoft.ContainerService.Snapshots.list", "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.list": "Microsoft.ContainerService.Snapshots.list", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.get": "Microsoft.ContainerService.ManagedClusterSnapshots.get", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.get": "Microsoft.ContainerService.ManagedClusterSnapshots.get", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.create_or_update": "Microsoft.ContainerService.ManagedClusterSnapshots.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.create_or_update": "Microsoft.ContainerService.ManagedClusterSnapshots.createOrUpdate", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.update_tags": "Microsoft.ContainerService.ManagedClusterSnapshots.updateTags", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.update_tags": "Microsoft.ContainerService.ManagedClusterSnapshots.updateTags", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.delete": "Microsoft.ContainerService.ManagedClusterSnapshots.delete", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.delete": "Microsoft.ContainerService.ManagedClusterSnapshots.delete", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.ManagedClusterSnapshots.listByResourceGroup", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.ManagedClusterSnapshots.listByResourceGroup", + "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list": "Microsoft.ContainerService.ManagedClusterSnapshots.list", + "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list": "Microsoft.ContainerService.ManagedClusterSnapshots.list", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.get": "Microsoft.ContainerService.TrustedAccessRoleBindings.get", "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.get": "Microsoft.ContainerService.TrustedAccessRoleBindings.get", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.begin_create_or_update": "Microsoft.ContainerService.TrustedAccessRoleBindings.createOrUpdate", @@ -397,6 +554,14 @@ "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.begin_delete": "Microsoft.ContainerService.TrustedAccessRoleBindings.delete", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.list": "Microsoft.ContainerService.TrustedAccessRoleBindings.list", "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.list": "Microsoft.ContainerService.TrustedAccessRoleBindings.list", + "azure.mgmt.containerservice.operations.LoadBalancersOperations.get": "Microsoft.ContainerService.LoadBalancers.get", + "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.get": "Microsoft.ContainerService.LoadBalancers.get", + "azure.mgmt.containerservice.operations.LoadBalancersOperations.create_or_update": "Microsoft.ContainerService.LoadBalancers.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.create_or_update": "Microsoft.ContainerService.LoadBalancers.createOrUpdate", + "azure.mgmt.containerservice.operations.LoadBalancersOperations.begin_delete": "Microsoft.ContainerService.LoadBalancers.delete", + "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.begin_delete": "Microsoft.ContainerService.LoadBalancers.delete", + "azure.mgmt.containerservice.operations.LoadBalancersOperations.list_by_managed_cluster": "Microsoft.ContainerService.LoadBalancers.listByManagedCluster", + "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.list_by_managed_cluster": "Microsoft.ContainerService.LoadBalancers.listByManagedCluster", "azure.mgmt.containerservice.operations.IdentityBindingsOperations.get": "Microsoft.ContainerService.IdentityBindings.get", "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.get": "Microsoft.ContainerService.IdentityBindings.get", "azure.mgmt.containerservice.operations.IdentityBindingsOperations.begin_create_or_update": "Microsoft.ContainerService.IdentityBindings.createOrUpdate", @@ -405,14 +570,50 @@ "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.begin_delete": "Microsoft.ContainerService.IdentityBindings.delete", "azure.mgmt.containerservice.operations.IdentityBindingsOperations.list_by_managed_cluster": "Microsoft.ContainerService.IdentityBindings.listByManagedCluster", "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.list_by_managed_cluster": "Microsoft.ContainerService.IdentityBindings.listByManagedCluster", + "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.get": "Microsoft.ContainerService.JWTAuthenticators.get", + "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.get": "Microsoft.ContainerService.JWTAuthenticators.get", + "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_create_or_update": "Microsoft.ContainerService.JWTAuthenticators.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_create_or_update": "Microsoft.ContainerService.JWTAuthenticators.createOrUpdate", + "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_delete": "Microsoft.ContainerService.JWTAuthenticators.delete", + "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_delete": "Microsoft.ContainerService.JWTAuthenticators.delete", + "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": "Microsoft.ContainerService.JWTAuthenticators.listByManagedCluster", + "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": "Microsoft.ContainerService.JWTAuthenticators.listByManagedCluster", + "azure.mgmt.containerservice.operations.MeshMembershipsOperations.get": "Microsoft.ContainerService.MeshMemberships.get", + "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.get": "Microsoft.ContainerService.MeshMemberships.get", + "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_create_or_update": "Microsoft.ContainerService.MeshMemberships.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_create_or_update": "Microsoft.ContainerService.MeshMemberships.createOrUpdate", + "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_delete": "Microsoft.ContainerService.MeshMemberships.delete", + "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_delete": "Microsoft.ContainerService.MeshMemberships.delete", + "azure.mgmt.containerservice.operations.MeshMembershipsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MeshMemberships.listByManagedCluster", + "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MeshMemberships.listByManagedCluster", "azure.mgmt.containerservice.operations.Operations.list": "Microsoft.ContainerService.Operations.list", "azure.mgmt.containerservice.aio.operations.Operations.list": "Microsoft.ContainerService.Operations.list", + "azure.mgmt.containerservice.operations.AlertConfigurationsOperations.get": "Microsoft.ContainerService.AlertConfigurations.get", + "azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations.get": "Microsoft.ContainerService.AlertConfigurations.get", + "azure.mgmt.containerservice.operations.AlertConfigurationsOperations.begin_create_or_update": "Microsoft.ContainerService.AlertConfigurations.createOrUpdate", + "azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations.begin_create_or_update": "Microsoft.ContainerService.AlertConfigurations.createOrUpdate", + "azure.mgmt.containerservice.operations.AlertConfigurationsOperations.begin_delete": "Microsoft.ContainerService.AlertConfigurations.delete", + "azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations.begin_delete": "Microsoft.ContainerService.AlertConfigurations.delete", + "azure.mgmt.containerservice.operations.AlertConfigurationsOperations.list_by_managed_cluster": "Microsoft.ContainerService.AlertConfigurations.listByManagedCluster", + "azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations.list_by_managed_cluster": "Microsoft.ContainerService.AlertConfigurations.listByManagedCluster", + "azure.mgmt.containerservice.operations.OperationStatusResultOperations.list_by_agent_pool": "Microsoft.ContainerService.AgentPools.listByAgentPool", + "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.list_by_agent_pool": "Microsoft.ContainerService.AgentPools.listByAgentPool", + "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get_by_agent_pool": "Microsoft.ContainerService.AgentPools.getByAgentPool", + "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get_by_agent_pool": "Microsoft.ContainerService.AgentPools.getByAgentPool", + "azure.mgmt.containerservice.operations.OperationStatusResultOperations.list": "Microsoft.ContainerService.ManagedClusters.operationStatusResultList", + "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.list": "Microsoft.ContainerService.ManagedClusters.operationStatusResultList", + "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get": "Microsoft.ContainerService.ManagedClusters.operationStatusResultGet", + "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get": "Microsoft.ContainerService.ManagedClusters.operationStatusResultGet", "azure.mgmt.containerservice.operations.PrivateLinkResourcesOperations.list": "Microsoft.ContainerService.ManagedClusters.privateLinkResourcesList", "azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations.list": "Microsoft.ContainerService.ManagedClusters.privateLinkResourcesList", "azure.mgmt.containerservice.operations.ResolvePrivateLinkServiceIdOperations.post": "Microsoft.ContainerService.ManagedClusters.post", "azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations.post": "Microsoft.ContainerService.ManagedClusters.post", "azure.mgmt.containerservice.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list", - "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list" + "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list", + "azure.mgmt.containerservice.operations.ContainerServiceOperations.list_node_image_versions": "Microsoft.ContainerService.ContainerServiceOperationGroup.listNodeImageVersions", + "azure.mgmt.containerservice.aio.operations.ContainerServiceOperations.list_node_image_versions": "Microsoft.ContainerService.ContainerServiceOperationGroup.listNodeImageVersions", + "azure.mgmt.containerservice.operations.VmSkusOperations.list": "Microsoft.ContainerService.VmSkusOperationGroup.list", + "azure.mgmt.containerservice.aio.operations.VmSkusOperations.list": "Microsoft.ContainerService.VmSkusOperationGroup.list" }, - "CrossLanguageVersion": "021be9d50d23" + "CrossLanguageVersion": "4faaba15fd40" } \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py index c849b3961006..c072d9902d63 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py @@ -22,11 +22,19 @@ from ._utils.serialization import Deserializer, Serializer from .operations import ( AgentPoolsOperations, + AlertConfigurationsOperations, + ContainerServiceOperations, IdentityBindingsOperations, + JWTAuthenticatorsOperations, + LoadBalancersOperations, MachinesOperations, MaintenanceConfigurationsOperations, + MaintenanceWindowsOperations, + ManagedClusterSnapshotsOperations, ManagedClustersOperations, ManagedNamespacesOperations, + MeshMembershipsOperations, + OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -34,6 +42,7 @@ SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations, + VmSkusOperations, ) if sys.version_info >= (3, 11): @@ -56,6 +65,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations + :ivar maintenance_windows: MaintenanceWindowsOperations operations + :vartype maintenance_windows: + azure.mgmt.containerservice.operations.MaintenanceWindowsOperations :ivar managed_namespaces: ManagedNamespacesOperations operations :vartype managed_namespaces: azure.mgmt.containerservice.operations.ManagedNamespacesOperations :ivar machines: MachinesOperations operations @@ -65,13 +77,28 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: azure.mgmt.containerservice.operations.SnapshotsOperations + :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations + :vartype managed_cluster_snapshots: + azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.containerservice.operations.LoadBalancersOperations :ivar identity_bindings: IdentityBindingsOperations operations :vartype identity_bindings: azure.mgmt.containerservice.operations.IdentityBindingsOperations + :ivar jwt_authenticators: JWTAuthenticatorsOperations operations + :vartype jwt_authenticators: azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations + :ivar mesh_memberships: MeshMembershipsOperations operations + :vartype mesh_memberships: azure.mgmt.containerservice.operations.MeshMembershipsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.operations.Operations + :ivar alert_configurations: AlertConfigurationsOperations operations + :vartype alert_configurations: + azure.mgmt.containerservice.operations.AlertConfigurationsOperations + :ivar operation_status_result: OperationStatusResultOperations operations + :vartype operation_status_result: + azure.mgmt.containerservice.operations.OperationStatusResultOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.operations.PrivateLinkResourcesOperations @@ -81,6 +108,10 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: azure.mgmt.containerservice.operations.TrustedAccessRolesOperations + :ivar container_service: ContainerServiceOperations operations + :vartype container_service: azure.mgmt.containerservice.operations.ContainerServiceOperations + :ivar vm_skus: VmSkusOperations operations + :vartype vm_skus: azure.mgmt.containerservice.operations.VmSkusOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -90,9 +121,10 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-06-01" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-06-02-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -152,6 +184,9 @@ def __init__( self.maintenance_configurations = MaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.maintenance_windows = MaintenanceWindowsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.managed_namespaces = ManagedNamespacesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -160,13 +195,29 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) self.identity_bindings = IdentityBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.jwt_authenticators = JWTAuthenticatorsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_memberships = MeshMembershipsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.alert_configurations = AlertConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_status_result = OperationStatusResultOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -176,6 +227,10 @@ def __init__( self.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.container_service = ContainerServiceOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.vm_skus = VmSkusOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py index 79666cc020f4..bc5a2aac4467 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py @@ -34,9 +34,10 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-06-01" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-06-02-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -48,7 +49,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-06-01") + api_version: str = kwargs.pop("api_version", "2026-06-02-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py index ab7221a4237e..07810f8734b2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "41.6.0" +VERSION = "41.7.0b1" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py index f9f6b0fa3d3b..d10000039b91 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py @@ -22,11 +22,19 @@ from ._configuration import ContainerServiceClientConfiguration from .operations import ( AgentPoolsOperations, + AlertConfigurationsOperations, + ContainerServiceOperations, IdentityBindingsOperations, + JWTAuthenticatorsOperations, + LoadBalancersOperations, MachinesOperations, MaintenanceConfigurationsOperations, + MaintenanceWindowsOperations, + ManagedClusterSnapshotsOperations, ManagedClustersOperations, ManagedNamespacesOperations, + MeshMembershipsOperations, + OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -34,6 +42,7 @@ SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations, + VmSkusOperations, ) if sys.version_info >= (3, 11): @@ -56,6 +65,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations + :ivar maintenance_windows: MaintenanceWindowsOperations operations + :vartype maintenance_windows: + azure.mgmt.containerservice.aio.operations.MaintenanceWindowsOperations :ivar managed_namespaces: ManagedNamespacesOperations operations :vartype managed_namespaces: azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations @@ -66,14 +78,30 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: azure.mgmt.containerservice.aio.operations.SnapshotsOperations + :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations + :vartype managed_cluster_snapshots: + azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.containerservice.aio.operations.LoadBalancersOperations :ivar identity_bindings: IdentityBindingsOperations operations :vartype identity_bindings: azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations + :ivar jwt_authenticators: JWTAuthenticatorsOperations operations + :vartype jwt_authenticators: + azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations + :ivar mesh_memberships: MeshMembershipsOperations operations + :vartype mesh_memberships: azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.aio.operations.Operations + :ivar alert_configurations: AlertConfigurationsOperations operations + :vartype alert_configurations: + azure.mgmt.containerservice.aio.operations.AlertConfigurationsOperations + :ivar operation_status_result: OperationStatusResultOperations operations + :vartype operation_status_result: + azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations @@ -83,6 +111,11 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations + :ivar container_service: ContainerServiceOperations operations + :vartype container_service: + azure.mgmt.containerservice.aio.operations.ContainerServiceOperations + :ivar vm_skus: VmSkusOperations operations + :vartype vm_skus: azure.mgmt.containerservice.aio.operations.VmSkusOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -92,9 +125,10 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes,do :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-06-01" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-06-02-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -156,6 +190,9 @@ def __init__( self.maintenance_configurations = MaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.maintenance_windows = MaintenanceWindowsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.managed_namespaces = ManagedNamespacesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -164,13 +201,29 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) + self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) self.identity_bindings = IdentityBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) + self.jwt_authenticators = JWTAuthenticatorsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.mesh_memberships = MeshMembershipsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.alert_configurations = AlertConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_status_result = OperationStatusResultOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -180,6 +233,10 @@ def __init__( self.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.container_service = ContainerServiceOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.vm_skus = VmSkusOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py index 553afdd46be6..14b3dcbc8d0d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py @@ -34,9 +34,10 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are "2026-06-01" - and None. Default value is None. If not set, the operation's default API version will be used. - Note that overriding this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2026-06-02-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ @@ -48,7 +49,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-06-01") + api_version: str = kwargs.pop("api_version", "2026-06-02-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py index 69da5e12a363..a484f1c8d559 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py @@ -15,16 +15,25 @@ from ._operations import AgentPoolsOperations # type: ignore from ._operations import ManagedClustersOperations # type: ignore from ._operations import MaintenanceConfigurationsOperations # type: ignore +from ._operations import MaintenanceWindowsOperations # type: ignore from ._operations import ManagedNamespacesOperations # type: ignore from ._operations import MachinesOperations # type: ignore from ._operations import PrivateEndpointConnectionsOperations # type: ignore from ._operations import SnapshotsOperations # type: ignore +from ._operations import ManagedClusterSnapshotsOperations # type: ignore from ._operations import TrustedAccessRoleBindingsOperations # type: ignore +from ._operations import LoadBalancersOperations # type: ignore from ._operations import IdentityBindingsOperations # type: ignore +from ._operations import JWTAuthenticatorsOperations # type: ignore +from ._operations import MeshMembershipsOperations # type: ignore from ._operations import Operations # type: ignore +from ._operations import AlertConfigurationsOperations # type: ignore +from ._operations import OperationStatusResultOperations # type: ignore from ._operations import PrivateLinkResourcesOperations # type: ignore from ._operations import ResolvePrivateLinkServiceIdOperations # type: ignore from ._operations import TrustedAccessRolesOperations # type: ignore +from ._operations import ContainerServiceOperations # type: ignore +from ._operations import VmSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -34,16 +43,25 @@ "AgentPoolsOperations", "ManagedClustersOperations", "MaintenanceConfigurationsOperations", + "MaintenanceWindowsOperations", "ManagedNamespacesOperations", "MachinesOperations", "PrivateEndpointConnectionsOperations", "SnapshotsOperations", + "ManagedClusterSnapshotsOperations", "TrustedAccessRoleBindingsOperations", + "LoadBalancersOperations", "IdentityBindingsOperations", + "JWTAuthenticatorsOperations", + "MeshMembershipsOperations", "Operations", + "AlertConfigurationsOperations", + "OperationStatusResultOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", "TrustedAccessRolesOperations", + "ContainerServiceOperations", + "VmSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py index 434c45a80f00..206a42e7c8ea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py @@ -40,42 +40,76 @@ from ..._validation import api_version_validation from ...operations._operations import ( build_agent_pools_abort_latest_operation_request, + build_agent_pools_complete_upgrade_request, build_agent_pools_create_or_update_request, build_agent_pools_delete_machines_request, build_agent_pools_delete_request, build_agent_pools_get_available_agent_pool_versions_request, build_agent_pools_get_request, build_agent_pools_get_upgrade_profile_request, + build_agent_pools_list_bootstrap_data_request, build_agent_pools_list_request, + build_agent_pools_update_request, build_agent_pools_upgrade_node_image_version_request, + build_alert_configurations_create_or_update_request, + build_alert_configurations_delete_request, + build_alert_configurations_get_request, + build_alert_configurations_list_by_managed_cluster_request, + build_container_service_list_node_image_versions_request, build_identity_bindings_create_or_update_request, build_identity_bindings_delete_request, build_identity_bindings_get_request, build_identity_bindings_list_by_managed_cluster_request, + build_jwt_authenticators_create_or_update_request, + build_jwt_authenticators_delete_request, + build_jwt_authenticators_get_request, + build_jwt_authenticators_list_by_managed_cluster_request, + build_load_balancers_create_or_update_request, + build_load_balancers_delete_request, + build_load_balancers_get_request, + build_load_balancers_list_by_managed_cluster_request, + build_machines_create_or_update_request, build_machines_get_request, build_machines_list_request, build_maintenance_configurations_create_or_update_request, build_maintenance_configurations_delete_request, build_maintenance_configurations_get_request, build_maintenance_configurations_list_by_managed_cluster_request, + build_maintenance_windows_create_or_update_request, + build_maintenance_windows_delete_request, + build_maintenance_windows_get_request, + build_maintenance_windows_list_by_subscription_request, + build_maintenance_windows_list_request, + build_maintenance_windows_update_tags_request, + build_managed_cluster_snapshots_create_or_update_request, + build_managed_cluster_snapshots_delete_request, + build_managed_cluster_snapshots_get_request, + build_managed_cluster_snapshots_list_by_resource_group_request, + build_managed_cluster_snapshots_list_request, + build_managed_cluster_snapshots_update_tags_request, build_managed_clusters_abort_latest_operation_request, build_managed_clusters_create_or_update_request, build_managed_clusters_delete_request, build_managed_clusters_get_access_profile_request, build_managed_clusters_get_command_result_request, + build_managed_clusters_get_guardrails_versions_request, build_managed_clusters_get_mesh_revision_profile_request, build_managed_clusters_get_mesh_upgrade_profile_request, build_managed_clusters_get_request, + build_managed_clusters_get_safeguards_versions_request, build_managed_clusters_get_upgrade_profile_request, build_managed_clusters_list_by_resource_group_request, build_managed_clusters_list_cluster_admin_credentials_request, build_managed_clusters_list_cluster_monitoring_user_credentials_request, build_managed_clusters_list_cluster_user_credentials_request, + build_managed_clusters_list_guardrails_versions_request, build_managed_clusters_list_kubernetes_versions_request, build_managed_clusters_list_mesh_revision_profiles_request, build_managed_clusters_list_mesh_upgrade_profiles_request, build_managed_clusters_list_outbound_network_dependencies_endpoints_request, build_managed_clusters_list_request, + build_managed_clusters_list_safeguards_versions_request, + build_managed_clusters_rebalance_load_balancers_request, build_managed_clusters_reset_aad_profile_request, build_managed_clusters_reset_service_principal_profile_request, build_managed_clusters_rotate_cluster_certificates_request, @@ -90,6 +124,14 @@ build_managed_namespaces_list_by_managed_cluster_request, build_managed_namespaces_list_credential_request, build_managed_namespaces_update_request, + build_mesh_memberships_create_or_update_request, + build_mesh_memberships_delete_request, + build_mesh_memberships_get_request, + build_mesh_memberships_list_by_managed_cluster_request, + build_operation_status_result_get_by_agent_pool_request, + build_operation_status_result_get_request, + build_operation_status_result_list_by_agent_pool_request, + build_operation_status_result_list_request, build_operations_list_request, build_private_endpoint_connections_delete_request, build_private_endpoint_connections_get_request, @@ -108,6 +150,7 @@ build_trusted_access_role_bindings_get_request, build_trusted_access_role_bindings_list_request, build_trusted_access_roles_list_request, + build_vm_skus_list_request, ) from .._configuration import ContainerServiceClientConfiguration @@ -896,6 +939,161 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _complete_upgrade_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_agent_pools_complete_upgrade_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_complete_upgrade( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Completes the upgrade of an agent pool. + + Completes the upgrade operation for the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._complete_upgrade_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _delete_machines_initial( self, resource_group_name: str, @@ -1271,24 +1469,143 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: _models.ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.containerservice.models.ListBootstrapDataRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: _types.ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.containerservice.types.ListBootstrapDataRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace_async - async def get_available_agent_pool_versions( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.AgentPoolAvailableVersions: - """Gets a list of supported Kubernetes versions for the specified agent pool. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: Union[_models.ListBootstrapDataRequest, _types.ListBootstrapDataRequest, IO[bytes]], + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. - See `supported Kubernetes versions - `_ for more details about - the version lifecycle. + Returns pool-level bootstrap configuration for FlexNode machines. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Is either a ListBootstrapDataRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.containerservice.models.ListBootstrapDataRequest or + ~azure.mgmt.containerservice.types.ListBootstrapDataRequest or IO[bytes] + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1299,16 +1616,27 @@ async def get_available_agent_pool_versions( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PoolBootstrapData] = kwargs.pop("cls", None) - _request = build_agent_pools_get_available_agent_pool_versions_request( + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_list_bootstrap_data_request( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -1341,181 +1669,36 @@ async def get_available_agent_pool_versions( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) + deserialized = _deserialize(_models.PoolBootstrapData, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace_async - async def get_upgrade_profile( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> _models.AgentPoolUpgradeProfile: - """Gets the upgrade profile for an agent pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_agent_pools_get_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class ManagedClustersOperations: # pylint: disable=docstring-missing-param,too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`managed_clusters` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: - """Gets a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedCluster - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedCluster, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _update_initial( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], + agent_pool_name: str, + parameters: Union[_models.AgentPoolUpdate, _types.AgentPoolUpdate, IO[bytes]], *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, @@ -1548,9 +1731,10 @@ async def _create_or_update_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_clusters_create_or_update_request( + _request = build_agent_pools_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, etag=etag, match_condition=match_condition, @@ -1573,7 +1757,7 @@ async def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -1586,10 +1770,11 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: + if response.status_code == 202: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -1600,26 +1785,31 @@ async def _create_or_update_initial( return deserialized # type: ignore @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, resource_name: str, - parameters: _models.ManagedCluster, + agent_pool_name: str, + parameters: _models.AgentPoolUpdate, *, content_type: str = "application/json", etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. + ) -> AsyncLROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPoolUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1628,33 +1818,38 @@ async def begin_create_or_update( :paramtype etag: str :keyword match_condition: The match condition to use upon the etag. Default value is None. :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of AsyncLROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, resource_name: str, - parameters: _types.ManagedCluster, + agent_pool_name: str, + parameters: _types.AgentPoolUpdate, *, content_type: str = "application/json", etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. + ) -> AsyncLROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedCluster + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. + :type parameters: ~azure.mgmt.containerservice.types.AgentPoolUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1663,32 +1858,37 @@ async def begin_create_or_update( :paramtype etag: str :keyword match_condition: The match condition to use upon the etag. Default value is None. :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of AsyncLROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, resource_name: str, + agent_pool_name: str, parameters: IO[bytes], *, content_type: str = "application/json", etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. + ) -> AsyncLROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Required. + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -1698,56 +1898,79 @@ async def begin_create_or_update( :paramtype etag: str :keyword match_condition: The match condition to use upon the etag. Default value is None. :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of AsyncLROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_or_update( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], + agent_pool_name: str, + parameters: Union[_models.AgentPoolUpdate, _types.AgentPoolUpdate, IO[bytes]], *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. + ) -> AsyncLROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or - ~azure.mgmt.containerservice.types.ManagedCluster or IO[bytes] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Is either a AgentPoolUpdate type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPoolUpdate or + ~azure.mgmt.containerservice.types.AgentPoolUpdate or IO[bytes] :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is None. :paramtype etag: str :keyword match_condition: The match condition to use upon the etag. Default value is None. :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of AsyncLROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, parameters=parameters, etag=etag, match_condition=match_condition, @@ -1762,7 +1985,7 @@ async def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedCluster, response.json()) + deserialized = _deserialize(_models.AgentPool, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1780,62 +2003,54 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.ManagedCluster].from_continuation_token( + return AsyncLROPoller[_models.AgentPool].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.ManagedCluster]( + return AsyncLROPoller[_models.AgentPool]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _update_tags_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: + @distributed_trace_async + async def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) - _request = build_managed_clusters_update_tags_request( + _request = build_agent_pools_get_available_agent_pool_versions_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -1845,18 +2060,19 @@ async def _update_tags_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -1864,111 +2080,357 @@ async def _update_tags_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - async def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: _types.TagsObject, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_agent_pools_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ManagedClustersOperations: # pylint: disable=docstring-missing-param,too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedCluster :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - async def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - :param resource_group_name: The name of the resource group. The name is case insensitive. + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedCluster, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". @@ -1985,27 +2447,27 @@ async def begin_update_tags( """ @distributed_trace_async - async def begin_update_tags( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> AsyncLROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + """Creates or updates a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or - ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or + ~azure.mgmt.containerservice.types.ManagedCluster or IO[bytes] :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is None. :paramtype etag: str @@ -2025,7 +2487,7 @@ async def begin_update_tags( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, parameters=parameters, @@ -2070,10 +2532,11 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - async def _delete_initial( + async def _update_tags_initial( self, resource_group_name: str, resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, @@ -2093,18 +2556,28 @@ async def _delete_initial( error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_update_tags_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, etag=etag, match_condition=match_condition, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -2121,7 +2594,7 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -2148,45 +2621,159 @@ async def _delete_initial( return deserialized # type: ignore + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @distributed_trace_async - async def begin_delete( + async def begin_update_tags( self, resource_group_name: str, resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], *, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a managed cluster. + ) -> AsyncLROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is None. :paramtype etag: str :keyword match_condition: The match condition to use upon the etag. Default value is None. :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns ManagedCluster. The ManagedCluster is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._update_tags_initial( resource_group_name=resource_group_name, resource_name=resource_name, + parameters=parameters, etag=etag, match_condition=match_condition, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -2195,9 +2782,12 @@ async def begin_delete( await raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedCluster, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -2212,97 +2802,282 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return AsyncLROPoller[None].from_continuation_token( + return AsyncLROPoller[_models.ManagedCluster].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ManagedCluster"]: - """Lists managed clusters in the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) + return AsyncLROPoller[_models.ManagedCluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + @api_version_validation( + params_added_on={"2026-06-02-preview": ["ignore_pod_disruption_budget"]}, + api_versions_list=[ + "2025-10-01", + "2026-01-01", + "2026-02-01", + "2026-03-01", + "2026-04-01", + "2026-05-01", + "2026-06-01", + "2026-06-02-preview", + ], + ) + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_managed_clusters_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - return _request + _request = build_managed_clusters_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedCluster], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + params_added_on={"2026-06-02-preview": ["ignore_pod_disruption_budget"]}, + api_versions_list=[ + "2025-10-01", + "2026-01-01", + "2026-02-01", + "2026-03-01", + "2026-04-01", + "2026-05-01", + "2026-06-01", + "2026-06-02-preview", + ], + ) + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods + on a node without considering Pod Disruption Budget. Default value is None. + :paramtype ignore_pod_disruption_budget: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ManagedCluster + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedCluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -4266,22 +5041,28 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @distributed_trace_async - async def get_upgrade_profile( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.ManagedClusterUpgradeProfile: - """Gets the upgrade profile of a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _rebalance_load_balancers_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.RebalanceLoadBalancersRequestBody, _types.RebalanceLoadBalancersRequestBody, IO[bytes] + ], + **kwargs: Any + ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -4290,16 +5071,26 @@ async def get_upgrade_profile( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_upgrade_profile_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_rebalance_load_balancers_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -4309,19 +5100,18 @@ async def get_upgrade_profile( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -4329,29 +5119,279 @@ async def get_upgrade_profile( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) - + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: ~azure.mgmt.containerservice.types.RebalanceLoadBalancersRequestBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.RebalanceLoadBalancersRequestBody, _types.RebalanceLoadBalancersRequestBody, IO[bytes] + ], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Is either a RebalanceLoadBalancersRequestBody type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or + ~azure.mgmt.containerservice.types.RebalanceLoadBalancersRequestBody or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._rebalance_load_balancers_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) + if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace_async - async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: - """Gets a mesh revision profile for a specified mesh in the specified location. + async def get_guardrails_versions( + self, location: str, version: str, **kwargs: Any + ) -> _models.GuardrailsAvailableVersion: + """Gets supported Guardrails version in the specified subscription and location. - Contains extra metadata on the revision, including supported revisions, cluster compatibility - and available upgrades. + Contains Guardrails version along with its support info and whether it is a default version. :param location: The name of the Azure region. Required. :type location: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile + :param version: Safeguards version. Required. + :type version: str + :return: GuardrailsAvailableVersion. The GuardrailsAvailableVersion is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4365,11 +5405,11 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) + cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_revision_profile_request( + _request = build_managed_clusters_get_guardrails_versions_request( location=location, - mode=mode, + version=version, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4404,7 +5444,7 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) + deserialized = _deserialize(_models.GuardrailsAvailableVersion, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -4412,25 +5452,25 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An return deserialized # type: ignore @distributed_trace - def list_mesh_revision_profiles( + def list_guardrails_versions( self, location: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshRevisionProfile"]: - """Lists mesh revision profiles for all meshes in the specified location. + ) -> AsyncItemPaged["_models.GuardrailsAvailableVersion"]: + """Gets a list of supported Guardrails versions in the specified subscription and location. - Contains extra metadata on each revision, including supported revisions, cluster compatibility - and available upgrades. + Contains list of Guardrails version along with its support info and whether it is a default + version. :param location: The name of the Azure region. Required. :type location: str - :return: An iterator like instance of MeshRevisionProfile + :return: An iterator like instance of GuardrailsAvailableVersion :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.GuardrailsAvailableVersion]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -4443,7 +5483,7 @@ def list_mesh_revision_profiles( def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_mesh_revision_profiles_request( + _request = build_managed_clusters_list_guardrails_versions_request( location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -4485,7 +5525,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshRevisionProfile], + List[_models.GuardrailsAvailableVersion], deserialized.get("value", []), ) if cls: @@ -4514,20 +5554,20 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def get_mesh_upgrade_profile( - self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any - ) -> _models.MeshUpgradeProfile: - """Gets available upgrades for a service mesh in a cluster. + async def get_safeguards_versions( + self, location: str, version: str, **kwargs: Any + ) -> _models.SafeguardsAvailableVersion: + """Gets supported Safeguards version in the specified subscription and location. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile + Contains Safeguards version along with its support info and whether it is a default version. + + :param location: The name of the Azure region. Required. + :type location: str + :param version: Safeguards version. Required. + :type version: str + :return: SafeguardsAvailableVersion. The SafeguardsAvailableVersion is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4541,12 +5581,11 @@ async def get_mesh_upgrade_profile( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) + cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mode=mode, + _request = build_managed_clusters_get_safeguards_versions_request( + location=location, + version=version, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4581,7 +5620,7 @@ async def get_mesh_upgrade_profile( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) + deserialized = _deserialize(_models.SafeguardsAvailableVersion, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -4589,25 +5628,25 @@ async def get_mesh_upgrade_profile( return deserialized # type: ignore @distributed_trace - def list_mesh_upgrade_profiles( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshUpgradeProfile"]: - """Lists available upgrades for all service meshes in a specific cluster. + def list_safeguards_versions( + self, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SafeguardsAvailableVersion"]: + """Gets a list of supported Safeguards versions in the specified subscription and location. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of MeshUpgradeProfile + Contains list of Safeguards version along with its support info and whether it is a default + version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of SafeguardsAvailableVersion :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.SafeguardsAvailableVersion]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -4620,9 +5659,8 @@ def list_mesh_upgrade_profiles( def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_mesh_upgrade_profiles_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_managed_clusters_list_safeguards_versions_request( + location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4663,7 +5701,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshUpgradeProfile], + List[_models.SafeguardsAvailableVersion], deserialized.get("value", []), ) if cls: @@ -4692,17 +5730,18 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: - """Gets a list of supported Kubernetes versions in the specified subscription. + async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: + """Gets a mesh revision profile for a specified mesh in the specified location. - Contains extra metadata on the version, including supported patch versions, capabilities, - available upgrades, and details on preview status of the version. + Contains extra metadata on the revision, including supported revisions, cluster compatibility + and available upgrades. :param location: The name of the Azure region. Required. :type location: str - :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4716,10 +5755,11 @@ async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) - _request = build_managed_clusters_list_kubernetes_versions_request( + _request = build_managed_clusters_get_mesh_revision_profile_request( location=location, + mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4754,48 +5794,130 @@ async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _model if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) + deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @distributed_trace + def list_mesh_revision_profiles( + self, location: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MeshRevisionProfile"]: + """Lists mesh revision profiles for all meshes in the specified location. + + Contains extra metadata on each revision, including supported revisions, cluster compatibility + and available upgrades. -class MaintenanceConfigurationsOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of MeshRevisionProfile + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`maintenance_configurations` attribute. - """ + cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_mesh_revision_profiles_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshRevisionProfile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Gets the specified maintenance configuration of a managed cluster. + async def get_mesh_upgrade_profile( + self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any + ) -> _models.MeshUpgradeProfile: + """Gets available upgrades for a service mesh in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4809,12 +5931,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_get_request( + _request = build_managed_clusters_get_mesh_upgrade_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, + mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4849,135 +5971,128 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: _models.MaintenanceConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + @distributed_trace + def list_mesh_upgrade_profiles( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MeshUpgradeProfile"]: + """Lists available upgrades for all service meshes in a specific cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :return: An iterator like instance of MeshUpgradeProfile + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: _types.MaintenanceConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.MaintenanceConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + def prepare_request(next_link=None): + if not next_link: - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ + _request = build_managed_clusters_list_mesh_upgrade_profiles_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshUpgradeProfile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: Union[_models.MaintenanceConfiguration, _types.MaintenanceConfiguration, IO[bytes]], - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: + """Gets a list of supported Kubernetes versions in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a - MaintenanceConfiguration type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or - ~azure.mgmt.containerservice.types.MaintenanceConfiguration or IO[bytes] - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + Contains extra metadata on the version, including supported patch versions, capabilities, + available upgrades, and details on preview status of the version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4988,27 +6103,15 @@ async def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, + _request = build_managed_clusters_list_kubernetes_versions_request( + location=location, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -5025,7 +6128,7 @@ async def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: await response.read() # Load the body in memory and close the socket @@ -5041,16 +6144,36 @@ async def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + +class MaintenanceConfigurationsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace_async - async def delete(self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any) -> None: - """Deletes a maintenance configuration. + async def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. @@ -5060,8 +6183,9 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name :param config_name: The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. :type config_name: str - :return: None - :rtype: None + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5075,9 +6199,9 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_delete_request( + _request = build_maintenance_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, config_name=config_name, @@ -5091,14 +6215,20 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -5106,27 +6236,287 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore - @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MaintenanceConfiguration"]: - """Gets a list of maintenance configurations in the specified managed cluster. + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _models.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: _types.MaintenanceConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.MaintenanceConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, _types.MaintenanceConfiguration, IO[bytes]], + **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or + ~azure.mgmt.containerservice.types.MaintenanceConfiguration or IO[bytes] + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_maintenance_configurations_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any) -> None: + """Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_maintenance_configurations_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MaintenanceConfiguration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) @@ -5213,14 +6603,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class ManagedNamespacesOperations: # pylint: disable=docstring-missing-param +class MaintenanceWindowsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`managed_namespaces` attribute. + :attr:`maintenance_windows` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5231,20 +6621,32 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def get( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.ManagedNamespace: - """Gets the specified namespace of a managed cluster. + self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any + ) -> _models.MaintenanceWindowResource: + """Gets the specified maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5258,12 +6660,11 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) - _request = build_managed_namespaces_get_request( + _request = build_maintenance_windows_get_request( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5298,19 +6699,32 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def _create_or_update_initial( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], + maintenance_window_name: str, + resource: Union[_models.MaintenanceWindowResource, _types.MaintenanceWindowResource, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -5329,15 +6743,14 @@ async def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(resource, (IOBase, bytes)): + _content = resource else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_namespaces_create_or_update_request( + _request = build_maintenance_windows_create_or_update_request( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -5388,33 +6801,28 @@ async def _create_or_update_initial( async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.ManagedNamespace, + maintenance_window_name: str, + resource: _models.MaintenanceWindowResource, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> AsyncLROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping + :return: An instance of AsyncLROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -5422,33 +6830,28 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _types.ManagedNamespace, + maintenance_window_name: str, + resource: _types.MaintenanceWindowResource, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> AsyncLROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedNamespace + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: ~azure.mgmt.containerservice.types.MaintenanceWindowResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping + :return: An instance of AsyncLROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -5456,80 +6859,83 @@ async def begin_create_or_update( async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], + maintenance_window_name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> AsyncLROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: IO[bytes] + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping + :return: An instance of AsyncLROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def begin_create_or_update( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], + maintenance_window_name: str, + resource: Union[_models.MaintenanceWindowResource, _types.MaintenanceWindowResource, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> AsyncLROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Is either a ManagedNamespace type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or - ~azure.mgmt.containerservice.types.ManagedNamespace or IO[bytes] - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Is either a + MaintenanceWindowResource type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.containerservice.models.MaintenanceWindowResource or + ~azure.mgmt.containerservice.types.MaintenanceWindowResource or IO[bytes] + :return: An instance of AsyncLROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - parameters=parameters, + maintenance_window_name=maintenance_window_name, + resource=resource, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -5541,7 +6947,7 @@ async def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedNamespace, response.json()) + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -5559,133 +6965,139 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.ManagedNamespace].from_continuation_token( + return AsyncLROPoller[_models.MaintenanceWindowResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.ManagedNamespace]( + return AsyncLROPoller[_models.MaintenanceWindowResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload - async def update( + async def update_tags( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.TagsObject, + maintenance_window_name: str, + properties: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update( + async def update_tags( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _types.TagsObject, + maintenance_window_name: str, + properties: _types.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: ~azure.mgmt.containerservice.types.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update( + async def update_tags( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], + maintenance_window_name: str, + properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: IO[bytes] + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def update( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def update_tags( self, resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + maintenance_window_name: str, + properties: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. Is + either a TagsObject type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.containerservice.models.TagsObject or ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5700,19 +7112,18 @@ async def update( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(properties, (IOBase, bytes)): + _content = properties else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_namespaces_update_request( + _request = build_maintenance_windows_update_tags_request( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -5749,15 +7160,22 @@ async def update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "maintenance_window_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) async def _delete_initial( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5772,10 +7190,9 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_namespaces_delete_request( + _request = build_maintenance_windows_delete_request( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5808,9 +7225,6 @@ async def _delete_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -5822,18 +7236,23 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "maintenance_window_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) async def begin_delete( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes a namespace. + """Deletes a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -5848,8 +7267,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + maintenance_window_name=maintenance_window_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -5884,25 +7302,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ManagedNamespace"]: - """Gets a list of managed namespaces in the specified managed cluster. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.MaintenanceWindowResource"]: + """Lists maintenance windows in the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of ManagedNamespace + :return: An iterator like instance of MaintenanceWindowResource :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MaintenanceWindowResource]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5915,9 +7334,8 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_managed_namespaces_list_by_managed_cluster_request( + _request = build_maintenance_windows_list_request( resource_group_name=resource_group_name, - resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5958,7 +7376,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ManagedNamespace], + List[_models.MaintenanceWindowResource], deserialized.get("value", []), ) if cls: @@ -5986,198 +7404,24 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @distributed_trace_async - async def list_credential( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.CredentialResults: - """Lists the credentials of a namespace. + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.MaintenanceWindowResource"]: + """Lists maintenance windows in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - - _request = build_managed_namespaces_list_credential_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class MachinesOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`machines` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any - ) -> _models.Machine: - """Get a specific machine in the specified agent pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :return: Machine. The Machine is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Machine - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Machine] = kwargs.pop("cls", None) - - _request = build_machines_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Machine, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Machine"]: - """Gets a list of machines in the specified agent pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: An iterator like instance of Machine - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Machine] + :return: An iterator like instance of MaintenanceWindowResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MaintenanceWindowResource]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6190,10 +7434,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_machines_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + _request = build_maintenance_windows_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6234,7 +7475,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Machine], + List[_models.MaintenanceWindowResource], deserialized.get("value", []), ) if cls: @@ -6263,14 +7504,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class PrivateEndpointConnectionsOperations: # pylint: disable=docstring-missing-param +class ManagedNamespacesOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`private_endpoint_connections` attribute. + :attr:`managed_namespaces` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6282,24 +7523,19 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace_async async def get( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets the specified private endpoint connection. - - To learn more about private clusters, see: - `https://docs.microsoft.com/azure/aks/private-clusters - `_. + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.ManagedNamespace: + """Gets the specified namespace of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6313,12 +7549,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_get_request( + _request = build_managed_namespaces_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6353,146 +7589,34 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def update( + async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - parameters: _types.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. - :type parameters: ~azure.mgmt.containerservice.types.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a - PrivateEndpointConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or - ~azure.mgmt.containerservice.types.PrivateEndpointConnection or IO[bytes] - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -6501,10 +7625,10 @@ async def update( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_private_endpoint_connections_update_request( + _request = build_managed_namespaces_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -6517,67 +7641,6 @@ async def update( } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access @@ -6586,7 +7649,7 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [200, 201]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -6599,7 +7662,7 @@ async def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: + if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) @@ -6612,86 +7675,308 @@ async def _delete_initial( return deserialized # type: ignore - @distributed_trace_async - 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. + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _models.ManagedNamespace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _types.ManagedNamespace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedNamespace + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Is either a ManagedNamespace type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or + ~azure.mgmt.containerservice.types.ManagedNamespace or IO[bytes] + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedNamespace, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) elif polling is False: polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) else: polling_method = polling if cont_token: - return AsyncLROPoller[None].from_continuation_token( + return AsyncLROPoller[_models.ManagedNamespace].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return AsyncLROPoller[_models.ManagedNamespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - @distributed_trace_async - 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. + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. - To learn more about private clusters, see: - `https://docs.microsoft.com/azure/aks/private-clusters - `_. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is - compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6702,16 +7987,27 @@ async def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_list_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_namespaces_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -6744,42 +8040,258 @@ async def list( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + async def _delete_initial( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) -class SnapshotsOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_namespaces_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace_async - async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: - """Gets a snapshot. + async def begin_delete( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a namespace. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ManagedNamespace"]: + """Gets a list of managed namespaces in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of ManagedNamespace + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_namespaces_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedNamespace], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def list_credential( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6793,11 +8305,12 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - _request = build_snapshots_get_request( + _request = build_managed_namespaces_list_credential_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6832,117 +8345,4397 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.Snapshot, response.json()) + deserialized = _deserialize(_models.CredentialResults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def create_or_update( + +class MachinesOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`machines` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any + ) -> _models.Machine: + """Get a specific machine in the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :return: Machine. The Machine is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Machine + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + + _request = build_machines_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Machine, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "machine_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - parameters: _models.Snapshot, + agent_pool_name: str, + machine_name: str, + parameters: Union[_models.Machine, _types.Machine, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_machines_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machine_name: str, + parameters: _models.Machine, *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> AsyncLROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.Machine :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_or_update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _types.Snapshot, + agent_pool_name: str, + machine_name: str, + parameters: _types.Machine, *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> AsyncLROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.Snapshot + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.Machine :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def create_or_update( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, + agent_pool_name: str, + machine_name: str, parameters: IO[bytes], *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> AsyncLROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "machine_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machine_name: str, + parameters: Union[_models.Machine, _types.Machine, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Is either a Machine type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.Machine or + ~azure.mgmt.containerservice.types.Machine or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + machine_name=machine_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Machine, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Machine].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Machine]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Machine"]: + """Gets a list of machines in the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An iterator like instance of Machine + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Machine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_machines_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Machine], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class PrivateEndpointConnectionsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + `https://docs.microsoft.com/azure/aks/private-clusters + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _types.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.types.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or + ~azure.mgmt.containerservice.types.PrivateEndpointConnection or IO[bytes] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + 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. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + 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. + + To learn more about private clusters, see: + `https://docs.microsoft.com/azure/aks/private-clusters + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SnapshotsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + _request = build_snapshots_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.Snapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot or + ~azure.mgmt.containerservice.types.Snapshot or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: + """Deletes a snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_snapshots_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Snapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. + + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshots_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Snapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ManagedClusterSnapshotsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`managed_cluster_snapshots` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: + """Gets a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + _request = build_managed_cluster_snapshots_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterSnapshot, _types.ManagedClusterSnapshot, IO[bytes]], + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or + ~azure.mgmt.containerservice.types.ManagedClusterSnapshot or IO[bytes] + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_cluster_snapshots_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_cluster_snapshots_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: + """Deletes a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_managed_cluster_snapshots_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ManagedClusterSnapshot"]: + """Lists managed cluster snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ManagedClusterSnapshot + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_cluster_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedClusterSnapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedClusterSnapshot"]: + """Gets a list of managed cluster snapshots in the specified subscription. + + :return: An iterator like instance of ManagedClusterSnapshot + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_cluster_snapshots_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedClusterSnapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class TrustedAccessRoleBindingsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`trusted_access_role_bindings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Get a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + + _request = build_trusted_access_role_bindings_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[ + _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] + ], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(trusted_access_role_binding, (IOBase, bytes)): + _content = trusted_access_role_binding + else: + _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_trusted_access_role_bindings_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _types.TrustedAccessRoleBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[ + _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] + ], + **kwargs: Any + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO[bytes] type. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + or ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding or IO[bytes] + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + trusted_access_role_binding=trusted_access_role_binding, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.TrustedAccessRoleBinding]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_trusted_access_role_bindings_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a trusted access role binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.TrustedAccessRoleBinding"]: + """List trusted access role bindings. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of TrustedAccessRoleBinding + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_trusted_access_role_bindings_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.TrustedAccessRoleBinding], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class LoadBalancersOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`load_balancers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def get( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> _models.LoadBalancer: + """Gets the specified load balancer. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + + _request = build_load_balancers_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoadBalancer, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: _models.LoadBalancer, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: _types.LoadBalancer, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.LoadBalancer + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: Union[_models.LoadBalancer, _types.LoadBalancer, IO[bytes]], + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Is either a LoadBalancer type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or + ~azure.mgmt.containerservice.types.LoadBalancer or IO[bytes] + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_load_balancers_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoadBalancer, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _delete_initial( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_load_balancers_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_delete( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LoadBalancer"]: + """Gets a list of load balancers in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of LoadBalancer + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoadBalancer]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_load_balancers_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LoadBalancer], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class IdentityBindingsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`identity_bindings` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + async def get( + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + ) -> _models.IdentityBinding: + """Gets the specified Identity Binding. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.IdentityBinding + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + + _request = build_identity_bindings_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IdentityBinding, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_bindings_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: _models.IdentityBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: _types.IdentityBinding, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.IdentityBinding + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Is either a IdentityBinding type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or + ~azure.mgmt.containerservice.types.IdentityBinding or IO[bytes] + :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IdentityBinding, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IdentityBinding].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IdentityBinding]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + async def _delete_initial( + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_identity_bindings_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + async def begin_delete( + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an identity binding in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IdentityBinding"]: + """Gets a list of identity bindings in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of IdentityBinding + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_identity_bindings_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IdentityBinding], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class JWTAuthenticatorsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`jwt_authenticators` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def get( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> _models.JWTAuthenticator: + """Gets the specified JWT authenticator of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :return: JWTAuthenticator. The JWTAuthenticator is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @distributed_trace_async - async def create_or_update( + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) + + _request = build_jwt_authenticators_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JWTAuthenticator, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + jwt_authenticator_name: str, + parameters: Union[_models.JWTAuthenticator, _types.JWTAuthenticator, IO[bytes]], **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot or - ~azure.mgmt.containerservice.types.Snapshot or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -6955,7 +12748,7 @@ async def create_or_update( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -6964,9 +12757,10 @@ async def create_or_update( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_snapshots_create_or_update_request( + _request = build_jwt_authenticators_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -6980,7 +12774,7 @@ async def create_or_update( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -6988,11 +12782,10 @@ async def create_or_update( response = pipeline_response.http_response if response.status_code not in [200, 201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -7000,200 +12793,230 @@ async def create_or_update( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - async def update_tags( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.TagsObject, + jwt_authenticator_name: str, + parameters: _models.JWTAuthenticator, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> AsyncLROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _types.TagsObject, + jwt_authenticator_name: str, + parameters: _types.JWTAuthenticator, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> AsyncLROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.JWTAuthenticator :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, + jwt_authenticator_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> AsyncLROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def update_tags( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + jwt_authenticator_name: str, + parameters: Union[_models.JWTAuthenticator, _types.JWTAuthenticator, IO[bytes]], **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> AsyncLROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a - TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or - ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Is either a JWTAuthenticator type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or + ~azure.mgmt.containerservice.types.JWTAuthenticator or IO[bytes] + :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_update_tags_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.JWTAuthenticator, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - return deserialized # type: ignore + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - @distributed_trace_async - async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: - """Deletes a snapshot. + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.JWTAuthenticator].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.JWTAuthenticator]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def _delete_initial( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -7205,11 +13028,12 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_snapshots_delete_request( + _request = build_jwt_authenticators_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7220,14 +13044,19 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -7235,118 +13064,123 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: - """Lists snapshots in the specified subscription and resource group. + return deserialized # type: ignore + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def begin_delete( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a JWT authenticator and updates the managed cluster to apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_snapshots_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Snapshot], - deserialized.get("value", []), + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + return cls(pipeline_response, None, {}) # type: ignore - async def get_next(next_link=None): - _request = prepare_request(next_link) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: - """Gets a list of snapshots in the specified subscription. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.JWTAuthenticator"]: + """Gets a list of JWT authenticators in the specified managed cluster. - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of JWTAuthenticator + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.JWTAuthenticator]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7359,7 +13193,9 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: def prepare_request(next_link=None): if not next_link: - _request = build_snapshots_list_request( + _request = build_jwt_authenticators_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7400,7 +13236,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Snapshot], + List[_models.JWTAuthenticator], deserialized.get("value", []), ) if cls: @@ -7429,14 +13265,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class TrustedAccessRoleBindingsOperations: # pylint: disable=docstring-missing-param +class MeshMembershipsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`trusted_access_role_bindings` attribute. + :attr:`mesh_memberships` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -7447,21 +13283,34 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def get( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any - ) -> _models.TrustedAccessRoleBinding: - """Get a trusted access role binding. + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + ) -> _models.MeshMembership: + """Gets the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :type resource_name: str + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :return: MeshMembership. The MeshMembership is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshMembership :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -7475,12 +13324,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_get_request( + _request = build_mesh_memberships_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7515,21 +13364,34 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.MeshMembership, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[ - _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] - ], + mesh_membership_name: str, + parameters: Union[_models.MeshMembership, _types.MeshMembership, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -7548,15 +13410,15 @@ async def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(trusted_access_role_binding, (IOBase, bytes)): - _content = trusted_access_role_binding + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_trusted_access_role_bindings_create_or_update_request( + _request = build_mesh_memberships_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -7608,30 +13470,29 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _models.TrustedAccessRoleBinding, + mesh_membership_name: str, + parameters: _models.MeshMembership, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> AsyncLROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MeshMembership :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -7640,30 +13501,29 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _types.TrustedAccessRoleBinding, + mesh_membership_name: str, + parameters: _types.MeshMembership, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> AsyncLROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.MeshMembership :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -7672,68 +13532,79 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: IO[bytes], + mesh_membership_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> AsyncLROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: IO[bytes] + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[ - _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] - ], + mesh_membership_name: str, + parameters: Union[_models.MeshMembership, _types.MeshMembership, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> AsyncLROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a - TrustedAccessRoleBinding type or a IO[bytes] type. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding - or ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding or IO[bytes] - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Is either a MeshMembership type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or + ~azure.mgmt.containerservice.types.MeshMembership or IO[bytes] + :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -7741,8 +13612,8 @@ async def begin_create_or_update( raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, - trusted_access_role_binding=trusted_access_role_binding, + mesh_membership_name=mesh_membership_name, + parameters=parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -7754,7 +13625,7 @@ async def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.MeshMembership, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -7772,18 +13643,31 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( + return AsyncLROPoller[_models.MeshMembership].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.TrustedAccessRoleBinding]( + return AsyncLROPoller[_models.MeshMembership]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def _delete_initial( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7798,10 +13682,10 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_delete_request( + _request = build_mesh_memberships_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7848,18 +13732,31 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) async def begin_delete( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Delete a trusted access role binding. + """Deletes the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -7875,7 +13772,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -7888,47 +13785,168 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- if cls: return cls(pipeline_response, None, {}) # type: ignore - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MeshMembership"]: + """Lists mesh memberships in a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MeshMembership + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshMembership] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MeshMembership]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_mesh_memberships_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshMembership], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class Operations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`operations` attribute. + """ - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.TrustedAccessRoleBinding"]: - """List trusted access role bindings. + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationValue"]: + """Gets a list of operations. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of TrustedAccessRoleBinding + :return: An iterator like instance of OperationValue :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationValue] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationValue]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7941,10 +13959,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_trusted_access_role_bindings_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, + _request = build_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -7984,7 +13999,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.TrustedAccessRoleBinding], + List[_models.OperationValue], deserialized.get("value", []), ) if cls: @@ -8013,14 +14028,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class IdentityBindingsOperations: # pylint: disable=docstring-missing-param +class AlertConfigurationsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`identity_bindings` attribute. + :attr:`alert_configurations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -8032,33 +14047,33 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace_async @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) async def get( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any + ) -> _models.AlertConfiguration: + """Gets the specified alert configuration of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :return: AlertConfiguration. The AlertConfiguration is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AlertConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8072,12 +14087,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.AlertConfiguration] = kwargs.pop("cls", None) - _request = build_identity_bindings_get_request( + _request = build_alert_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8112,7 +14127,7 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.AlertConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -8120,26 +14135,26 @@ async def get( return deserialized # type: ignore @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "content_type", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + configuration_name: str, + resource: Union[_models.AlertConfiguration, _types.AlertConfiguration, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -8158,15 +14173,15 @@ async def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(resource, (IOBase, bytes)): + _content = resource else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_identity_bindings_create_or_update_request( + _request = build_alert_configurations_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -8219,29 +14234,30 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _models.IdentityBinding, + configuration_name: str, + resource: _models.AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> AsyncLROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: ~azure.mgmt.containerservice.models.AlertConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: An instance of AsyncLROPoller that returns AlertConfiguration. The AlertConfiguration + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -8250,29 +14266,30 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _types.IdentityBinding, + configuration_name: str, + resource: _types.AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> AsyncLROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: ~azure.mgmt.containerservice.types.AlertConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: An instance of AsyncLROPoller that returns AlertConfiguration. The AlertConfiguration + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -8281,79 +14298,81 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: IO[bytes], + configuration_name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> AsyncLROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: IO[bytes] + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: An instance of AsyncLROPoller that returns AlertConfiguration. The AlertConfiguration + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "content_type", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + configuration_name: str, + resource: Union[_models.AlertConfiguration, _types.AlertConfiguration, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> AsyncLROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Is either a IdentityBinding type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or - ~azure.mgmt.containerservice.types.IdentityBinding or IO[bytes] - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Is either a AlertConfiguration + type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.containerservice.models.AlertConfiguration or + ~azure.mgmt.containerservice.types.AlertConfiguration or IO[bytes] + :return: An instance of AsyncLROPoller that returns AlertConfiguration. The AlertConfiguration + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.AlertConfiguration] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -8361,8 +14380,8 @@ async def begin_create_or_update( raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, - parameters=parameters, + configuration_name=configuration_name, + resource=resource, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -8374,7 +14393,7 @@ async def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.AlertConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -8392,31 +14411,31 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.IdentityBinding].from_continuation_token( + return AsyncLROPoller[_models.AlertConfiguration].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.IdentityBinding]( + return AsyncLROPoller[_models.AlertConfiguration]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) async def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8431,10 +14450,10 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_identity_bindings_delete_request( + _request = build_alert_configurations_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8482,30 +14501,30 @@ async def _delete_initial( @distributed_trace_async @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) async def begin_delete( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes an identity binding in the specified managed cluster. + """Deletes an alert configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -8521,67 +14540,214 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AlertConfiguration"]: + """Gets a list of alert configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of AlertConfiguration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.AlertConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AlertConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_alert_configurations_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AlertConfiguration], + deserialized.get("value", []), + ) if cls: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + async def get_next(next_link=None): + _request = prepare_request(next_link) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class OperationStatusResultOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`operation_status_result` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "active_only", + "accept", + ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. + def list_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + active_only: Optional[bool] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OperationStatusResult"]: + """Gets a list of operations in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of IdentityBinding + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword active_only: If true, only return operations that are currently active (not terminal). + Default value is None. + :paramtype active_only: bool + :return: An iterator like instance of OperationStatusResult :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8594,10 +14760,12 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_identity_bindings_list_by_managed_cluster_request( + _request = build_operation_status_result_list_by_agent_pool_request( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, + active_only=active_only, api_version=self._config.api_version, headers=_headers, params=_params, @@ -8637,7 +14805,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.IdentityBinding], + List[_models.OperationStatusResult], deserialized.get("value", []), ) if cls: @@ -8665,37 +14833,126 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "operation_id", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def get_by_agent_pool( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a specific operation in the specified agent pool. -class Operations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`operations` attribute. - """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_result_get_by_agent_pool_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationValue"]: - """Gets a list of operations. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.OperationStatusResult"]: + """Gets a list of operations in the specified managedCluster. - :return: An iterator like instance of OperationValue + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of OperationStatusResult :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationValue] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.OperationValue]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8708,7 +14965,10 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationValue"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_operation_status_result_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, params=_params, @@ -8748,33 +15008,122 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.OperationValue], + List[_models.OperationStatusResult], deserialized.get("value", []), ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - async def get_next(next_link=None): - _request = prepare_request(next_link) + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "operation_id", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + async def get( + self, resource_group_name: str, resource_name: str, operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a specific operation in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_result_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return AsyncItemPaged(get_next, extract_data) + return deserialized # type: ignore class PrivateLinkResourcesOperations: # pylint: disable=docstring-missing-param @@ -9174,3 +15523,247 @@ async def get_next(next_link=None): return pipeline_response return AsyncItemPaged(get_next, extract_data) + + +class ContainerServiceOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`container_service` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_node_image_versions(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.NodeImageVersion"]: + """Gets a list of supported NodeImage versions in the specified subscription. + + Only returns the latest version of each node image. For example there may be an + AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is + visible in this list. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of NodeImageVersion + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NodeImageVersion]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_container_service_list_node_image_versions_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NodeImageVersion], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class VmSkusOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`vm_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, location: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceSku"]: + """Gets the list of VM SKUs accepted by AKS. + + Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS + will perform a best effort approach to provision the requested VM SKUs, but availability is not + guaranteed. + + :param location: The name of the Azure region. Required. + :type location: str + :keyword include_extended_locations: To Include Extended Locations information or not in the + response. Default value is None. + :paramtype include_extended_locations: bool + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ResourceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_vm_skus_list_request( + location=location, + subscription_id=self._config.subscription_id, + include_extended_locations=include_extended_locations, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index ce787498bcf4..2d4e8fbd1fe7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -26,25 +26,51 @@ AgentPoolAvailableVersions, AgentPoolAvailableVersionsProperties, AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, + AgentPoolBlueGreenUpgradeSettings, AgentPoolDeleteMachinesParameter, AgentPoolGatewayProfile, AgentPoolManagedClusterAgentPoolProfileProperties, + AgentPoolNICPublicIPAddressConfiguration, + AgentPoolNetworkInterface, AgentPoolNetworkProfile, AgentPoolRecentlyUsedVersion, AgentPoolSecurityProfile, AgentPoolStatus, + AgentPoolUpdate, + AgentPoolUpdateManualScaleProfile, + AgentPoolUpdateProperties, + AgentPoolUpdateScaleProfile, + AgentPoolUpdateVirtualMachinesProfile, AgentPoolUpgradeProfile, AgentPoolUpgradeProfileProperties, AgentPoolUpgradeProfilePropertiesUpgradesItem, AgentPoolUpgradeSettings, AgentPoolWindowsProfile, + AlertConfiguration, + AlertConfigurationProperties, + AlertNotification, + AllowedSubject, AutoScaleProfile, AzureKeyVaultKms, + BastionProfile, + BootstrapAzureConfig, + BootstrapComponentVersions, + BootstrapKubeletConfig, + BootstrapNetworkingConfig, + BootstrapNodeConfig, + BootstrapTargetCluster, + BootstrapTokenInfo, + CapacityReservation, + CapacityReservationGroup, ClusterUpgradeSettings, CommandResultProperties, CompatibleVersions, + Component, + ComponentsByRelease, ContainerServiceLinuxProfile, ContainerServiceNetworkProfile, + ContainerServiceNetworkProfileKubeProxyConfig, + ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, CreationData, @@ -61,6 +87,9 @@ ErrorResponse, ExtendedLocation, GPUProfile, + GuardrailsAvailableVersion, + GuardrailsAvailableVersionsProperties, + HardEvictionThreshold, IPTag, IdentityBinding, IdentityBindingManagedIdentityProfile, @@ -72,21 +101,44 @@ IstioIngressGateway, IstioPluginCertificateAuthority, IstioServiceMesh, + JWTAuthenticator, + JWTAuthenticatorClaimMappingExpression, + JWTAuthenticatorClaimMappings, + JWTAuthenticatorExtraClaimMappingExpression, + JWTAuthenticatorIssuer, + JWTAuthenticatorProperties, + JWTAuthenticatorValidationRule, + KubeReserved, KubeletConfig, KubernetesPatchVersion, + KubernetesResourceObjectEncryptionProfile, KubernetesVersion, KubernetesVersionCapabilities, KubernetesVersionListResult, + LabelSelector, + LabelSelectorRequirement, LinuxOSConfig, + ListBootstrapDataRequest, + LoadBalancer, + LoadBalancerProperties, LocalDNSOverride, LocalDNSProfile, Machine, + MachineBillingProfile, + MachineHardwareProfile, MachineIpAddress, + MachineKubernetesProfile, MachineNetworkProperties, + MachineOSProfile, + MachineOSProfileLinuxProfile, MachineProperties, + MachineSecurityProfile, + MachineStatus, MaintenanceConfiguration, MaintenanceConfigurationProperties, MaintenanceWindow, + MaintenanceWindowResource, + MaintenanceWindowResourceProperties, ManagedCluster, ManagedClusterAADProfile, ManagedClusterAIToolchainOperatorProfile, @@ -108,11 +160,15 @@ ManagedClusterAzureMonitorProfileMetrics, ManagedClusterAzureMonitorProfileMetricsControlPlane, ManagedClusterBootstrapProfile, + ManagedClusterControlPlaneScalingProfile, ManagedClusterCostAnalysis, ManagedClusterHTTPProxyConfig, + ManagedClusterHealthMonitorProfile, ManagedClusterHostedSystemProfile, ManagedClusterIdentity, + ManagedClusterIngressDefaultDomainProfile, ManagedClusterIngressProfile, + ManagedClusterIngressProfileApplicationLoadBalancer, ManagedClusterIngressProfileGatewayConfiguration, ManagedClusterIngressProfileNginx, ManagedClusterIngressProfileWebAppRouting, @@ -138,6 +194,7 @@ ManagedClusterPoolUpgradeProfileUpgradesItem, ManagedClusterProperties, ManagedClusterPropertiesAutoScalerProfile, + ManagedClusterPropertiesForSnapshot, ManagedClusterSKU, ManagedClusterSecurityProfile, ManagedClusterSecurityProfileDefender, @@ -145,8 +202,12 @@ ManagedClusterSecurityProfileDefenderSecurityGatingIdentity, ManagedClusterSecurityProfileDefenderSecurityMonitoring, ManagedClusterSecurityProfileImageCleaner, + ManagedClusterSecurityProfileImageIntegrity, + ManagedClusterSecurityProfileNodeRestriction, ManagedClusterSecurityProfileWorkloadIdentity, ManagedClusterServicePrincipalProfile, + ManagedClusterSnapshot, + ManagedClusterSnapshotProperties, ManagedClusterStaticEgressGatewayProfile, ManagedClusterStatus, ManagedClusterStorageProfile, @@ -164,6 +225,9 @@ ManagedNamespace, ManagedServiceIdentityUserAssignedIdentitiesValue, ManualScaleProfile, + MeshMembership, + MeshMembershipPrivateConnectProfile, + MeshMembershipProperties, MeshRevision, MeshRevisionProfile, MeshRevisionProfileProperties, @@ -171,11 +235,18 @@ MeshUpgradeProfileProperties, NamespaceProperties, NetworkPolicies, + NetworkProfileForSnapshot, + NodeDisruptionProfile, + NodeImageVersion, + NvidiaGPUProfile, + OperationStatusResult, OperationValue, OperationValueDisplay, OutboundEnvironmentEndpoint, + PoolBootstrapData, PortRange, PowerState, + PreparedImageSpecificationProfile, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, @@ -184,19 +255,33 @@ PrivateLinkResourcesListResult, PrivateLinkServiceConnectionState, ProxyResource, + RebalanceLoadBalancersRequestBody, RelativeMonthlySchedule, Resource, ResourceQuota, ResourceReference, + ResourceSku, + ResourceSkuCapabilities, + ResourceSkuCapacity, + ResourceSkuCosts, + ResourceSkuLocationInfo, + ResourceSkuRestrictionInfo, + ResourceSkuRestrictions, + ResourceSkuZoneDetails, RunCommandRequest, RunCommandResult, + SafeguardsAvailableVersion, + SafeguardsAvailableVersionsProperties, ScaleProfile, Schedule, SchedulerInstanceProfile, SchedulerProfile, + ServiceAccountImagePullProfile, ServiceMeshProfile, Snapshot, SnapshotProperties, + SoftEvictionGracePeriod, + SoftEvictionThreshold, SysctlConfig, SystemData, TagsObject, @@ -217,28 +302,42 @@ from ._enums import ( # type: ignore AccelerationMode, + AddonAutoscaling, AdoptionPolicy, AdvancedNetworkPolicies, AgentPoolMode, + AgentPoolNICPublicIPAddressVersion, + AgentPoolNetworkInterfaceType, AgentPoolSSHAccess, AgentPoolType, + AlertConfigurationMode, + AlertConfigurationProvisioningState, ArtifactSource, BackendPoolType, + BastionSku, + ClusterServiceLoadBalancerHealthProbeMode, Code, ConnectionStatus, ContainerNetworkLogs, + ControlPlaneScalingSize, CreatedByType, DRANETMode, DeletePolicy, + DriftAction, + DriverType, Expander, ExtendedLocationTypes, Format, GPUDriver, GPUInstanceProfile, GatewayAPIIstioEnabled, + GuardrailsSupport, IPFamily, IdentityBindingProvisioningState, + InfrastructureEncryption, + IpvsScheduler, IstioIngressGatewayMode, + JWTAuthenticatorProvisioningState, KeyVaultNetworkAccessTypes, KubeletDiskType, KubernetesSupportPlan, @@ -256,6 +355,10 @@ ManagedClusterSKUName, ManagedClusterSKUTier, ManagedGatewayType, + ManagementMode, + MeshMembershipProvisioningState, + MigStrategy, + Mode, NamespaceProvisioningState, NetworkDataplane, NetworkMode, @@ -263,25 +366,35 @@ NetworkPluginMode, NetworkPolicy, NginxIngressControllerType, + NodeDisruptionPolicy, NodeOSUpgradeChannel, NodeProvisioningDefaultNodePools, NodeProvisioningMode, + NvidiaDriverMode, OSDiskType, OSSKU, OSType, + Operator, OutboundType, PodIPAllocationMode, + PodLinkLocalAccess, PolicyRule, PrivateEndpointConnectionProvisioningState, Protocol, ProxyRedirectionMechanism, PublicNetworkAccess, ResourceIdentityType, + ResourceProvisioningState, + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, RestrictionLevel, + SafeguardsSupport, ScaleDownMode, ScaleSetEvictionPolicy, ScaleSetPriority, SchedulerConfigMode, + SeccompDefault, ServiceMeshMode, SnapshotType, TransitEncryptionType, @@ -289,6 +402,8 @@ Type, UndrainableNodeBehavior, UpgradeChannel, + UpgradeStrategy, + VmState, WeekDay, WorkloadRuntime, ) @@ -309,25 +424,51 @@ "AgentPoolAvailableVersions", "AgentPoolAvailableVersionsProperties", "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", + "AgentPoolBlueGreenUpgradeSettings", "AgentPoolDeleteMachinesParameter", "AgentPoolGatewayProfile", "AgentPoolManagedClusterAgentPoolProfileProperties", + "AgentPoolNICPublicIPAddressConfiguration", + "AgentPoolNetworkInterface", "AgentPoolNetworkProfile", "AgentPoolRecentlyUsedVersion", "AgentPoolSecurityProfile", "AgentPoolStatus", + "AgentPoolUpdate", + "AgentPoolUpdateManualScaleProfile", + "AgentPoolUpdateProperties", + "AgentPoolUpdateScaleProfile", + "AgentPoolUpdateVirtualMachinesProfile", "AgentPoolUpgradeProfile", "AgentPoolUpgradeProfileProperties", "AgentPoolUpgradeProfilePropertiesUpgradesItem", "AgentPoolUpgradeSettings", "AgentPoolWindowsProfile", + "AlertConfiguration", + "AlertConfigurationProperties", + "AlertNotification", + "AllowedSubject", "AutoScaleProfile", "AzureKeyVaultKms", + "BastionProfile", + "BootstrapAzureConfig", + "BootstrapComponentVersions", + "BootstrapKubeletConfig", + "BootstrapNetworkingConfig", + "BootstrapNodeConfig", + "BootstrapTargetCluster", + "BootstrapTokenInfo", + "CapacityReservation", + "CapacityReservationGroup", "ClusterUpgradeSettings", "CommandResultProperties", "CompatibleVersions", + "Component", + "ComponentsByRelease", "ContainerServiceLinuxProfile", "ContainerServiceNetworkProfile", + "ContainerServiceNetworkProfileKubeProxyConfig", + "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", "ContainerServiceSshConfiguration", "ContainerServiceSshPublicKey", "CreationData", @@ -344,6 +485,9 @@ "ErrorResponse", "ExtendedLocation", "GPUProfile", + "GuardrailsAvailableVersion", + "GuardrailsAvailableVersionsProperties", + "HardEvictionThreshold", "IPTag", "IdentityBinding", "IdentityBindingManagedIdentityProfile", @@ -355,21 +499,44 @@ "IstioIngressGateway", "IstioPluginCertificateAuthority", "IstioServiceMesh", + "JWTAuthenticator", + "JWTAuthenticatorClaimMappingExpression", + "JWTAuthenticatorClaimMappings", + "JWTAuthenticatorExtraClaimMappingExpression", + "JWTAuthenticatorIssuer", + "JWTAuthenticatorProperties", + "JWTAuthenticatorValidationRule", + "KubeReserved", "KubeletConfig", "KubernetesPatchVersion", + "KubernetesResourceObjectEncryptionProfile", "KubernetesVersion", "KubernetesVersionCapabilities", "KubernetesVersionListResult", + "LabelSelector", + "LabelSelectorRequirement", "LinuxOSConfig", + "ListBootstrapDataRequest", + "LoadBalancer", + "LoadBalancerProperties", "LocalDNSOverride", "LocalDNSProfile", "Machine", + "MachineBillingProfile", + "MachineHardwareProfile", "MachineIpAddress", + "MachineKubernetesProfile", "MachineNetworkProperties", + "MachineOSProfile", + "MachineOSProfileLinuxProfile", "MachineProperties", + "MachineSecurityProfile", + "MachineStatus", "MaintenanceConfiguration", "MaintenanceConfigurationProperties", "MaintenanceWindow", + "MaintenanceWindowResource", + "MaintenanceWindowResourceProperties", "ManagedCluster", "ManagedClusterAADProfile", "ManagedClusterAIToolchainOperatorProfile", @@ -391,11 +558,15 @@ "ManagedClusterAzureMonitorProfileMetrics", "ManagedClusterAzureMonitorProfileMetricsControlPlane", "ManagedClusterBootstrapProfile", + "ManagedClusterControlPlaneScalingProfile", "ManagedClusterCostAnalysis", "ManagedClusterHTTPProxyConfig", + "ManagedClusterHealthMonitorProfile", "ManagedClusterHostedSystemProfile", "ManagedClusterIdentity", + "ManagedClusterIngressDefaultDomainProfile", "ManagedClusterIngressProfile", + "ManagedClusterIngressProfileApplicationLoadBalancer", "ManagedClusterIngressProfileGatewayConfiguration", "ManagedClusterIngressProfileNginx", "ManagedClusterIngressProfileWebAppRouting", @@ -421,6 +592,7 @@ "ManagedClusterPoolUpgradeProfileUpgradesItem", "ManagedClusterProperties", "ManagedClusterPropertiesAutoScalerProfile", + "ManagedClusterPropertiesForSnapshot", "ManagedClusterSKU", "ManagedClusterSecurityProfile", "ManagedClusterSecurityProfileDefender", @@ -428,8 +600,12 @@ "ManagedClusterSecurityProfileDefenderSecurityGatingIdentity", "ManagedClusterSecurityProfileDefenderSecurityMonitoring", "ManagedClusterSecurityProfileImageCleaner", + "ManagedClusterSecurityProfileImageIntegrity", + "ManagedClusterSecurityProfileNodeRestriction", "ManagedClusterSecurityProfileWorkloadIdentity", "ManagedClusterServicePrincipalProfile", + "ManagedClusterSnapshot", + "ManagedClusterSnapshotProperties", "ManagedClusterStaticEgressGatewayProfile", "ManagedClusterStatus", "ManagedClusterStorageProfile", @@ -447,6 +623,9 @@ "ManagedNamespace", "ManagedServiceIdentityUserAssignedIdentitiesValue", "ManualScaleProfile", + "MeshMembership", + "MeshMembershipPrivateConnectProfile", + "MeshMembershipProperties", "MeshRevision", "MeshRevisionProfile", "MeshRevisionProfileProperties", @@ -454,11 +633,18 @@ "MeshUpgradeProfileProperties", "NamespaceProperties", "NetworkPolicies", + "NetworkProfileForSnapshot", + "NodeDisruptionProfile", + "NodeImageVersion", + "NvidiaGPUProfile", + "OperationStatusResult", "OperationValue", "OperationValueDisplay", "OutboundEnvironmentEndpoint", + "PoolBootstrapData", "PortRange", "PowerState", + "PreparedImageSpecificationProfile", "PrivateEndpoint", "PrivateEndpointConnection", "PrivateEndpointConnectionListResult", @@ -467,19 +653,33 @@ "PrivateLinkResourcesListResult", "PrivateLinkServiceConnectionState", "ProxyResource", + "RebalanceLoadBalancersRequestBody", "RelativeMonthlySchedule", "Resource", "ResourceQuota", "ResourceReference", + "ResourceSku", + "ResourceSkuCapabilities", + "ResourceSkuCapacity", + "ResourceSkuCosts", + "ResourceSkuLocationInfo", + "ResourceSkuRestrictionInfo", + "ResourceSkuRestrictions", + "ResourceSkuZoneDetails", "RunCommandRequest", "RunCommandResult", + "SafeguardsAvailableVersion", + "SafeguardsAvailableVersionsProperties", "ScaleProfile", "Schedule", "SchedulerInstanceProfile", "SchedulerProfile", + "ServiceAccountImagePullProfile", "ServiceMeshProfile", "Snapshot", "SnapshotProperties", + "SoftEvictionGracePeriod", + "SoftEvictionThreshold", "SysctlConfig", "SystemData", "TagsObject", @@ -497,28 +697,42 @@ "WeeklySchedule", "WindowsGmsaProfile", "AccelerationMode", + "AddonAutoscaling", "AdoptionPolicy", "AdvancedNetworkPolicies", "AgentPoolMode", + "AgentPoolNICPublicIPAddressVersion", + "AgentPoolNetworkInterfaceType", "AgentPoolSSHAccess", "AgentPoolType", + "AlertConfigurationMode", + "AlertConfigurationProvisioningState", "ArtifactSource", "BackendPoolType", + "BastionSku", + "ClusterServiceLoadBalancerHealthProbeMode", "Code", "ConnectionStatus", "ContainerNetworkLogs", + "ControlPlaneScalingSize", "CreatedByType", "DRANETMode", "DeletePolicy", + "DriftAction", + "DriverType", "Expander", "ExtendedLocationTypes", "Format", "GPUDriver", "GPUInstanceProfile", "GatewayAPIIstioEnabled", + "GuardrailsSupport", "IPFamily", "IdentityBindingProvisioningState", + "InfrastructureEncryption", + "IpvsScheduler", "IstioIngressGatewayMode", + "JWTAuthenticatorProvisioningState", "KeyVaultNetworkAccessTypes", "KubeletDiskType", "KubernetesSupportPlan", @@ -536,6 +750,10 @@ "ManagedClusterSKUName", "ManagedClusterSKUTier", "ManagedGatewayType", + "ManagementMode", + "MeshMembershipProvisioningState", + "MigStrategy", + "Mode", "NamespaceProvisioningState", "NetworkDataplane", "NetworkMode", @@ -543,25 +761,35 @@ "NetworkPluginMode", "NetworkPolicy", "NginxIngressControllerType", + "NodeDisruptionPolicy", "NodeOSUpgradeChannel", "NodeProvisioningDefaultNodePools", "NodeProvisioningMode", + "NvidiaDriverMode", "OSDiskType", "OSSKU", "OSType", + "Operator", "OutboundType", "PodIPAllocationMode", + "PodLinkLocalAccess", "PolicyRule", "PrivateEndpointConnectionProvisioningState", "Protocol", "ProxyRedirectionMechanism", "PublicNetworkAccess", "ResourceIdentityType", + "ResourceProvisioningState", + "ResourceSkuCapacityScaleType", + "ResourceSkuRestrictionsReasonCode", + "ResourceSkuRestrictionsType", "RestrictionLevel", + "SafeguardsSupport", "ScaleDownMode", "ScaleSetEvictionPolicy", "ScaleSetPriority", "SchedulerConfigMode", + "SeccompDefault", "ServiceMeshMode", "SnapshotType", "TransitEncryptionType", @@ -569,6 +797,8 @@ "Type", "UndrainableNodeBehavior", "UpgradeChannel", + "UpgradeStrategy", + "VmState", "WeekDay", "WorkloadRuntime", ] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py index 705ff33e6f8d..40a0994e347e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py @@ -25,6 +25,16 @@ class AccelerationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Disable acceleration options.""" +class AddonAutoscaling(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether VPA add-on is enabled and configured to scale AKS-managed add-ons.""" + + ENABLED = "Enabled" + """Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial + mode.""" + DISABLED = "Disabled" + """Feature to autoscale AKS-managed add-ons is disabled.""" + + class AdoptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Action if Kubernetes namespace with same name already exists.""" @@ -71,6 +81,37 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): GATEWAY = "Gateway" """Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see `https://aka.ms/aks/static-egress-gateway `_.""" + MANAGED_SYSTEM = "ManagedSystem" + """ManagedSystem is a system pool managed by AKS. The pool scales dynamically according to cluster + usage, and has additional automated monitoring and healing capabilities. There can only be one + ManagedSystem pool, and it is recommended to delete all other system pools for the best + experience.""" + MACHINES = "Machines" + """Machines agent pools are dedicated to hosting machines. Only limited operations, such as + creation and deletion, are allowed at the pool level. Please use the machine APIs to manage the + full machine lifecycle.""" + + +class AgentPoolNetworkInterfaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of network interface to be provisioned on each virtual machine instance. For more + information, see `https://aka.ms/aks/multi-nic `_. + """ + + STANDARD = "Standard" + """A standard network interface programmed with an IP from a specified VNet subnet. Must be used + with ``vnetSubnetId`` set in the AgentPoolNetworkInterface. IP address family + (IPv4/IPv6/Dual-stack) is determined by the subnet.""" + DYNAMIC = "Dynamic" + """A secondary network interface created without IP configuration or subnet attachment. The + interface is provisioned in an uninitialized state and the subnet is attached during workload + creation. ``vnetSubnetId`` must be set to an empty string (``""``) or omitted.""" + + +class AgentPoolNICPublicIPAddressVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IP version of the public IP allocated for a secondary NIC. ``IPv4`` is the only accepted value.""" + + I_PV4 = "IPv4" + """The public IP allocated for the NIC will be IPv4.""" class AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -94,6 +135,35 @@ class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Use of this is strongly discouraged.""" VIRTUAL_MACHINES = "VirtualMachines" """Create an Agent Pool backed by a Single Instance VM orchestration mode.""" + FLEX_NODES = "FlexNodes" + """Create an Agent Pool for BYO machines running the FlexNode agent.""" + + +class AlertConfigurationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The mode of the alert configuration.""" + + DISABLED = "Disabled" + """Alerts are disabled.""" + MANAGED = "Managed" + """AKS manages the alerts lifecycle including creation, updates, and deletion. Users receive + alerts through the configured notification channel.""" + + +class AlertConfigurationProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state of the alert configuration.""" + + SUCCEEDED = "Succeeded" + """Resource has been created.""" + FAILED = "Failed" + """Resource creation failed.""" + CANCELED = "Canceled" + """Resource creation was canceled.""" + CREATING = "Creating" + """The alert configuration is being created.""" + UPDATING = "Updating" + """The alert configuration is being updated.""" + DELETING = "Deleting" + """The alert configuration is being deleted.""" class ArtifactSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -116,6 +186,36 @@ class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the managed inbound Load Balancer BackendPool. `https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend `_.""" + POD_IP = "PodIP" + """The type of the managed inbound Load Balancer BackendPool. Used only when loadBalancerSku is + specified as 'service'. + `https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend + `_.""" + + +class BastionSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The SKU of the managed Azure Bastion. The default is 'Standard'. See + `https://aka.ms/aks/BastionSKUs `_ for more information about + the differences between Azure Bastion SKUs. + """ + + STANDARD = "Standard" + """Use the standard SKU of Azure Bastion.""" + PREMIUM = "Premium" + """Use the premium SKU of Azure Bastion.""" + + +class ClusterServiceLoadBalancerHealthProbeMode( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """The health probing behavior for External Traffic Policy Cluster services.""" + + SERVICE_NODE_PORT = "ServiceNodePort" + """Each External Traffic Policy Cluster service will have its own health probe targeting service + nodePort.""" + SHARED = "Shared" + """All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated + health probe targeting the backend nodes' kube-proxy health check port 10256.""" class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -153,6 +253,22 @@ class ContainerNetworkLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Azure monitor ingestion of container network logs is enabled.""" +class ControlPlaneScalingSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable + Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased + performance guarantees. See `https://aka.ms/aks/hyperscale `_ + for performance metrics details for each size. + """ + + H2 = "H2" + """H2 is the smallest scaling size with guaranteed capacity and predictable performance beyond + standard tier defaults.""" + H4 = "H4" + """H4 scaling size provides increased guaranteed performance over H2.""" + H8 = "H8" + """H8 scaling size provides increased guaranteed performance over H4.""" + + class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of entity that created the resource.""" @@ -185,6 +301,32 @@ class DRANETMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """DRANET is managed by AKS.""" +class DriftAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The drift action of the machine. Indicates whether a machine has deviated from its expected + state due to changes in managed cluster properties, requiring corrective action. + """ + + SYNCED = "Synced" + """The machine is up to date.""" + RECREATE = "Recreate" + """The machine has drifted and needs to be deleted and recreated.""" + + +class DriverType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify the type of GPU driver to install when creating Windows agent pools. If not provided, + AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool + has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is + selected based on system compatibility. + """ + + GRID = "GRID" + """Install the GRID driver for the GPU, suitable for applications requiring virtualization + support.""" + CUDA = "CUDA" + """Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing + and data-intensive applications.""" + + class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The expander to use when scaling up. If not specified, the default is 'random'. See `expanders `_ @@ -259,6 +401,16 @@ class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """MIG 7g GPU instance profile.""" +class GuardrailsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether the version is preview or stable.""" + + PREVIEW = "Preview" + """The version is preview. It is not recommended to use preview versions on critical production + clusters. The preview version may not support all use-cases.""" + STABLE = "Stable" + """The version is stable and can be used on critical production clusters.""" + + class IdentityBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The provisioning state of the last accepted operation.""" @@ -276,6 +428,23 @@ class IdentityBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumM """The identity binding is being deleted.""" +class InfrastructureEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. + More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. + """ + + ENABLED = "Enabled" + """Encryption at rest of Kubernetes resource objects using service-managed keys is enabled. More + information on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_.""" + DISABLED = "Disabled" + """Encryption at rest of Kubernetes resource objects using service-managed keys is disabled. More + information on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_.""" + + class IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): """To determine if address belongs IPv4 or IPv6 family.""" @@ -285,6 +454,18 @@ class IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): """IPv6 family.""" +class IpvsScheduler(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """IPVS scheduler, for more information please see + `http://www.linuxvirtualserver.org/docs/scheduling.html + `_. + """ + + ROUND_ROBIN = "RoundRobin" + """Round Robin.""" + LEAST_CONNECTION = "LeastConnection" + """Least Connection.""" + + class IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Mode of an ingress gateway.""" @@ -294,6 +475,23 @@ class IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The ingress gateway is assigned an internal IP address and cannot is accessed publicly.""" +class JWTAuthenticatorProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provisioning state of the last accepted operation.""" + + SUCCEEDED = "Succeeded" + """Resource has been created.""" + FAILED = "Failed" + """Resource creation failed.""" + CANCELED = "Canceled" + """Resource creation was canceled.""" + CREATING = "Creating" + """The JWT authenticator is being created.""" + UPDATING = "Updating" + """The JWT authenticator is being updated.""" + DELETING = "Deleting" + """The JWT authenticator is being deleted.""" + + class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network access of the key vault. Network access of key vault. The possible values are ``Public`` and ``Private``. ``Public`` means the key vault allows public access from all @@ -346,6 +544,11 @@ class LoadBalancerSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): about the differences between load balancer SKUs. """ + SERVICE = "service" + """Use a service Load Balancer, with native pod-level load balancing. This SKU is specifically + built to scale for container-based workloads, with a single instance utilized for each + application. For more information, see `https://aka.ms/aks/container-native-slb + `_.""" STANDARD = "standard" """Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information about on working with the load balancer in the managed cluster, see the `standard Load Balancer @@ -510,6 +713,61 @@ class ManagedGatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): bundle will be installed for your Kubernetes version.""" +class ManagementMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Managed GPU experience installs additional components, such as the Data Center GPU Manager + (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is + installed, check out aka.ms/aks/managed-gpu. + """ + + UNMANAGED = "Unmanaged" + """Managed GPU experience is disabled for NVIDIA GPUs.""" + MANAGED = "Managed" + """Managed GPU experience is enabled for NVIDIA GPUs.""" + + +class MeshMembershipProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provisioning state of the last accepted operation.""" + + CANCELED = "Canceled" + """Resource creation was canceled.""" + CREATING = "Creating" + """The Mesh Membership is being created.""" + DELETING = "Deleting" + """The Mesh Membership is being deleted.""" + FAILED = "Failed" + """Resource creation failed.""" + SUCCEEDED = "Succeeded" + """Resource has been created.""" + UPDATING = "Updating" + """The Mesh Membership is being updated.""" + + +class MigStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more + information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + the default is None. + """ + + NONE = "None" + """Don't set a MIG strategy. If you previously had one set, this will override it and set remove + the set MIG strategy.""" + SINGLE = "Single" + """Set the MIG strategy for managed MIG as single.""" + MIXED = "Mixed" + """Set the MIG strategy for managed MIG as mixed.""" + + +class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES').""" + + IPTABLES = "IPTABLES" + """IPTables proxy mode.""" + IPVS = "IPVS" + """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" + NFTABLES = "NFTABLES" + """NFTables proxy mode. Must be using Kubernetes version >= 1.33.""" + + class NamespaceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The current provisioning state of the namespace.""" @@ -613,6 +871,29 @@ class NginxIngressControllerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): desired.""" +class NodeDisruptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The policy configuration for when to allow certain operations which require node re-image and + trigger redeployment. For example, some operations, such as updating the + .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing + managed cluster, trigger rolling updates of the nodes. This setting allows control over when + such updates are accepted. The default is 'Allow'. For a full list of covered operations see + aka.ms/aks/nodedisruptionpolicy". + """ + + ALLOW = "Allow" + """Allows operations that will require node re-image and trigger redeployment.""" + ALLOW_DURING_MAINTENANCE_WINDOW = "AllowDuringMaintenanceWindow" + """Blocks certain operations that will require node re-image and trigger redeployment unless + within the aksManagedNodeOSUpgradeSchedule maintenance window. For a full list of covered + operations see aka.ms/aks/nodedisruptionpolicy . For more information on using the + aksManagedNodeOSUpgradeSchedule maintenance window, please see + `https://learn.microsoft.com/azure/aks/planned-maintenance?tabs=azure-cli + `_.""" + BLOCK = "Block" + """Blocks certain operations that will require node re-image and trigger redeployment. For a full + list of covered operations see aka.ms/aks/nodedisruptionpolicy.""" + + class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. @@ -669,6 +950,30 @@ class NodeProvisioningMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): (See aka.ms/aks/nap for more details).""" +class NvidiaDriverMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """NVIDIA GPU resource allocation mode.""" + + DEVICE_PLUGIN = "DevicePlugin" + """NVIDIA Kubernetes device plugin is installed on the nodes for resource allocation and + scheduling.""" + DRA = "DRA" + """NVIDIA Device Resource Allocation (DRA) driver is installed on the nodes for resource + allocation and scheduling.""" + + +class Operator(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """operator represents a key's relationship to a set of values. Valid operators are In and NotIn.""" + + IN = "In" + """The value of the key should be in the given list.""" + NOT_IN = "NotIn" + """The value of the key should not be in the given list.""" + EXISTS = "Exists" + """The value of the key should exist.""" + DOES_NOT_EXIST = "DoesNotExist" + """The value of the key should not exist.""" + + class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults @@ -704,6 +1009,13 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): information. For limitations, visit `https://aka.ms/aks/node-images `_. For OS migration guidance, see `https://aka.ms/aks/upgrade-os-version `_.""" + MARINER = "Mariner" + """Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead.""" + FLATCAR = "Flatcar" + """Use Flatcar Container Linux as the OS for node images. Flatcar is a container-optimized, + security-focused Linux OS, with an immutable filesystem and part of the Cloud Native Computing + Foundation (CNCF). For more information about Flatcar Container Linux for AKS, see + aka.ms/aks/flatcar-container-linux-for-aks.""" CBL_MARINER = "CBLMariner" """Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead.""" WINDOWS2019 = "Windows2019" @@ -720,6 +1032,11 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Use Windows2025 as the OS for node images. Unsupported for system node pools. Windows2025 supports Windows2022 and Windows 2025 containers; it cannot run Windows2019 containers and vice versa.""" + WINDOWS_ANNUAL = "WindowsAnnual" + """Use Windows Annual Channel version as the OS for node images. Unsupported for system node + pools. Details about supported container images and kubernetes versions under different AKS + Annual Channel versions could be seen in `https://aka.ms/aks/windows-annual-channel-details + `_.""" UBUNTU2404 = "Ubuntu2404" """Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see see @@ -731,6 +1048,10 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): proven container-first, immutable design, while adding Azure Linux packages, servicing, and deep integration with the Azure and AKS lifecycle. For more information, see `https://aka.ms/azurecontainerlinux `_.""" + UBUNTU2604 = "Ubuntu2604" + """Use Ubuntu2604 as the OS for node images. For limitations and supported Kubernetes versions, + see `https://aka.ms/aks/supported-ubuntu-versions + `_.""" class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -787,6 +1108,18 @@ class PodIPAllocationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): is better suited to scale with larger subnets of /15 or bigger.""" +class PodLinkLocalAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for + pods with hostNetwork=false. If not specified, the default is 'IMDS'. + """ + + IMDS = "IMDS" + """Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without + restriction.""" + NONE = "None" + """Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS).""" + + class PolicyRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Enum representing different network policy rules.""" @@ -841,6 +1174,8 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" + SECURED_BY_PERIMETER = "SecuredByPerimeter" + """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -860,6 +1195,46 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" +class ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provisioning state of a resource type.""" + + SUCCEEDED = "Succeeded" + """Resource has been created.""" + FAILED = "Failed" + """Resource creation failed.""" + CANCELED = "Canceled" + """Resource creation was canceled.""" + + +class ResourceSkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The scale type applicable to the sku.""" + + AUTOMATIC = "Automatic" + """Automatic scaling.""" + MANUAL = "Manual" + """Manual scaling.""" + NONE = "None" + """No scaling.""" + + +class ResourceSkuRestrictionsReasonCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The reason for restriction.""" + + QUOTA_ID = "QuotaId" + """Quota ID restriction.""" + NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + """Not available for subscription.""" + + +class ResourceSkuRestrictionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of restrictions.""" + + LOCATION = "Location" + """Location restriction.""" + ZONE = "Zone" + """Zone restriction.""" + + class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. @@ -871,6 +1246,16 @@ class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Only \\*\\/read RBAC permissions allowed on the managed node resource group.""" +class SafeguardsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether the version is preview or stable.""" + + PREVIEW = "Preview" + """The version is preview. It is not recommended to use preview versions on critical production + clusters. The preview version may not support all use-cases.""" + STABLE = "Stable" + """The version is stable and can be used on critical production clusters.""" + + class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes how VMs are added to or removed from Agent Pools. See `billing states `_. @@ -917,6 +1302,18 @@ class SchedulerConfigMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): aka.ms/aks/scheduler-crd for details.""" +class SeccompDefault(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' + will be used by default. + """ + + UNCONFINED = "Unconfined" + """No seccomp profile is applied, allowing all system calls.""" + RUNTIME_DEFAULT = "RuntimeDefault" + """The default seccomp profile for container runtime is applied, which restricts certain system + calls for enhanced security.""" + + class ServiceMeshMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Mode of the service mesh.""" @@ -931,6 +1328,8 @@ class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): NODE_POOL = "NodePool" """The snapshot is a snapshot of a node pool.""" + MANAGED_CLUSTER = "ManagedCluster" + """The snapshot is a snapshot of a managed cluster.""" class TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -943,6 +1342,9 @@ class TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `https://docs.cilium.io/en/latest/security/network/encryption-wireguard/ `_ on use cases and implementation details.""" + M_TLS = "mTLS" + """Enables mTLS authentication and encryption for pod-to-pod traffic within the cluster. Refer to + `https://aka.ms/acnsciliummtls `_ for relevant documentation.""" NONE = "None" """Disable Transit encryption.""" @@ -1031,6 +1433,25 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" +class UpgradeStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Defines the upgrade strategy for the agent pool. The default is Rolling.""" + + ROLLING = "Rolling" + """Specifies that the agent pool will conduct rolling upgrade. This is the default upgrade + strategy.""" + BLUE_GREEN = "BlueGreen" + """Specifies that the agent pool will conduct blue-green upgrade.""" + + +class VmState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Virtual machine state. Indicates the current state of the underlying virtual machine.""" + + RUNNING = "Running" + """The virtual machine is currently running.""" + DELETED = "Deleted" + """The virtual machine has been deleted by the user or due to spot eviction.""" + + class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The weekday enum.""" @@ -1057,6 +1478,11 @@ class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Nodes will use Kubelet to run standard OCI container workloads.""" WASM_WASI = "WasmWasi" """Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).""" + KATA_MSHV_VM_ISOLATION = "KataMshvVmIsolation" + """Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due + to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can + only be used with VM series that support Nested Virtualization such as Dv3 series. This naming + convention will be deprecated in future releases in favor of KataVmIsolation.""" KATA_VM_ISOLATION = "KataVmIsolation" """Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py index 5f5deddd7c2d..01b4afdf47ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py @@ -275,8 +275,8 @@ class AdvancedNetworkingSecurityTransitEncryption( managed pods will be encrypted when it leaves the node boundary. :ivar type: Configures pod-to-pod encryption. This can be enabled only on Cilium-based - clusters. If not specified, the default value is None. Known values are: "WireGuard" and - "None". + clusters. If not specified, the default value is None. Known values are: "WireGuard", "mTLS", + and "None". :vartype type: str or ~azure.mgmt.containerservice.models.TransitEncryptionType """ @@ -284,7 +284,7 @@ class AdvancedNetworkingSecurityTransitEncryption( visibility=["read", "create", "update", "delete", "query"] ) """Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not - specified, the default value is None. Known values are: \"WireGuard\" and \"None\".""" + specified, the default value is None. Known values are: \"WireGuard\", \"mTLS\", and \"None\".""" @overload def __init__( @@ -398,7 +398,10 @@ class AgentPool(ProxyResource): # pylint: disable=docstring-keyword-should-matc "orchestrator_version", "current_orchestrator_version", "node_image_version", + "upgrade_strategy", + "enable_os_disk_full_caching", "upgrade_settings", + "upgrade_settings_blue_green", "provisioning_state", "power_state", "availability_zones", @@ -410,6 +413,7 @@ class AgentPool(ProxyResource): # pylint: disable=docstring-keyword-should-matc "tags", "node_labels", "node_taints", + "node_initialization_taints", "proximity_placement_group_id", "kubelet_config", "linux_os_config", @@ -430,6 +434,7 @@ class AgentPool(ProxyResource): # pylint: disable=docstring-keyword-should-matc "virtual_machine_nodes_status", "status", "local_dns_profile", + "prepared_image_specification_profile", ] @overload @@ -637,6 +642,83 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class AgentPoolBlueGreenUpgradeSettings(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Settings for blue-green upgrade on an agentpool. + + :ivar drain_batch_size: The number or percentage of nodes to drain in batch during blue-green + upgrade. Must be a non-zero number. This can either be set to an integer (e.g. '5') or a + percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total number + of blue nodes of the initial upgrade operation. For percentages, fractional nodes are rounded + up. If not specified, the default is 10%. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_. + :vartype drain_batch_size: str + :ivar drain_timeout_in_minutes: The drain timeout for a node, i.e., the amount of time (in + minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time + honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not + specified, the default is 30 minutes. + :vartype drain_timeout_in_minutes: int + :ivar batch_soak_duration_in_minutes: The soak duration after draining a batch of nodes, i.e., + the amount of time (in minutes) to wait after draining a batch of nodes before moving on the + next batch. If not specified, the default is 15 minutes. + :vartype batch_soak_duration_in_minutes: int + :ivar final_soak_duration_in_minutes: The soak duration for a node pool, i.e., the amount of + time (in minutes) to wait after all old nodes are drained before we remove the old nodes. If + not specified, the default is 60 minutes. Only applicable for blue-green upgrade strategy. + :vartype final_soak_duration_in_minutes: int + """ + + drain_batch_size: Optional[str] = rest_field( + name="drainBatchSize", visibility=["read", "create", "update", "delete", "query"] + ) + """The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a + non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total number of blue nodes of the + initial upgrade operation. For percentages, fractional nodes are rounded up. If not specified, + the default is 10%. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_.""" + drain_timeout_in_minutes: Optional[int] = rest_field( + name="drainTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods + and graceful termination per node. This eviction wait time honors waiting on pod disruption + budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 + minutes.""" + batch_soak_duration_in_minutes: Optional[int] = rest_field( + name="batchSoakDurationInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to + wait after draining a batch of nodes before moving on the next batch. If not specified, the + default is 15 minutes.""" + final_soak_duration_in_minutes: Optional[int] = rest_field( + name="finalSoakDurationInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old + nodes are drained before we remove the old nodes. If not specified, the default is 60 minutes. + Only applicable for blue-green upgrade strategy.""" + + @overload + def __init__( + self, + *, + drain_batch_size: Optional[str] = None, + drain_timeout_in_minutes: Optional[int] = None, + batch_soak_duration_in_minutes: Optional[int] = None, + final_soak_duration_in_minutes: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class AgentPoolDeleteMachinesParameter(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Specifies a list of machine names from the agent pool to be deleted. @@ -741,7 +823,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -770,9 +852,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( :vartype os_type: str or ~azure.mgmt.containerservice.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -785,13 +867,13 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( are: "Delete" and "Deallocate". :vartype scale_down_mode: str or ~azure.mgmt.containerservice.models.ScaleDownMode :ivar type_properties_type: The type of Agent Pool. Known values are: - "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". + "VirtualMachineScaleSets", "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type_properties_type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -812,8 +894,19 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( :ivar node_image_version: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype node_image_version: str + :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is + Rolling. Known values are: "Rolling" and "BlueGreen". + :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy + :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. + When this feature is enabled, the entire operating system will be locally cached on the + ephemeral OS disk, preventing E17 events caused by network failures. + :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings + :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies + when upgrade strategy is set to BlueGreen. + :vartype upgrade_settings_blue_green: + ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -858,6 +951,14 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( :ivar node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype node_taints: list[str] + :ivar node_initialization_taints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype node_initialization_taints: list[str] :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -921,6 +1022,10 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile + :ivar prepared_image_specification_profile: Settings to determine the prepared image + specification used to provision nodes in a pool. + :vartype prepared_image_specification_profile: + ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile """ e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) @@ -959,7 +1064,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] ) """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", and \"KataVmIsolation\".""" + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" message_of_the_day: Optional[str] = rest_field( name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] ) @@ -997,9 +1102,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( ) """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) """The maximum number of nodes for auto-scaling.""" min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) @@ -1017,8 +1122,8 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = rest_field( name="type", visibility=["read", "create", "update", "delete", "query"] ) - """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", and - \"VirtualMachines\".""" + """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", + \"VirtualMachines\", and \"FlexNodes\".""" mode: Optional[Union[str, "_models.AgentPoolMode"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -1026,7 +1131,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", and \"Gateway\".""" + \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" orchestrator_version: Optional[str] = rest_field( name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] ) @@ -1050,10 +1155,26 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( ) """The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed.""" + upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = rest_field( + name="upgradeStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: + \"Rolling\" and \"BlueGreen\".""" + enable_os_disk_full_caching: Optional[bool] = rest_field( + name="enableOSDiskFullCaching", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the + entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events + caused by network failures.""" upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = rest_field( name="upgradeSettings", visibility=["read", "create", "update", "delete", "query"] ) """Settings for upgrading the agentpool.""" + upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = rest_field( + name="upgradeSettingsBlueGreen", visibility=["read", "create", "update", "delete", "query"] + ) + """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to + BlueGreen.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """The current deployment or provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field( @@ -1112,6 +1233,16 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( ) """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" + node_initialization_taints: Optional[list[str]] = rest_field( + name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] + ) + """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + after node pool is created, but nodes will not be recreated with new taints until another + operation that requires recreation (e.g. node image upgrade) happens. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" proximity_placement_group_id: Optional[str] = rest_field( name="proximityPlacementGroupID", visibility=["read", "create", "update", "delete", "query"] ) @@ -1209,6 +1340,10 @@ class AgentPoolManagedClusterAgentPoolProfileProperties( """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" + prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = rest_field( + name="preparedImageSpecificationProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Settings to determine the prepared image specification used to provision nodes in a pool.""" @overload def __init__( # pylint: disable=too-many-locals @@ -1235,7 +1370,10 @@ def __init__( # pylint: disable=too-many-locals mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, node_image_version: Optional[str] = None, + upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, + enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -1246,6 +1384,7 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[dict[str, str]] = None, node_labels: Optional[dict[str, str]] = None, node_taints: Optional[list[str]] = None, + node_initialization_taints: Optional[list[str]] = None, proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, @@ -1266,6 +1405,79 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, + prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AgentPoolNetworkInterface(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Configuration of a secondary network interface provisioned on each VM instance in the agent + pool. For more information, see `https://aka.ms/aks/multi-nic `_. + + :ivar type: Type of NIC to be provisioned on the VM. Known values are: "Standard" and + "Dynamic". + :vartype type: str or ~azure.mgmt.containerservice.models.AgentPoolNetworkInterfaceType + :ivar vnet_subnet_id: The resource ID of the subnet which will be attached to the secondary + network interface. Required when ``type`` is ``Standard``; must be an empty string (``""``) or + omitted when ``type`` is ``Dynamic``. + :vartype vnet_subnet_id: str + :ivar enable_accelerated_networking: Whether accelerated networking is enabled on this + secondary NIC. If omitted, this defaults to true only when the agent pool VM SKU supports + accelerated networking. Validation will fail if it is enabled on an unsupported SKU or NIC + configuration. + :vartype enable_accelerated_networking: bool + :ivar public_ip_address_configuration: Public IP configuration for this secondary NIC. Only + valid when ``type`` is ``Standard``. Set ``publicIPAddressVersion`` to provision a per-VM + instance-level public IP for the NIC, then optionally shape it with ``ipTags`` or + ``publicIPPrefixID``. If omitted, no public IP is provisioned. Idle timeout is not + configurable. For more information, see `https://aka.ms/aks/multi-nic + `_. + :vartype public_ip_address_configuration: + ~azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressConfiguration + """ + + type: Optional[Union[str, "_models.AgentPoolNetworkInterfaceType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of NIC to be provisioned on the VM. Known values are: \"Standard\" and \"Dynamic\".""" + vnet_subnet_id: Optional[str] = rest_field( + name="vnetSubnetId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the subnet which will be attached to the secondary network interface. + Required when ``type`` is ``Standard``; must be an empty string (``\"\"``) or omitted when + ``type`` is ``Dynamic``.""" + enable_accelerated_networking: Optional[bool] = rest_field( + name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether accelerated networking is enabled on this secondary NIC. If omitted, this defaults to + true only when the agent pool VM SKU supports accelerated networking. Validation will fail if + it is enabled on an unsupported SKU or NIC configuration.""" + public_ip_address_configuration: Optional["_models.AgentPoolNICPublicIPAddressConfiguration"] = rest_field( + name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Public IP configuration for this secondary NIC. Only valid when ``type`` is ``Standard``. Set + ``publicIPAddressVersion`` to provision a per-VM instance-level public IP for the NIC, then + optionally shape it with ``ipTags`` or ``publicIPPrefixID``. If omitted, no public IP is + provisioned. Idle timeout is not configurable. For more information, see + `https://aka.ms/aks/multi-nic `_.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.AgentPoolNetworkInterfaceType"]] = None, + vnet_subnet_id: Optional[str] = None, + enable_accelerated_networking: Optional[bool] = None, + public_ip_address_configuration: Optional["_models.AgentPoolNICPublicIPAddressConfiguration"] = None, ) -> None: ... @overload @@ -1284,12 +1496,30 @@ class AgentPoolNetworkProfile(_Model): # pylint: disable=docstring-keyword-shou :ivar node_public_ip_tags: IPTags of instance-level public IPs. :vartype node_public_ip_tags: list[~azure.mgmt.containerservice.models.IPTag] + :ivar node_public_ip_prefix_i_ds: The resource IDs of public IP prefixes for node public IPs. + At most one IPv4 and one IPv6 prefix may be specified. Order does not matter; the RP determines + IP version from the referenced resource's publicIPAddressVersion. Requires enableNodePublicIP + to be true on the agent pool. Mutually exclusive with the top-level nodePublicIPPrefixID + property. Immutable after node pool creation. To change prefixes, delete and recreate the node + pool. For more information, see `https://aka.ms/aks/ipv6-ilpip + `_. + :vartype node_public_ip_prefix_i_ds: list[str] :ivar allowed_host_ports: The port ranges that are allowed to access. The specified ranges are allowed to overlap. :vartype allowed_host_ports: list[~azure.mgmt.containerservice.models.PortRange] :ivar application_security_groups: The IDs of the application security groups which agent pool will associate when created. :vartype application_security_groups: list[str] + :ivar secondary_network_interfaces: Secondary network interface configurations for each VM in + the agent pool. Each entry is a template: one physical NIC per entry is provisioned on every VM + instance. These interfaces are created at agent pool creation time and are immutable. The + length of the list must be less than the NIC capacity minus 1 for the VM size of the agent pool + (AKS manages the primary NIC). For example, a Standard_D8a_v4 VM supports up to 4 NICs, so the + maximum number of secondary interfaces allowed is 3. For mixed-SKU VM pools the effective + capacity is the minimum across all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). + For more information, see `https://aka.ms/aks/multi-nic `_. + :vartype secondary_network_interfaces: + list[~azure.mgmt.containerservice.models.AgentPoolNetworkInterface] :ivar dranet: DRANET settings of an agent pool. :vartype dranet: ~azure.mgmt.containerservice.models.DRANETProfile """ @@ -1298,6 +1528,15 @@ class AgentPoolNetworkProfile(_Model): # pylint: disable=docstring-keyword-shou name="nodePublicIPTags", visibility=["read", "create", "update", "delete", "query"] ) """IPTags of instance-level public IPs.""" + node_public_ip_prefix_i_ds: Optional[list[str]] = rest_field( + name="nodePublicIPPrefixIDs", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource IDs of public IP prefixes for node public IPs. At most one IPv4 and one IPv6 + prefix may be specified. Order does not matter; the RP determines IP version from the + referenced resource's publicIPAddressVersion. Requires enableNodePublicIP to be true on the + agent pool. Mutually exclusive with the top-level nodePublicIPPrefixID property. Immutable + after node pool creation. To change prefixes, delete and recreate the node pool. For more + information, see `https://aka.ms/aks/ipv6-ilpip `_.""" allowed_host_ports: Optional[list["_models.PortRange"]] = rest_field( name="allowedHostPorts", visibility=["read", "create", "update", "delete", "query"] ) @@ -1306,6 +1545,17 @@ class AgentPoolNetworkProfile(_Model): # pylint: disable=docstring-keyword-shou name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"] ) """The IDs of the application security groups which agent pool will associate when created.""" + secondary_network_interfaces: Optional[list["_models.AgentPoolNetworkInterface"]] = rest_field( + name="secondaryNetworkInterfaces", visibility=["read", "create"] + ) + """Secondary network interface configurations for each VM in the agent pool. Each entry is a + template: one physical NIC per entry is provisioned on every VM instance. These interfaces are + created at agent pool creation time and are immutable. The length of the list must be less than + the NIC capacity minus 1 for the VM size of the agent pool (AKS manages the primary NIC). For + example, a Standard_D8a_v4 VM supports up to 4 NICs, so the maximum number of secondary + interfaces allowed is 3. For mixed-SKU VM pools the effective capacity is the minimum across + all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). For more information, see + `https://aka.ms/aks/multi-nic `_.""" dranet: Optional["_models.DRANETProfile"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """DRANET settings of an agent pool.""" @@ -1314,8 +1564,10 @@ def __init__( self, *, node_public_ip_tags: Optional[list["_models.IPTag"]] = None, + node_public_ip_prefix_i_ds: Optional[list[str]] = None, allowed_host_ports: Optional[list["_models.PortRange"]] = None, application_security_groups: Optional[list[str]] = None, + secondary_network_interfaces: Optional[list["_models.AgentPoolNetworkInterface"]] = None, dranet: Optional["_models.DRANETProfile"] = None, ) -> None: ... @@ -1330,6 +1582,63 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class AgentPoolNICPublicIPAddressConfiguration(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Public IP configuration applied to a secondary NIC on an agent pool. ``ipTags`` and + ``publicIPPrefixID`` are mutually exclusive, matching the primary NIC's behavior. For more + information, see `https://aka.ms/aks/multi-nic `_. + + :ivar public_ip_address_version: IP version of the public IP provisioned for this NIC. + Required: its presence is what enables public IP provisioning, so an empty configuration + allocates nothing. ``IPv4`` is the only accepted value. Required. "IPv4" + :vartype public_ip_address_version: str or + ~azure.mgmt.containerservice.models.AgentPoolNICPublicIPAddressVersion + :ivar ip_tags: IP tags to attach to the public IP allocated for this NIC. Each tag's + ``ipTagType`` must be ``FirstPartyUsage``, ``NetworkDomain``, or ``RoutingPreference``. + Mutually exclusive with ``publicIPPrefixID``. + :vartype ip_tags: list[~azure.mgmt.containerservice.models.IPTag] + :ivar public_ip_prefix_id: The resource ID of a public IP prefix to draw this NIC's public IP + from. Mutually exclusive with ``ipTags``. + :vartype public_ip_prefix_id: str + """ + + public_ip_address_version: Union[str, "_models.AgentPoolNICPublicIPAddressVersion"] = rest_field( + name="publicIPAddressVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """IP version of the public IP provisioned for this NIC. Required: its presence is what enables + public IP provisioning, so an empty configuration allocates nothing. ``IPv4`` is the only + accepted value. Required. \"IPv4\"""" + ip_tags: Optional[list["_models.IPTag"]] = rest_field( + name="ipTags", visibility=["read", "create", "update", "delete", "query"] + ) + """IP tags to attach to the public IP allocated for this NIC. Each tag's ``ipTagType`` must be + ``FirstPartyUsage``, ``NetworkDomain``, or ``RoutingPreference``. Mutually exclusive with + ``publicIPPrefixID``.""" + public_ip_prefix_id: Optional[str] = rest_field( + name="publicIPPrefixID", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a public IP prefix to draw this NIC's public IP from. Mutually exclusive + with ``ipTags``.""" + + @overload + def __init__( + self, + *, + public_ip_address_version: Union[str, "_models.AgentPoolNICPublicIPAddressVersion"], + ip_tags: Optional[list["_models.IPTag"]] = None, + public_ip_prefix_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class AgentPoolRecentlyUsedVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """A historical version that can be used for rollback operations. @@ -1441,6 +1750,167 @@ class AgentPoolStatus(_Model): there was no error, this field is omitted.""" +class AgentPoolUpdate(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Agent pool. + + :ivar properties: Properties for the agent pool. + :vartype properties: ~azure.mgmt.containerservice.models.AgentPoolUpdateProperties + """ + + properties: Optional["_models.AgentPoolUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties for the agent pool.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.AgentPoolUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AgentPoolUpdateManualScaleProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Specifications on number of machines. + + :ivar size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + 'Standard_E16s_v3' or 'Standard_D16s_v5'. + :vartype size: str + :ivar count: Number of nodes. + :vartype count: int + """ + + size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' + or 'Standard_D16s_v5'.""" + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Number of nodes.""" + + @overload + def __init__( + self, + *, + size: Optional[str] = None, + count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AgentPoolUpdateProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Properties for the agent pool. + + :ivar count: Number of agents (VMs) to host docker containers. + :vartype count: int + :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. + :vartype virtual_machines_profile: + ~azure.mgmt.containerservice.models.AgentPoolUpdateVirtualMachinesProfile + """ + + count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Number of agents (VMs) to host docker containers.""" + virtual_machines_profile: Optional["_models.AgentPoolUpdateVirtualMachinesProfile"] = rest_field( + name="virtualMachinesProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifications on VirtualMachines agent pool.""" + + @overload + def __init__( + self, + *, + count: Optional[int] = None, + virtual_machines_profile: Optional["_models.AgentPoolUpdateVirtualMachinesProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AgentPoolUpdateScaleProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Specifications on how to scale a VirtualMachines agent pool. + + :ivar manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + :vartype manual: list[~azure.mgmt.containerservice.models.AgentPoolUpdateManualScaleProfile] + """ + + manual: Optional[list["_models.AgentPoolUpdateManualScaleProfile"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifications on how to scale the VirtualMachines agent pool to a fixed size.""" + + @overload + def __init__( + self, + *, + manual: Optional[list["_models.AgentPoolUpdateManualScaleProfile"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AgentPoolUpdateVirtualMachinesProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Specifications on VirtualMachines agent pool. + + :ivar scale: Specifications on how to scale a VirtualMachines agent pool. + :vartype scale: ~azure.mgmt.containerservice.models.AgentPoolUpdateScaleProfile + """ + + scale: Optional["_models.AgentPoolUpdateScaleProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifications on how to scale a VirtualMachines agent pool.""" + + @overload + def __init__( + self, + *, + scale: Optional["_models.AgentPoolUpdateScaleProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class AgentPoolUpgradeProfile(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only """The list of available upgrades for an agent pool. @@ -1468,6 +1938,7 @@ class AgentPoolUpgradeProfile(ProxyResource): # pylint: disable=docstring-keywo "kubernetes_version", "os_type", "upgrades", + "components_by_releases", "recently_used_versions", "latest_node_image_version", ] @@ -1519,6 +1990,8 @@ class AgentPoolUpgradeProfileProperties(_Model): # pylint: disable=docstring-ke :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: list[~azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :ivar components_by_releases: List of components grouped by kubernetes major.minor version. + :vartype components_by_releases: list[~azure.mgmt.containerservice.models.ComponentsByRelease] :ivar recently_used_versions: List of historical good versions for rollback operations. :vartype recently_used_versions: list[~azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion] @@ -1539,6 +2012,10 @@ class AgentPoolUpgradeProfileProperties(_Model): # pylint: disable=docstring-ke visibility=["read", "create", "update", "delete", "query"] ) """List of orchestrator types and versions available for upgrade.""" + components_by_releases: Optional[list["_models.ComponentsByRelease"]] = rest_field( + name="componentsByReleases", visibility=["read", "create", "update", "delete", "query"] + ) + """List of components grouped by kubernetes major.minor version.""" recently_used_versions: Optional[list["_models.AgentPoolRecentlyUsedVersion"]] = rest_field( name="recentlyUsedVersions", visibility=["read"] ) @@ -1555,6 +2032,7 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"], upgrades: Optional[list["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, latest_node_image_version: Optional[str] = None, ) -> None: ... @@ -1578,6 +2056,8 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem( :vartype kubernetes_version: str :ivar is_preview: Whether the Kubernetes version is currently in preview. :vartype is_preview: bool + :ivar is_out_of_support: Whether the Kubernetes version is out of support. + :vartype is_out_of_support: bool """ kubernetes_version: Optional[str] = rest_field( @@ -1588,6 +2068,10 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem( name="isPreview", visibility=["read", "create", "update", "delete", "query"] ) """Whether the Kubernetes version is currently in preview.""" + is_out_of_support: Optional[bool] = rest_field( + name="isOutOfSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the Kubernetes version is out of support.""" @overload def __init__( @@ -1595,6 +2079,7 @@ def __init__( *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, + is_out_of_support: Optional[bool] = None, ) -> None: ... @overload @@ -1627,6 +2112,15 @@ class AgentPoolUpgradeSettings(_Model): # pylint: disable=docstring-keyword-sho `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_. :vartype max_unavailable: str + :ivar max_blocked_nodes: The maximum number or percentage of extra nodes that are allowed to be + blocked in the agent pool during an upgrade when undrainable node behavior is Cordon. This can + either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is + specified, it is the percentage of the total agent pool size at the time of the upgrade. For + percentages, fractional nodes are rounded up. If not specified, the default is maxSurge. This + must always be greater than or equal to maxSurge. For more information, including best + practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_. + :vartype max_blocked_nodes: str :ivar drain_timeout_in_minutes: The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not @@ -1662,6 +2156,17 @@ class AgentPoolUpgradeSettings(_Model): # pylint: disable=docstring-keyword-sho For more information, including best practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_.""" + max_blocked_nodes: Optional[str] = rest_field( + name="maxBlockedNodes", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum number or percentage of extra nodes that are allowed to be blocked in the agent + pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an + integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + percentage of the total agent pool size at the time of the upgrade. For percentages, fractional + nodes are rounded up. If not specified, the default is maxSurge. This must always be greater + than or equal to maxSurge. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_.""" drain_timeout_in_minutes: Optional[int] = rest_field( name="drainTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] ) @@ -1688,6 +2193,7 @@ def __init__( *, max_surge: Optional[str] = None, max_unavailable: Optional[str] = None, + max_blocked_nodes: Optional[str] = None, drain_timeout_in_minutes: Optional[int] = None, node_soak_duration_in_minutes: Optional[int] = None, undrainable_node_behavior: Optional[Union[str, "_models.UndrainableNodeBehavior"]] = None, @@ -1738,21 +2244,188 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AutoScaleProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Specifications on auto-scaling. +class AlertConfiguration(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """Alert configuration for a managed cluster. Allows configuring AKS-managed alerts that notify + users of important cluster events and conditions. - :ivar size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - 'Standard_E16s_v3' or 'Standard_D16s_v5'. - :vartype size: str - :ivar min_count: The minimum number of nodes of the specified sizes. - :vartype min_count: int - :ivar max_count: The maximum number of nodes of the specified sizes. - :vartype max_count: int + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.containerservice.models.AlertConfigurationProperties """ - size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' - or 'Standard_D16s_v5'.""" + properties: Optional["_models.AlertConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.AlertConfigurationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AlertConfigurationProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Properties of the alert configuration. + + :ivar mode: The mode of the alert configuration. Specifies how AKS manages the alerts. + Required. Known values are: "Disabled" and "Managed". + :vartype mode: str or ~azure.mgmt.containerservice.models.AlertConfigurationMode + :ivar notification: Notification settings for the alert configuration. Required. + :vartype notification: ~azure.mgmt.containerservice.models.AlertNotification + :ivar provisioning_state: The current provisioning state of the alert configuration. Known + values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.models.AlertConfigurationProvisioningState + """ + + mode: Union[str, "_models.AlertConfigurationMode"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The mode of the alert configuration. Specifies how AKS manages the alerts. Required. Known + values are: \"Disabled\" and \"Managed\".""" + notification: "_models.AlertNotification" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Notification settings for the alert configuration. Required.""" + provisioning_state: Optional[Union[str, "_models.AlertConfigurationProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The current provisioning state of the alert configuration. Known values are: \"Succeeded\", + \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + + @overload + def __init__( + self, + *, + mode: Union[str, "_models.AlertConfigurationMode"], + notification: "_models.AlertNotification", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AlertNotification(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Notification settings for the alert configuration. + + :ivar action_group_id: The resource ID of the Azure Monitor action group to send notifications + to. Required. + :vartype action_group_id: str + """ + + action_group_id: str = rest_field(name="actionGroupId", visibility=["read", "create", "update", "delete", "query"]) + """The resource ID of the Azure Monitor action group to send notifications to. Required.""" + + @overload + def __init__( + self, + *, + action_group_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AllowedSubject(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """A subject authorized to use the identity binding for token exchange. The namespace selector is + required and must be non-empty. The service account selector is optional; when omitted, all + service accounts in matching namespaces are authorized. Selectors within a single + AllowedSubject are AND'd; multiple AllowedSubjects on an IdentityBinding are OR'd. + + :ivar namespace_selector: Label selector matching the namespaces in which this identity may be + used. Must be non-empty: an empty selector would match every namespace and is rejected to + prevent overly permissive bindings. Use the built-in ``kubernetes.io/metadata.name`` label to + target specific namespaces by name. Required. + :vartype namespace_selector: ~azure.mgmt.containerservice.models.LabelSelector + :ivar service_account_selector: Optional label selector matching the service accounts (within + the namespaces matched by ``namespaceSelector``) that may use this identity. When omitted, all + service accounts in matching namespaces are authorized. When provided, it must be non-empty. + :vartype service_account_selector: ~azure.mgmt.containerservice.models.LabelSelector + """ + + namespace_selector: "_models.LabelSelector" = rest_field( + name="namespaceSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Label selector matching the namespaces in which this identity may be used. Must be non-empty: + an empty selector would match every namespace and is rejected to prevent overly permissive + bindings. Use the built-in ``kubernetes.io/metadata.name`` label to target specific namespaces + by name. Required.""" + service_account_selector: Optional["_models.LabelSelector"] = rest_field( + name="serviceAccountSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional label selector matching the service accounts (within the namespaces matched by + ``namespaceSelector``) that may use this identity. When omitted, all service accounts in + matching namespaces are authorized. When provided, it must be non-empty.""" + + @overload + def __init__( + self, + *, + namespace_selector: "_models.LabelSelector", + service_account_selector: Optional["_models.LabelSelector"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AutoScaleProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Specifications on auto-scaling. + + :ivar size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + 'Standard_E16s_v3' or 'Standard_D16s_v5'. + :vartype size: str + :ivar min_count: The minimum number of nodes of the specified sizes. + :vartype min_count: int + :ivar max_count: The maximum number of nodes of the specified sizes. + :vartype max_count: int + """ + + size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' + or 'Standard_D16s_v5'.""" min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) """The minimum number of nodes of the specified sizes.""" max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) @@ -1844,6 +2517,279 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class BastionProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Profile to enable managed Azure Bastion or reference to an existing Bastion for the managed + cluster. See `https://aka.ms/aks/BastionConnect `_ for more + details. + + :ivar enabled: Indicates whether managed bastion is enabled. + :vartype enabled: bool + :ivar bastion_id: The resource ID of the managed bastion associated with the managed cluster. + :vartype bastion_id: str + :ivar sku: The SKU of the managed bastion. + + Only Standard and Premium SKUs are supported. + SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed + bastion with new SKU. + + See `https://aka.ms/aks/BastionSKUs `_ for more details. Known + values are: "Standard" and "Premium". + :vartype sku: str or ~azure.mgmt.containerservice.models.BastionSku + :ivar scale_units: The scale units of the managed bastion. Default value is 2. + :vartype scale_units: int + :ivar public_ip_address_id: The resource ID of the public IP address associated with the + managed bastion. + + When provided during creation, the managed bastion will reference this existing public IP + address instead of creating a new one. + The referenced public IP address must be in the same subscription and region as the managed + cluster. + + When not provided during creation, AKS will automatically create a new public IP address. + + This field cannot be updated. To change IP address after creation, please disable and re-enable + the managed bastion with the new public IP address. + :vartype public_ip_address_id: str + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Indicates whether managed bastion is enabled.""" + bastion_id: Optional[str] = rest_field(name="bastionId", visibility=["read"]) + """The resource ID of the managed bastion associated with the managed cluster.""" + sku: Optional[Union[str, "_models.BastionSku"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The SKU of the managed bastion. + + Only Standard and Premium SKUs are supported. + SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed + bastion with new SKU. + + See `https://aka.ms/aks/BastionSKUs `_ for more details. Known + values are: \"Standard\" and \"Premium\".""" + scale_units: Optional[int] = rest_field( + name="scaleUnits", visibility=["read", "create", "update", "delete", "query"] + ) + """The scale units of the managed bastion. Default value is 2.""" + public_ip_address_id: Optional[str] = rest_field(name="publicIpAddressId", visibility=["read", "create"]) + """The resource ID of the public IP address associated with the managed bastion. + + When provided during creation, the managed bastion will reference this existing public IP + address instead of creating a new one. + The referenced public IP address must be in the same subscription and region as the managed + cluster. + + When not provided during creation, AKS will automatically create a new public IP address. + + This field cannot be updated. To change IP address after creation, please disable and re-enable + the managed bastion with the new public IP address.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + sku: Optional[Union[str, "_models.BastionSku"]] = None, + scale_units: Optional[int] = None, + public_ip_address_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class BootstrapAzureConfig(_Model): + """Azure configuration returned as part of FlexNode bootstrap data. + + :ivar resource_manager_endpoint: Azure Resource Manager endpoint for the cloud environment. + :vartype resource_manager_endpoint: str + :ivar target_cluster: Target cluster identity. + :vartype target_cluster: ~azure.mgmt.containerservice.models.BootstrapTargetCluster + :ivar target_agent_pool_name: Target agent pool name. + :vartype target_agent_pool_name: str + :ivar bootstrap_token: Bootstrap token for node enrollment. Do not cache or log. + :vartype bootstrap_token: ~azure.mgmt.containerservice.models.BootstrapTokenInfo + """ + + resource_manager_endpoint: Optional[str] = rest_field(name="resourceManagerEndpoint", visibility=["read"]) + """Azure Resource Manager endpoint for the cloud environment.""" + target_cluster: Optional["_models.BootstrapTargetCluster"] = rest_field(name="targetCluster", visibility=["read"]) + """Target cluster identity.""" + target_agent_pool_name: Optional[str] = rest_field(name="targetAgentPoolName", visibility=["read"]) + """Target agent pool name.""" + bootstrap_token: Optional["_models.BootstrapTokenInfo"] = rest_field(name="bootstrapToken", visibility=["read"]) + """Bootstrap token for node enrollment. Do not cache or log.""" + + +class BootstrapComponentVersions(_Model): + """Component versions returned as part of FlexNode bootstrap data. + + :ivar kubernetes: Kubernetes version. + :vartype kubernetes: str + :ivar containerd: Containerd version. + :vartype containerd: str + :ivar runc: Runc version. + :vartype runc: str + """ + + kubernetes: Optional[str] = rest_field(visibility=["read"]) + """Kubernetes version.""" + containerd: Optional[str] = rest_field(visibility=["read"]) + """Containerd version.""" + runc: Optional[str] = rest_field(visibility=["read"]) + """Runc version.""" + + +class BootstrapKubeletConfig(_Model): + """Kubelet configuration returned as part of FlexNode bootstrap data. + + :ivar cluster_fqdn: FQDN of the Kubernetes API server. + :vartype cluster_fqdn: str + :ivar ca_cert_data: Base64-encoded PEM certificate of the cluster CA. Do not cache or log. + :vartype ca_cert_data: str + """ + + cluster_fqdn: Optional[str] = rest_field(name="clusterFQDN", visibility=["read"]) + """FQDN of the Kubernetes API server.""" + ca_cert_data: Optional[str] = rest_field(name="caCertData", visibility=["read"]) + """Base64-encoded PEM certificate of the cluster CA. Do not cache or log.""" + + +class BootstrapNetworkingConfig(_Model): + """Network configuration returned as part of FlexNode bootstrap data. + + :ivar dns_service_ip: IP address of the cluster DNS service. + :vartype dns_service_ip: str + :ivar cni_version: CNI plugin version. + :vartype cni_version: str + """ + + dns_service_ip: Optional[str] = rest_field(name="dnsServiceIP", visibility=["read"]) + """IP address of the cluster DNS service.""" + cni_version: Optional[str] = rest_field(name="cniVersion", visibility=["read"]) + """CNI plugin version.""" + + +class BootstrapNodeConfig(_Model): + """Node configuration returned as part of FlexNode bootstrap data. + + :ivar max_pods: Maximum pods per node. + :vartype max_pods: int + :ivar labels: Node labels to apply during registration. + :vartype labels: dict[str, str] + :ivar taints: Node taints in the format 'key=value:effect'. + :vartype taints: list[str] + :ivar kubelet: Kubelet configuration. + :vartype kubelet: ~azure.mgmt.containerservice.models.BootstrapKubeletConfig + """ + + max_pods: Optional[int] = rest_field(name="maxPods", visibility=["read"]) + """Maximum pods per node.""" + labels: Optional[dict[str, str]] = rest_field(visibility=["read"]) + """Node labels to apply during registration.""" + taints: Optional[list[str]] = rest_field(visibility=["read"]) + """Node taints in the format 'key=value:effect'.""" + kubelet: Optional["_models.BootstrapKubeletConfig"] = rest_field(visibility=["read"]) + """Kubelet configuration.""" + + +class BootstrapTargetCluster(_Model): + """Target AKS cluster for FlexNode bootstrap. + + :ivar resource_id: Azure resource ID of the target AKS cluster. + :vartype resource_id: str + """ + + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Azure resource ID of the target AKS cluster.""" + + +class BootstrapTokenInfo(_Model): + """Bootstrap token information. + + :ivar token: Short-lived bootstrap token for kubelet. Do not cache or log. + :vartype token: str + """ + + token: Optional[str] = rest_field(visibility=["read"]) + """Short-lived bootstrap token for kubelet. Do not cache or log.""" + + +class CapacityReservation(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The Capacity Reservation to provide virtual machines from a reserved group of Machines. + + :ivar capacity_reservation_group: The Capacity Reservation Group to provide virtual machines + from a reserved group of Machines. + :vartype capacity_reservation_group: + ~azure.mgmt.containerservice.models.CapacityReservationGroup + """ + + capacity_reservation_group: Optional["_models.CapacityReservationGroup"] = rest_field( + name="capacityReservationGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines.""" + + @overload + def __init__( + self, + *, + capacity_reservation_group: Optional["_models.CapacityReservationGroup"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CapacityReservationGroup(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines. + + :ivar id: The fully qualified resource ID of the Capacity Reservation Group to provide virtual + machines from a reserved group of Machines. This is of the form: + '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + Customers use it to create a Machine with a specified CRG. For more information see `Capacity + Reservation `_. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines + from a reserved group of Machines. This is of the form: + '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + Customers use it to create a Machine with a specified CRG. For more information see `Capacity + Reservation `_.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ClusterUpgradeSettings(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Settings for upgrading a cluster. @@ -1938,28 +2884,39 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ContainerServiceLinuxProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Profile for Linux VMs in the container service cluster. +class Component(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Component information for a Kubernetes version. - :ivar admin_username: The administrator username to use for Linux VMs. Required. - :vartype admin_username: str - :ivar ssh: The SSH configuration for Linux-based VMs running on Azure. Required. - :vartype ssh: ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration + :ivar name: Component name. + :vartype name: str + :ivar version: Component version. + :vartype version: str + :ivar has_breaking_changes: If upgraded component version contains breaking changes from the + current version. To see a detailed description of what the breaking changes are, visit + `https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version + `_. + :vartype has_breaking_changes: bool """ - admin_username: str = rest_field(name="adminUsername", visibility=["read", "create", "update", "delete", "query"]) - """The administrator username to use for Linux VMs. Required.""" - ssh: "_models.ContainerServiceSshConfiguration" = rest_field( - visibility=["read", "create", "update", "delete", "query"] + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Component name.""" + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Component version.""" + has_breaking_changes: Optional[bool] = rest_field( + name="hasBreakingChanges", visibility=["read", "create", "update", "delete", "query"] ) - """The SSH configuration for Linux-based VMs running on Azure. Required.""" + """If upgraded component version contains breaking changes from the current version. To see a + detailed description of what the breaking changes are, visit + `https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version + `_.""" @overload def __init__( self, *, - admin_username: str, - ssh: "_models.ContainerServiceSshConfiguration", + name: Optional[str] = None, + version: Optional[str] = None, + has_breaking_changes: Optional[bool] = None, ) -> None: ... @overload @@ -1973,18 +2930,90 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Profile of network configuration. +class ComponentsByRelease(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """components of given Kubernetes version. - :ivar network_plugin: Network plugin used for building the Kubernetes network. Known values - are: "azure", "kubenet", and "none". - :vartype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin - :ivar network_plugin_mode: The mode the network plugin should use. "overlay" - :vartype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode - :ivar network_policy: Network policy used for building the Kubernetes network. Known values - are: "none", "calico", "azure", and "cilium". - :vartype network_policy: str or ~azure.mgmt.containerservice.models.NetworkPolicy - :ivar network_mode: The network mode Azure CNI is configured with. This cannot be specified if + :ivar kubernetes_version: The Kubernetes version (major.minor). + :vartype kubernetes_version: str + :ivar components: components of current or upgraded Kubernetes version in the cluster. + :vartype components: list[~azure.mgmt.containerservice.models.Component] + """ + + kubernetes_version: Optional[str] = rest_field( + name="kubernetesVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The Kubernetes version (major.minor).""" + components: Optional[list["_models.Component"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """components of current or upgraded Kubernetes version in the cluster.""" + + @overload + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + components: Optional[list["_models.Component"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContainerServiceLinuxProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Profile for Linux VMs in the container service cluster. + + :ivar admin_username: The administrator username to use for Linux VMs. Required. + :vartype admin_username: str + :ivar ssh: The SSH configuration for Linux-based VMs running on Azure. Required. + :vartype ssh: ~azure.mgmt.containerservice.models.ContainerServiceSshConfiguration + """ + + admin_username: str = rest_field(name="adminUsername", visibility=["read", "create", "update", "delete", "query"]) + """The administrator username to use for Linux VMs. Required.""" + ssh: "_models.ContainerServiceSshConfiguration" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The SSH configuration for Linux-based VMs running on Azure. Required.""" + + @overload + def __init__( + self, + *, + admin_username: str, + ssh: "_models.ContainerServiceSshConfiguration", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Profile of network configuration. + + :ivar network_plugin: Network plugin used for building the Kubernetes network. Known values + are: "azure", "kubenet", and "none". + :vartype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin + :ivar network_plugin_mode: The mode the network plugin should use. "overlay" + :vartype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode + :ivar network_policy: Network policy used for building the Kubernetes network. Known values + are: "none", "calico", "azure", and "cilium". + :vartype network_policy: str or ~azure.mgmt.containerservice.models.NetworkPolicy + :ivar network_mode: The network mode Azure CNI is configured with. This cannot be specified if networkPlugin is anything other than 'azure'. Known values are: "transparent" and "bridge". :vartype network_mode: str or ~azure.mgmt.containerservice.models.NetworkMode :ivar network_dataplane: Network dataplane used in the Kubernetes cluster. Known values are: @@ -2009,14 +3038,24 @@ class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keywo :ivar load_balancer_sku: The load balancer sku for the managed cluster. The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information about the - differences between load balancer SKUs. Known values are: "standard" and "basic". + differences between load balancer SKUs. Known values are: "service", "standard", and "basic". :vartype load_balancer_sku: str or ~azure.mgmt.containerservice.models.LoadBalancerSku :ivar load_balancer_profile: Profile of the cluster load balancer. :vartype load_balancer_profile: ~azure.mgmt.containerservice.models.ManagedClusterLoadBalancerProfile + :ivar bastion_profile: Profile of the Bastion Host associated with the managed cluster. See + `https://aka.ms/aks/BastionConnect `_ for more details. + :vartype bastion_profile: ~azure.mgmt.containerservice.models.BastionProfile :ivar nat_gateway_profile: Profile of the cluster NAT gateway. :vartype nat_gateway_profile: ~azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfile + :ivar nat_gateway_id: The Azure resource ID of the NAT gateway to use for egress at cluster + startup when outboundType is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool + type is podIP, and load balancer type is service SKU. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + When using managed NATGateway this field is auto populated. For more information, see + `https://aka.ms/aks/container-native-slb `_. + :vartype nat_gateway_id: str :ivar static_egress_gateway_profile: The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see `https://aka.ms/aks/static-egress-gateway `_. @@ -2035,6 +3074,17 @@ class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keywo families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. :vartype ip_families: list[str or ~azure.mgmt.containerservice.models.IPFamily] + :ivar pod_link_local_access: Defines access to special link local addresses (Azure Instance + Metadata Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is + 'IMDS'. Known values are: "IMDS" and "None". + :vartype pod_link_local_access: str or ~azure.mgmt.containerservice.models.PodLinkLocalAccess + :ivar kube_proxy_config: Holds configuration customizations for kube-proxy. Any values not + defined will use the kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'. + :vartype kube_proxy_config: + ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig """ network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = rest_field( @@ -2090,15 +3140,28 @@ class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keywo ) """The load balancer sku for the managed cluster. The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information - about the differences between load balancer SKUs. Known values are: \"standard\" and \"basic\".""" + about the differences between load balancer SKUs. Known values are: \"service\", \"standard\", + and \"basic\".""" load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = rest_field( name="loadBalancerProfile", visibility=["read", "create", "update", "delete", "query"] ) """Profile of the cluster load balancer.""" + bastion_profile: Optional["_models.BastionProfile"] = rest_field( + name="bastionProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Profile of the Bastion Host associated with the managed cluster. See + `https://aka.ms/aks/BastionConnect `_ for more details.""" nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = rest_field( name="natGatewayProfile", visibility=["read", "create", "update", "delete", "query"] ) """Profile of the cluster NAT gateway.""" + nat_gateway_id: Optional[str] = rest_field(name="natGatewayId", visibility=["read", "create"]) + """The Azure resource ID of the NAT gateway to use for egress at cluster startup when outboundType + is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool type is podIP, and load + balancer type is service SKU. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + When using managed NATGateway this field is auto populated. For more information, see + `https://aka.ms/aks/container-native-slb `_.""" static_egress_gateway_profile: Optional["_models.ManagedClusterStaticEgressGatewayProfile"] = rest_field( name="staticEgressGatewayProfile", visibility=["read", "create", "update", "delete", "query"] ) @@ -2122,6 +3185,20 @@ class ContainerServiceNetworkProfile(_Model): # pylint: disable=docstring-keywo """The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.""" + pod_link_local_access: Optional[Union[str, "_models.PodLinkLocalAccess"]] = rest_field( + name="podLinkLocalAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for + pods with hostNetwork=false. if not specified, the default is 'IMDS'. Known values are: + \"IMDS\" and \"None\".""" + kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = rest_field( + name="kubeProxyConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'.""" @overload def __init__( @@ -2139,11 +3216,130 @@ def __init__( outbound_type: Optional[Union[str, "_models.OutboundType"]] = None, load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, load_balancer_profile: Optional["_models.ManagedClusterLoadBalancerProfile"] = None, + bastion_profile: Optional["_models.BastionProfile"] = None, nat_gateway_profile: Optional["_models.ManagedClusterNATGatewayProfile"] = None, + nat_gateway_id: Optional[str] = None, static_egress_gateway_profile: Optional["_models.ManagedClusterStaticEgressGatewayProfile"] = None, pod_cidrs: Optional[list[str]] = None, service_cidrs: Optional[list[str]] = None, ip_families: Optional[list[Union[str, "_models.IPFamily"]]] = None, + pod_link_local_access: Optional[Union[str, "_models.PodLinkLocalAccess"]] = None, + kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContainerServiceNetworkProfileKubeProxyConfig( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'. + + :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + kube-proxy is enabled in AKS by default without these customizations). + :vartype enabled: bool + :ivar mode: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values + are: "IPTABLES", "IPVS", and "NFTABLES". + :vartype mode: str or ~azure.mgmt.containerservice.models.Mode + :ivar ipvs_config: Holds configuration customizations for IPVS. May only be specified if 'mode' + is set to 'IPVS'. + :vartype ipvs_config: + ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is + enabled in AKS by default without these customizations).""" + mode: Optional[Union[str, "_models.Mode"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values are: + \"IPTABLES\", \"IPVS\", and \"NFTABLES\".""" + ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = rest_field( + name="ipvsConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + mode: Optional[Union[str, "_models.Mode"]] = None, + ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + + :ivar scheduler: IPVS scheduler, for more information please see + `http://www.linuxvirtualserver.org/docs/scheduling.html + `_. Known values are: "RoundRobin" and + "LeastConnection". + :vartype scheduler: str or ~azure.mgmt.containerservice.models.IpvsScheduler + :ivar tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. Must + be a positive integer value. + :vartype tcp_timeout_seconds: int + :ivar tcp_fin_timeout_seconds: The timeout value used for IPVS TCP sessions after receiving a + FIN in seconds. Must be a positive integer value. + :vartype tcp_fin_timeout_seconds: int + :ivar udp_timeout_seconds: The timeout value used for IPVS UDP packets in seconds. Must be a + positive integer value. + :vartype udp_timeout_seconds: int + """ + + scheduler: Optional[Union[str, "_models.IpvsScheduler"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IPVS scheduler, for more information please see + `http://www.linuxvirtualserver.org/docs/scheduling.html + `_. Known values are: \"RoundRobin\" + and \"LeastConnection\".""" + tcp_timeout_seconds: Optional[int] = rest_field( + name="tcpTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value.""" + tcp_fin_timeout_seconds: Optional[int] = rest_field( + name="tcpFinTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a + positive integer value.""" + udp_timeout_seconds: Optional[int] = rest_field( + name="udpTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value.""" + + @overload + def __init__( + self, + *, + scheduler: Optional[Union[str, "_models.IpvsScheduler"]] = None, + tcp_timeout_seconds: Optional[int] = None, + tcp_fin_timeout_seconds: Optional[int] = None, + udp_timeout_seconds: Optional[int] = None, ) -> None: ... @overload @@ -2608,6 +3804,14 @@ class GPUProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyw :ivar driver: Whether to install GPU drivers. When it's not specified, default is Install. Known values are: "Install" and "None". :vartype driver: str or ~azure.mgmt.containerservice.models.GPUDriver + :ivar driver_type: Specify the type of GPU driver to install when creating Windows agent pools. + If not provided, AKS selects the driver based on system compatibility. This cannot be changed + once the AgentPool has been created. This cannot be set on Linux AgentPools. For Linux + AgentPools, the driver is selected based on system compatibility. Known values are: "GRID" and + "CUDA". + :vartype driver_type: str or ~azure.mgmt.containerservice.models.DriverType + :ivar nvidia: NVIDIA-specific GPU settings. + :vartype nvidia: ~azure.mgmt.containerservice.models.NvidiaGPUProfile """ driver: Optional[Union[str, "_models.GPUDriver"]] = rest_field( @@ -2615,12 +3819,142 @@ class GPUProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyw ) """Whether to install GPU drivers. When it's not specified, default is Install. Known values are: \"Install\" and \"None\".""" + driver_type: Optional[Union[str, "_models.DriverType"]] = rest_field( + name="driverType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify the type of GPU driver to install when creating Windows agent pools. If not provided, + AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool + has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is + selected based on system compatibility. Known values are: \"GRID\" and \"CUDA\".""" + nvidia: Optional["_models.NvidiaGPUProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """NVIDIA-specific GPU settings.""" @overload def __init__( self, *, driver: Optional[Union[str, "_models.GPUDriver"]] = None, + driver_type: Optional[Union[str, "_models.DriverType"]] = None, + nvidia: Optional["_models.NvidiaGPUProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GuardrailsAvailableVersion(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """Available Guardrails Version. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: Whether the version is default or not and support info. Required. + :vartype properties: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties + """ + + properties: "_models.GuardrailsAvailableVersionsProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the version is default or not and support info. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.GuardrailsAvailableVersionsProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GuardrailsAvailableVersionsProperties(_Model): + """Whether the version is default or not and support info. + + :ivar is_default_version: Whether this is the default version. + :vartype is_default_version: bool + :ivar support: Whether the version is preview or stable. Known values are: "Preview" and + "Stable". + :vartype support: str or ~azure.mgmt.containerservice.models.GuardrailsSupport + """ + + is_default_version: Optional[bool] = rest_field(name="isDefaultVersion", visibility=["read"]) + """Whether this is the default version.""" + support: Optional[Union[str, "_models.GuardrailsSupport"]] = rest_field(visibility=["read"]) + """Whether the version is preview or stable. Known values are: \"Preview\" and \"Stable\".""" + + +class HardEvictionThreshold(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Hard eviction thresholds for kubelet. These thresholds trigger pod eviction when node resources + drop below the specified values. Values must be greater than or equal to the documented + minimums for each signal. Supported formats are Ki, Mi, Gi, or percentages using %. + + :ivar memory_available: The threshold for available memory below which pod eviction is + triggered. Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute + values must be greater than or equal to 100Mi. Percentage values must be greater than or equal + to 2%. + :vartype memory_available: str + :ivar node_fs_available: The threshold for available node filesystem space below which pod + eviction is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). + Must be greater than or equal to the system default of 10%. + :vartype node_fs_available: str + :ivar node_fs_inodes_free: The threshold for available inodes on the node filesystem below + which pod eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage + values (e.g. '5%'). Percentage values must be greater than or equal to the system default of + 5%. + :vartype node_fs_inodes_free: str + """ + + memory_available: Optional[str] = rest_field( + name="memoryAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available memory below which pod eviction is triggered. Accepts absolute + values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute values must be greater than or + equal to 100Mi. Percentage values must be greater than or equal to 2%.""" + node_fs_available: Optional[str] = rest_field( + name="nodeFsAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available node filesystem space below which pod eviction is triggered. + Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Must be greater than or + equal to the system default of 10%.""" + node_fs_inodes_free: Optional[str] = rest_field( + name="nodeFsInodesFree", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available inodes on the node filesystem below which pod eviction is + triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). + Percentage values must be greater than or equal to the system default of 5%.""" + + @overload + def __init__( + self, + *, + memory_available: Optional[str] = None, + node_fs_available: Optional[str] = None, + node_fs_inodes_free: Optional[str] = None, ) -> None: ... @overload @@ -2748,6 +4082,12 @@ class IdentityBindingProperties(_Model): # pylint: disable=docstring-keyword-sh "Failed", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.containerservice.models.IdentityBindingProvisioningState + :ivar allowed_subjects: Optional list of subjects authorized to use this identity binding for + token exchange. Each entry pairs a required namespace label selector with an optional service + account label selector; selectors within an entry are AND'd, and multiple entries are OR'd. + When omitted or empty, authorization falls back exclusively to ClusterRole/ClusterRoleBinding + evaluation. Maximum 100 entries. + :vartype allowed_subjects: list[~azure.mgmt.containerservice.models.AllowedSubject] """ managed_identity: "_models.IdentityBindingManagedIdentityProfile" = rest_field( @@ -2763,12 +4103,21 @@ class IdentityBindingProperties(_Model): # pylint: disable=docstring-keyword-sh ) """The status of the last operation. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + allowed_subjects: Optional[list["_models.AllowedSubject"]] = rest_field( + name="allowedSubjects", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional list of subjects authorized to use this identity binding for token exchange. Each + entry pairs a required namespace label selector with an optional service account label + selector; selectors within an entry are AND'd, and multiple entries are OR'd. When omitted or + empty, authorization falls back exclusively to ClusterRole/ClusterRoleBinding evaluation. + Maximum 100 entries.""" @overload def __init__( self, *, managed_identity: "_models.IdentityBindingManagedIdentityProfile", + allowed_subjects: Optional[list["_models.AllowedSubject"]] = None, ) -> None: ... @overload @@ -3092,119 +4441,46 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubeletConfig(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Kubelet configurations of agent nodes. See `AKS custom node configuration - `_ for more details. +class JWTAuthenticator(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """Configuration for JWT authenticator in the managed cluster. - :ivar cpu_manager_policy: The CPU Manager policy to use. The default is 'none'. See `Kubernetes - CPU management policies - `_ - for more information. Allowed values are 'none' and 'static'. - :vartype cpu_manager_policy: str - :ivar cpu_cfs_quota: If CPU CFS quota enforcement is enabled for containers that specify CPU - limits. The default is true. - :vartype cpu_cfs_quota: bool - :ivar cpu_cfs_quota_period: The CPU CFS quota period value. The default is '100ms.' Valid - values are a sequence of decimal numbers with an optional fraction and a unit suffix. For - example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. - :vartype cpu_cfs_quota_period: str - :ivar image_gc_high_threshold: The percent of disk usage after which image garbage collection - is always run. To disable image garbage collection, set to 100. The default is 85%. - :vartype image_gc_high_threshold: int - :ivar image_gc_low_threshold: The percent of disk usage before which image garbage collection - is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%. - :vartype image_gc_low_threshold: int - :ivar topology_manager_policy: The Topology Manager policy to use. For more information see - `Kubernetes Topology Manager - `_. The default is - 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. - :vartype topology_manager_policy: str - :ivar allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending - in ``*``). - :vartype allowed_unsafe_sysctls: list[str] - :ivar fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled on - the node. - :vartype fail_swap_on: bool - :ivar container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it - is rotated. - :vartype container_log_max_size_mb: int - :ivar container_log_max_files: The maximum number of container log files that can be present - for a container. The number must be ≥ 2. - :vartype container_log_max_files: int - :ivar pod_max_pids: The maximum number of processes per pod. - :vartype pod_max_pids: int + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: The properties of JWTAuthenticator. For details on how to configure the + properties of a JWT authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. Required. + :vartype properties: ~azure.mgmt.containerservice.models.JWTAuthenticatorProperties """ - cpu_manager_policy: Optional[str] = rest_field( - name="cpuManagerPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """The CPU Manager policy to use. The default is 'none'. See `Kubernetes CPU management policies - `_ - for more information. Allowed values are 'none' and 'static'.""" - cpu_cfs_quota: Optional[bool] = rest_field( - name="cpuCfsQuota", visibility=["read", "create", "update", "delete", "query"] + properties: "_models.JWTAuthenticatorProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is - true.""" - cpu_cfs_quota_period: Optional[str] = rest_field( - name="cpuCfsQuotaPeriod", visibility=["read", "create", "update", "delete", "query"] - ) - """The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal - numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported - units are 'ns', 'us', 'ms', 's', 'm', and 'h'.""" - image_gc_high_threshold: Optional[int] = rest_field( - name="imageGcHighThreshold", visibility=["read", "create", "update", "delete", "query"] - ) - """The percent of disk usage after which image garbage collection is always run. To disable image - garbage collection, set to 100. The default is 85%.""" - image_gc_low_threshold: Optional[int] = rest_field( - name="imageGcLowThreshold", visibility=["read", "create", "update", "delete", "query"] - ) - """The percent of disk usage before which image garbage collection is never run. This cannot be - set higher than imageGcHighThreshold. The default is 80%.""" - topology_manager_policy: Optional[str] = rest_field( - name="topologyManagerPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """The Topology Manager policy to use. For more information see `Kubernetes Topology Manager - `_. The default is - 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.""" - allowed_unsafe_sysctls: Optional[list[str]] = rest_field( - name="allowedUnsafeSysctls", visibility=["read", "create", "update", "delete", "query"] - ) - """Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in ``*``).""" - fail_swap_on: Optional[bool] = rest_field( - name="failSwapOn", visibility=["read", "create", "update", "delete", "query"] - ) - """If set to true it will make the Kubelet fail to start if swap is enabled on the node.""" - container_log_max_size_mb: Optional[int] = rest_field( - name="containerLogMaxSizeMB", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum size (e.g. 10Mi) of container log file before it is rotated.""" - container_log_max_files: Optional[int] = rest_field( - name="containerLogMaxFiles", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum number of container log files that can be present for a container. The number must - be ≥ 2.""" - pod_max_pids: Optional[int] = rest_field( - name="podMaxPids", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum number of processes per pod.""" + """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT + authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. Required.""" @overload 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, + properties: "_models.JWTAuthenticatorProperties", ) -> None: ... @overload @@ -3218,21 +4494,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubernetesPatchVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Kubernetes patch version profile. +class JWTAuthenticatorClaimMappingExpression(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The claim mapping expression for JWTAuthenticator. - :ivar upgrades: Possible upgrade path for given patch version. - :vartype upgrades: list[str] + :ivar expression: The CEL expression used to access token claims. Required. + :vartype expression: str """ - upgrades: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Possible upgrade path for given patch version.""" + expression: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The CEL expression used to access token claims. Required.""" @overload def __init__( self, *, - upgrades: Optional[list[str]] = None, + expression: str, ) -> None: ... @overload @@ -3246,49 +4522,51 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubernetesVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Kubernetes version profile for given major.minor release. +class JWTAuthenticatorClaimMappings(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The claim mappings for JWTAuthenticator. - :ivar version: major.minor version of Kubernetes release. - :vartype version: str - :ivar capabilities: Capabilities on this Kubernetes version. - :vartype capabilities: ~azure.mgmt.containerservice.models.KubernetesVersionCapabilities - :ivar is_default: Whether this version is default. - :vartype is_default: bool - :ivar is_preview: Whether this version is in preview mode. - :vartype is_preview: bool - :ivar patch_versions: Patch versions of Kubernetes release. - :vartype patch_versions: dict[str, ~azure.mgmt.containerservice.models.KubernetesPatchVersion] + :ivar username: The expression to extract username attribute from the token claims. Required. + :vartype username: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression + :ivar groups: The expression to extract groups attribute from the token claims. When not + provided, no groups are extracted from the token claims. + :vartype groups: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression + :ivar uid: The expression to extract uid attribute from the token claims. When not provided, no + uid is extracted from the token claims. + :vartype uid: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression + :ivar extra: The expression to extract extra attribute from the token claims. When not + provided, no extra attributes are extracted from the token claims. + :vartype extra: + list[~azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression] """ - version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """major.minor version of Kubernetes release.""" - capabilities: Optional["_models.KubernetesVersionCapabilities"] = rest_field( + username: "_models.JWTAuthenticatorClaimMappingExpression" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Capabilities on this Kubernetes version.""" - is_default: Optional[bool] = rest_field( - name="isDefault", visibility=["read", "create", "update", "delete", "query"] + """The expression to extract username attribute from the token claims. Required.""" + groups: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Whether this version is default.""" - is_preview: Optional[bool] = rest_field( - name="isPreview", visibility=["read", "create", "update", "delete", "query"] + """The expression to extract groups attribute from the token claims. When not provided, no groups + are extracted from the token claims.""" + uid: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Whether this version is in preview mode.""" - patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = rest_field( - name="patchVersions", visibility=["read", "create", "update", "delete", "query"] + """The expression to extract uid attribute from the token claims. When not provided, no uid is + extracted from the token claims.""" + extra: Optional[list["_models.JWTAuthenticatorExtraClaimMappingExpression"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Patch versions of Kubernetes release.""" + """The expression to extract extra attribute from the token claims. When not provided, no extra + attributes are extracted from the token claims.""" @overload def __init__( self, *, - version: Optional[str] = None, - capabilities: Optional["_models.KubernetesVersionCapabilities"] = None, - is_default: Optional[bool] = None, - is_preview: Optional[bool] = None, - patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = None, + username: "_models.JWTAuthenticatorClaimMappingExpression", + groups: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, + uid: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, + extra: Optional[list["_models.JWTAuthenticatorExtraClaimMappingExpression"]] = None, ) -> None: ... @overload @@ -3302,23 +4580,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubernetesVersionCapabilities(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Capabilities on this Kubernetes version. +class JWTAuthenticatorExtraClaimMappingExpression( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """The extra claim mapping expression for JWTAuthenticator. - :ivar support_plan: Kubernetes support plans available for this version. - :vartype support_plan: list[str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan] + :ivar key: The key of the extra attribute. Required. + :vartype key: str + :ivar value_expression: The CEL expression used to extract the value of the extra attribute. + Required. + :vartype value_expression: str """ - support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = rest_field( - name="supportPlan", visibility=["read", "create", "update", "delete", "query"] + key: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The key of the extra attribute. Required.""" + value_expression: str = rest_field( + name="valueExpression", visibility=["read", "create", "update", "delete", "query"] ) - """Kubernetes support plans available for this version.""" + """The CEL expression used to extract the value of the extra attribute. Required.""" @overload def __init__( self, *, - support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = None, + key: str, + value_expression: str, ) -> None: ... @overload @@ -3332,23 +4618,33 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubernetesVersionListResult(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Hold values properties, which is array of KubernetesVersion. +class JWTAuthenticatorIssuer(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The OIDC issuer details for JWTAuthenticator. - :ivar values_property: Array of AKS supported Kubernetes versions. - :vartype values_property: list[~azure.mgmt.containerservice.models.KubernetesVersion] + :ivar url: The issuer URL. The URL must begin with the scheme https and cannot contain a query + string or fragment. This must match the "iss" claim in the presented JWT, and the issuer + returned from discovery. Required. + :vartype url: str + :ivar audiences: The set of acceptable audiences the JWT must be issued to. At least one is + required. When multiple is set, AudienceMatchPolicy is used in API Server configuration. + Required. + :vartype audiences: list[str] """ - values_property: Optional[list["_models.KubernetesVersion"]] = rest_field( - name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" - ) - """Array of AKS supported Kubernetes versions.""" + url: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The issuer URL. The URL must begin with the scheme https and cannot contain a query string or + fragment. This must match the \"iss\" claim in the presented JWT, and the issuer returned from + discovery. Required.""" + audiences: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The set of acceptable audiences the JWT must be issued to. At least one is required. When + multiple is set, AudienceMatchPolicy is used in API Server configuration. Required.""" @overload def __init__( self, *, - values_property: Optional[list["_models.KubernetesVersion"]] = None, + url: str, + audiences: list[str], ) -> None: ... @overload @@ -3362,55 +4658,94 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class LinuxOSConfig(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """OS configurations of Linux agent nodes. See `AKS custom node configuration - `_ for more details. - - :ivar sysctls: Sysctl settings for Linux agent nodes. - :vartype sysctls: ~azure.mgmt.containerservice.models.SysctlConfig - :ivar transparent_huge_page_enabled: Whether transparent hugepages are enabled. Valid values - are 'always', 'madvise', and 'never'. The default is 'always'. For more information see - `Transparent Hugepages - `_. - :vartype transparent_huge_page_enabled: str - :ivar transparent_huge_page_defrag: Whether the kernel should make aggressive use of memory - compaction to make more hugepages available. Valid values are 'always', 'defer', - 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see - `Transparent Hugepages - `_. - :vartype transparent_huge_page_defrag: str - :ivar swap_file_size_mb: The size in MB of a swap file that will be created on each node. - :vartype swap_file_size_mb: int - """ +class JWTAuthenticatorProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT + authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. - sysctls: Optional["_models.SysctlConfig"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Sysctl settings for Linux agent nodes.""" - transparent_huge_page_enabled: Optional[str] = rest_field( - name="transparentHugePageEnabled", visibility=["read", "create", "update", "delete", "query"] + :ivar provisioning_state: The current provisioning state of the JWT authenticator. Known values + are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState + :ivar issuer: The JWT OIDC issuer details. Required. + :vartype issuer: ~azure.mgmt.containerservice.models.JWTAuthenticatorIssuer + :ivar claim_validation_rules: The rules that are applied to validate token claims to + authenticate users. All the expressions must evaluate to true for validation to succeed. + :vartype claim_validation_rules: + list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] + :ivar claim_mappings: The mappings that define how user attributes are extracted from the token + claims. Required. + :vartype claim_mappings: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings + :ivar user_validation_rules: The rules that are applied to the mapped user before completing + authentication. All the expressions must evaluate to true for validation to succeed. + :vartype user_validation_rules: + list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] + :ivar certificate_authority_bundle: PEM-encoded CA certificate bundle used to validate the + connection when fetching discovery information. Use this for issuer endpoints that use private + certificate authorities + or environments where TLS inspection is performed. + + The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no + larger than 20 KB in total. Include all CA certificates needed to validate + the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + + If provided, only these CAs are trusted instead of the well-known root CAs. + If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates + is set, those certificates will be used instead. Otherwise, only the well-known + root CAs are trusted. + :vartype certificate_authority_bundle: str + """ + + provisioning_state: Optional[Union[str, "_models.JWTAuthenticatorProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] ) - """Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. - The default is 'always'. For more information see `Transparent Hugepages - `_.""" - transparent_huge_page_defrag: Optional[str] = rest_field( - name="transparentHugePageDefrag", visibility=["read", "create", "update", "delete", "query"] + """The current provisioning state of the JWT authenticator. Known values are: \"Succeeded\", + \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + issuer: "_models.JWTAuthenticatorIssuer" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The JWT OIDC issuer details. Required.""" + claim_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = rest_field( + name="claimValidationRules", visibility=["read", "create", "update", "delete", "query"] ) - """Whether the kernel should make aggressive use of memory compaction to make more hugepages - available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The - default is 'madvise'. For more information see `Transparent Hugepages - `_.""" - swap_file_size_mb: Optional[int] = rest_field( - name="swapFileSizeMB", visibility=["read", "create", "update", "delete", "query"] + """The rules that are applied to validate token claims to authenticate users. All the expressions + must evaluate to true for validation to succeed.""" + claim_mappings: "_models.JWTAuthenticatorClaimMappings" = rest_field( + name="claimMappings", visibility=["read", "create", "update", "delete", "query"] ) - """The size in MB of a swap file that will be created on each node.""" + """The mappings that define how user attributes are extracted from the token claims. Required.""" + user_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = rest_field( + name="userValidationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The rules that are applied to the mapped user before completing authentication. All the + expressions must evaluate to true for validation to succeed.""" + certificate_authority_bundle: Optional[str] = rest_field( + name="certificateAuthorityBundle", visibility=["read", "create", "update", "delete", "query"] + ) + """PEM-encoded CA certificate bundle used to validate the connection when fetching discovery + information. Use this for issuer endpoints that use private certificate authorities + or environments where TLS inspection is performed. + + The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no + larger than 20 KB in total. Include all CA certificates needed to validate + the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + + If provided, only these CAs are trusted instead of the well-known root CAs. + If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates + is set, those certificates will be used instead. Otherwise, only the well-known + root CAs are trusted.""" @overload def __init__( self, *, - sysctls: Optional["_models.SysctlConfig"] = None, - transparent_huge_page_enabled: Optional[str] = None, - transparent_huge_page_defrag: Optional[str] = None, - swap_file_size_mb: Optional[int] = None, + issuer: "_models.JWTAuthenticatorIssuer", + claim_mappings: "_models.JWTAuthenticatorClaimMappings", + claim_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = None, + user_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = None, + certificate_authority_bundle: Optional[str] = None, ) -> None: ... @overload @@ -3424,91 +4759,26 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class LocalDNSOverride(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Overrides for localDNS profile. +class JWTAuthenticatorValidationRule(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The validation rule for JWTAuthenticator. - :ivar query_logging: Log level for DNS queries in localDNS. Known values are: "Error" and - "Log". - :vartype query_logging: str or ~azure.mgmt.containerservice.models.LocalDNSQueryLogging - :ivar protocol: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream - DNS server. Known values are: "PreferUDP" and "ForceTCP". - :vartype protocol: str or ~azure.mgmt.containerservice.models.LocalDNSProtocol - :ivar forward_destination: Destination server for DNS queries to be forwarded from localDNS. - Known values are: "ClusterCoreDNS" and "VnetDNS". - :vartype forward_destination: str or - ~azure.mgmt.containerservice.models.LocalDNSForwardDestination - :ivar forward_policy: Forward policy for selecting upstream DNS server. See `forward plugin - `_ for more information. Known values are: "Sequential", - "RoundRobin", and "Random". - :vartype forward_policy: str or ~azure.mgmt.containerservice.models.LocalDNSForwardPolicy - :ivar max_concurrent: Maximum number of concurrent queries. See `forward plugin - `_ for more information. - :vartype max_concurrent: int - :ivar cache_duration_in_seconds: Cache max TTL in seconds. See `cache plugin - `_ for more information. - :vartype cache_duration_in_seconds: int - :ivar serve_stale_duration_in_seconds: Serve stale duration in seconds. See `cache plugin - `_ for more information. - :vartype serve_stale_duration_in_seconds: int - :ivar serve_stale: Policy for serving stale data. See `cache plugin - `_ for more information. Known values are: "Verify", - "Immediate", and "Disable". - :vartype serve_stale: str or ~azure.mgmt.containerservice.models.LocalDNSServeStale + :ivar expression: The CEL expression used to validate the claim or attribute. Required. + :vartype expression: str + :ivar message: The validation error message. + :vartype message: str """ - query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = rest_field( - name="queryLogging", visibility=["read", "create", "update", "delete", "query"] - ) - """Log level for DNS queries in localDNS. Known values are: \"Error\" and \"Log\".""" - protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. Known - values are: \"PreferUDP\" and \"ForceTCP\".""" - forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = rest_field( - name="forwardDestination", visibility=["read", "create", "update", "delete", "query"] - ) - """Destination server for DNS queries to be forwarded from localDNS. Known values are: - \"ClusterCoreDNS\" and \"VnetDNS\".""" - forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = rest_field( - name="forwardPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Forward policy for selecting upstream DNS server. See `forward plugin - `_ for more information. Known values are: \"Sequential\", - \"RoundRobin\", and \"Random\".""" - max_concurrent: Optional[int] = rest_field( - name="maxConcurrent", visibility=["read", "create", "update", "delete", "query"] - ) - """Maximum number of concurrent queries. See `forward plugin - `_ for more information.""" - cache_duration_in_seconds: Optional[int] = rest_field( - name="cacheDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """Cache max TTL in seconds. See `cache plugin `_ for more - information.""" - serve_stale_duration_in_seconds: Optional[int] = rest_field( - name="serveStaleDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """Serve stale duration in seconds. See `cache plugin `_ for - more information.""" - serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = rest_field( - name="serveStale", visibility=["read", "create", "update", "delete", "query"] - ) - """Policy for serving stale data. See `cache plugin `_ for more - information. Known values are: \"Verify\", \"Immediate\", and \"Disable\".""" + expression: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The CEL expression used to validate the claim or attribute. Required.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The validation error message.""" @overload def __init__( self, *, - query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = None, - protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = None, - forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = None, - forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = None, - max_concurrent: Optional[int] = None, - cache_duration_in_seconds: Optional[int] = None, - serve_stale_duration_in_seconds: Optional[int] = None, - serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = None, + expression: str, + message: Optional[str] = None, ) -> None: ... @overload @@ -3522,49 +4792,1525 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class LocalDNSProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve - performance and reliability of DNS resolution in an AKS cluster. For more details see - aka.ms/aks/localdns. +class KubeletConfig(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Kubelet configurations of agent nodes. See `AKS custom node configuration + `_ for more details. - :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and - "Disabled". - :vartype mode: str or ~azure.mgmt.containerservice.models.LocalDNSMode - :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". - :vartype state: str or ~azure.mgmt.containerservice.models.LocalDNSState - :ivar vnet_dns_overrides: VnetDNS overrides apply to DNS traffic from pods with - dnsPolicy:default or kubelet (referred to as VnetDNS traffic). - :vartype vnet_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] - :ivar kube_dns_overrides: KubeDNS overrides apply to DNS traffic from pods with - dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). + :ivar cpu_manager_policy: The CPU Manager policy to use. The default is 'none'. See `Kubernetes + CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :vartype cpu_manager_policy: str + :ivar cpu_cfs_quota: If CPU CFS quota enforcement is enabled for containers that specify CPU + limits. The default is true. + :vartype cpu_cfs_quota: bool + :ivar cpu_cfs_quota_period: The CPU CFS quota period value. The default is '100ms.' Valid + values are a sequence of decimal numbers with an optional fraction and a unit suffix. For + example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :vartype cpu_cfs_quota_period: str + :ivar image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. To disable image garbage collection, set to 100. The default is 85%. + :vartype image_gc_high_threshold: int + :ivar image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%. + :vartype image_gc_low_threshold: int + :ivar topology_manager_policy: The Topology Manager policy to use. For more information see + `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :vartype topology_manager_policy: str + :ivar allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending + in ``*``). + :vartype allowed_unsafe_sysctls: list[str] + :ivar fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled on + the node. + :vartype fail_swap_on: bool + :ivar container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. + :vartype container_log_max_size_mb: int + :ivar container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :vartype container_log_max_files: int + :ivar pod_max_pids: The maximum number of processes per pod. + :vartype pod_max_pids: int + :ivar seccomp_default: Specifies the default seccomp profile applied to all workloads. If not + specified, 'Unconfined' will be used by default. Known values are: "Unconfined" and + "RuntimeDefault". + :vartype seccomp_default: str or ~azure.mgmt.containerservice.models.SeccompDefault + :ivar kube_reserved: Kube-reserved values for kubelet. When a value is not set, the + system-computed default based on VM size is used. See `AKS node resource reservations + `_ for details on computed defaults. Only applicable for + Linux nodepools. + :vartype kube_reserved: ~azure.mgmt.containerservice.models.KubeReserved + :ivar hard_eviction_threshold: Hard eviction thresholds for kubelet. When a threshold is not + set, the system default is used. See `AKS node resource reservations + `_ for details on computed defaults. Only applicable for + Linux nodepools. + :vartype hard_eviction_threshold: ~azure.mgmt.containerservice.models.HardEvictionThreshold + :ivar soft_eviction_threshold: Soft eviction thresholds for kubelet. When crossed, pods are + evicted after the paired softEvictionGracePeriod. System defaults apply when the cluster's + ``enableNodeHardening`` property is true; otherwise no soft eviction is configured. For each + signal (memoryAvailable, nodeFsAvailable, nodeFsInodesFree), the entries in + softEvictionThreshold and softEvictionGracePeriod must be in the same state: both omitted + (default), both non-empty (override), or both empty strings (opt that signal out). Only + applicable for Linux nodepools. See + `https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds + `_. + :vartype soft_eviction_threshold: ~azure.mgmt.containerservice.models.SoftEvictionThreshold + :ivar soft_eviction_grace_period: Grace periods for soft eviction signals — how long a + threshold must be held before pod eviction. Same defaulting and pairing rules as + softEvictionThreshold. Values are Go-style duration strings (e.g. '1m30s'); supported units are + 'ns', 'us', 'ms', 's', 'm', and 'h'. Only applicable for Linux nodepools. + :vartype soft_eviction_grace_period: + ~azure.mgmt.containerservice.models.SoftEvictionGracePeriod + :ivar eviction_max_pod_grace_period_in_seconds: Maximum grace period, in seconds, for pods to + terminate during a soft eviction; caps the pod's terminationGracePeriodSeconds. Default is 60, + applied when the cluster's ``enableNodeHardening`` property is true. Only applicable for Linux + nodepools. + :vartype eviction_max_pod_grace_period_in_seconds: int + """ + + cpu_manager_policy: Optional[str] = rest_field( + name="cpuManagerPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The CPU Manager policy to use. The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'.""" + cpu_cfs_quota: Optional[bool] = rest_field( + name="cpuCfsQuota", visibility=["read", "create", "update", "delete", "query"] + ) + """If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is + true.""" + cpu_cfs_quota_period: Optional[str] = rest_field( + name="cpuCfsQuotaPeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The CPU CFS quota period value. The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'.""" + image_gc_high_threshold: Optional[int] = rest_field( + name="imageGcHighThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """The percent of disk usage after which image garbage collection is always run. To disable image + garbage collection, set to 100. The default is 85%.""" + image_gc_low_threshold: Optional[int] = rest_field( + name="imageGcLowThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """The percent of disk usage before which image garbage collection is never run. This cannot be + set higher than imageGcHighThreshold. The default is 80%.""" + topology_manager_policy: Optional[str] = rest_field( + name="topologyManagerPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The Topology Manager policy to use. For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.""" + allowed_unsafe_sysctls: Optional[list[str]] = rest_field( + name="allowedUnsafeSysctls", visibility=["read", "create", "update", "delete", "query"] + ) + """Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in ``*``).""" + fail_swap_on: Optional[bool] = rest_field( + name="failSwapOn", visibility=["read", "create", "update", "delete", "query"] + ) + """If set to true it will make the Kubelet fail to start if swap is enabled on the node.""" + container_log_max_size_mb: Optional[int] = rest_field( + name="containerLogMaxSizeMB", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum size (e.g. 10Mi) of container log file before it is rotated.""" + container_log_max_files: Optional[int] = rest_field( + name="containerLogMaxFiles", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum number of container log files that can be present for a container. The number must + be ≥ 2.""" + pod_max_pids: Optional[int] = rest_field( + name="podMaxPids", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum number of processes per pod.""" + seccomp_default: Optional[Union[str, "_models.SeccompDefault"]] = rest_field( + name="seccompDefault", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' + will be used by default. Known values are: \"Unconfined\" and \"RuntimeDefault\".""" + kube_reserved: Optional["_models.KubeReserved"] = rest_field( + name="kubeReserved", visibility=["read", "create", "update", "delete", "query"] + ) + """Kube-reserved values for kubelet. When a value is not set, the system-computed default based on + VM size is used. See `AKS node resource reservations `_ + for details on computed defaults. Only applicable for Linux nodepools.""" + hard_eviction_threshold: Optional["_models.HardEvictionThreshold"] = rest_field( + name="hardEvictionThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """Hard eviction thresholds for kubelet. When a threshold is not set, the system default is used. + See `AKS node resource reservations `_ for details on + computed defaults. Only applicable for Linux nodepools.""" + soft_eviction_threshold: Optional["_models.SoftEvictionThreshold"] = rest_field( + name="softEvictionThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """Soft eviction thresholds for kubelet. When crossed, pods are evicted after the paired + softEvictionGracePeriod. System defaults apply when the cluster's ``enableNodeHardening`` + property is true; otherwise no soft eviction is configured. For each signal (memoryAvailable, + nodeFsAvailable, nodeFsInodesFree), the entries in softEvictionThreshold and + softEvictionGracePeriod must be in the same state: both omitted (default), both non-empty + (override), or both empty strings (opt that signal out). Only applicable for Linux nodepools. + See + `https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds + `_.""" + soft_eviction_grace_period: Optional["_models.SoftEvictionGracePeriod"] = rest_field( + name="softEvictionGracePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """Grace periods for soft eviction signals — how long a threshold must be held before pod + eviction. Same defaulting and pairing rules as softEvictionThreshold. Values are Go-style + duration strings (e.g. '1m30s'); supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Only + applicable for Linux nodepools.""" + eviction_max_pod_grace_period_in_seconds: Optional[int] = rest_field( + name="evictionMaxPodGracePeriodInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum grace period, in seconds, for pods to terminate during a soft eviction; caps the pod's + terminationGracePeriodSeconds. Default is 60, applied when the cluster's + ``enableNodeHardening`` property is true. Only applicable for Linux nodepools.""" + + @overload + 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, + seccomp_default: Optional[Union[str, "_models.SeccompDefault"]] = None, + kube_reserved: Optional["_models.KubeReserved"] = None, + hard_eviction_threshold: Optional["_models.HardEvictionThreshold"] = None, + soft_eviction_threshold: Optional["_models.SoftEvictionThreshold"] = None, + soft_eviction_grace_period: Optional["_models.SoftEvictionGracePeriod"] = None, + eviction_max_pod_grace_period_in_seconds: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubeReserved(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Kube-reserved values for kubelet. When a value is not set, the system-computed default based on + VM size is used. See `AKS node resource reservations `_ + for details on computed defaults. Only applicable for Linux nodepools. + + :ivar cpu_millicores: The amount of CPU reserved for Kubernetes system daemons, in millicores. + Must be greater than or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores). + :vartype cpu_millicores: int + :ivar memory_mb: The amount of memory reserved for Kubernetes system daemons, in MiB. Must be + greater than or equal to 750. + :vartype memory_mb: int + """ + + cpu_millicores: Optional[int] = rest_field( + name="cpuMillicores", visibility=["read", "create", "update", "delete", "query"] + ) + """The amount of CPU reserved for Kubernetes system daemons, in millicores. Must be greater than + or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores).""" + memory_mb: Optional[int] = rest_field(name="memoryMB", visibility=["read", "create", "update", "delete", "query"]) + """The amount of memory reserved for Kubernetes system daemons, in MiB. Must be greater than or + equal to 750.""" + + @overload + def __init__( + self, + *, + cpu_millicores: Optional[int] = None, + memory_mb: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesPatchVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Kubernetes patch version profile. + + :ivar upgrades: Possible upgrade path for given patch version. + :vartype upgrades: list[str] + """ + + upgrades: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Possible upgrade path for given patch version.""" + + @overload + def __init__( + self, + *, + upgrades: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesResourceObjectEncryptionProfile( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Encryption at rest of Kubernetes resource objects using service-managed keys. More information + on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. + + :ivar infrastructure_encryption: Whether to enable encryption at rest of Kubernetes resource + objects using service-managed keys. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. Known values are: "Enabled" and + "Disabled". + :vartype infrastructure_encryption: str or + ~azure.mgmt.containerservice.models.InfrastructureEncryption + """ + + infrastructure_encryption: Optional[Union[str, "_models.InfrastructureEncryption"]] = rest_field( + name="infrastructureEncryption", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. + More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. Known values are: \"Enabled\" and + \"Disabled\".""" + + @overload + def __init__( + self, + *, + infrastructure_encryption: Optional[Union[str, "_models.InfrastructureEncryption"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Kubernetes version profile for given major.minor release. + + :ivar version: major.minor version of Kubernetes release. + :vartype version: str + :ivar capabilities: Capabilities on this Kubernetes version. + :vartype capabilities: ~azure.mgmt.containerservice.models.KubernetesVersionCapabilities + :ivar is_default: Whether this version is default. + :vartype is_default: bool + :ivar is_preview: Whether this version is in preview mode. + :vartype is_preview: bool + :ivar patch_versions: Patch versions of Kubernetes release. + :vartype patch_versions: dict[str, ~azure.mgmt.containerservice.models.KubernetesPatchVersion] + """ + + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """major.minor version of Kubernetes release.""" + capabilities: Optional["_models.KubernetesVersionCapabilities"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Capabilities on this Kubernetes version.""" + is_default: Optional[bool] = rest_field( + name="isDefault", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether this version is default.""" + is_preview: Optional[bool] = rest_field( + name="isPreview", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether this version is in preview mode.""" + patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = rest_field( + name="patchVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """Patch versions of Kubernetes release.""" + + @overload + def __init__( + self, + *, + version: Optional[str] = None, + capabilities: Optional["_models.KubernetesVersionCapabilities"] = None, + is_default: Optional[bool] = None, + is_preview: Optional[bool] = None, + patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesVersionCapabilities(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Capabilities on this Kubernetes version. + + :ivar support_plan: Kubernetes support plans available for this version. + :vartype support_plan: list[str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan] + """ + + support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = rest_field( + name="supportPlan", visibility=["read", "create", "update", "delete", "query"] + ) + """Kubernetes support plans available for this version.""" + + @overload + def __init__( + self, + *, + support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KubernetesVersionListResult(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Hold values properties, which is array of KubernetesVersion. + + :ivar values_property: Array of AKS supported Kubernetes versions. + :vartype values_property: list[~azure.mgmt.containerservice.models.KubernetesVersion] + """ + + values_property: Optional[list["_models.KubernetesVersion"]] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of AKS supported Kubernetes versions.""" + + @overload + def __init__( + self, + *, + values_property: Optional[list["_models.KubernetesVersion"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LabelSelector(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null label selector + matches no objects. + + :ivar match_labels: matchLabels is an array of {key=value} pairs. A single {key=value} in the + matchLabels map is equivalent to an element of matchExpressions, whose key field is ``key``, + the operator is ``In``, and the values array contains only ``value``. The requirements are + ANDed. + :vartype match_labels: list[str] + :ivar match_expressions: matchExpressions is a list of label selector requirements. The + requirements are ANDed. + :vartype match_expressions: list[~azure.mgmt.containerservice.models.LabelSelectorRequirement] + """ + + match_labels: Optional[list[str]] = rest_field( + name="matchLabels", visibility=["read", "create", "update", "delete", "query"] + ) + """matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is + equivalent to an element of matchExpressions, whose key field is ``key``, the operator is + ``In``, and the values array contains only ``value``. The requirements are ANDed.""" + match_expressions: Optional[list["_models.LabelSelectorRequirement"]] = rest_field( + name="matchExpressions", visibility=["read", "create", "update", "delete", "query"] + ) + """matchExpressions is a list of label selector requirements. The requirements are ANDed.""" + + @overload + def __init__( + self, + *, + match_labels: Optional[list[str]] = None, + match_expressions: Optional[list["_models.LabelSelectorRequirement"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LabelSelectorRequirement(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + + :ivar key: key is the label key that the selector applies to. + :vartype key: str + :ivar operator: operator represents a key's relationship to a set of values. Valid operators + are In and NotIn. Known values are: "In", "NotIn", "Exists", and "DoesNotExist". + :vartype operator: str or ~azure.mgmt.containerservice.models.Operator + :ivar values_property: values is an array of string values, the values array must be non-empty. + :vartype values_property: list[str] + """ + + key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """key is the label key that the selector applies to.""" + operator: Optional[Union[str, "_models.Operator"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """operator represents a key's relationship to a set of values. Valid operators are In and NotIn. + Known values are: \"In\", \"NotIn\", \"Exists\", and \"DoesNotExist\".""" + values_property: Optional[list[str]] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """values is an array of string values, the values array must be non-empty.""" + + @overload + def __init__( + self, + *, + key: Optional[str] = None, + operator: Optional[Union[str, "_models.Operator"]] = None, + values_property: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LinuxOSConfig(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """OS configurations of Linux agent nodes. See `AKS custom node configuration + `_ for more details. + + :ivar sysctls: Sysctl settings for Linux agent nodes. + :vartype sysctls: ~azure.mgmt.containerservice.models.SysctlConfig + :ivar transparent_huge_page_enabled: Whether transparent hugepages are enabled. Valid values + are 'always', 'madvise', and 'never'. The default is 'always'. For more information see + `Transparent Hugepages + `_. + :vartype transparent_huge_page_enabled: str + :ivar transparent_huge_page_defrag: Whether the kernel should make aggressive use of memory + compaction to make more hugepages available. Valid values are 'always', 'defer', + 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see + `Transparent Hugepages + `_. + :vartype transparent_huge_page_defrag: str + :ivar swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :vartype swap_file_size_mb: int + """ + + sysctls: Optional["_models.SysctlConfig"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Sysctl settings for Linux agent nodes.""" + transparent_huge_page_enabled: Optional[str] = rest_field( + name="transparentHugePageEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. + The default is 'always'. For more information see `Transparent Hugepages + `_.""" + transparent_huge_page_defrag: Optional[str] = rest_field( + name="transparentHugePageDefrag", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the kernel should make aggressive use of memory compaction to make more hugepages + available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The + default is 'madvise'. For more information see `Transparent Hugepages + `_.""" + swap_file_size_mb: Optional[int] = rest_field( + name="swapFileSizeMB", visibility=["read", "create", "update", "delete", "query"] + ) + """The size in MB of a swap file that will be created on each node.""" + + @overload + def __init__( + self, + *, + sysctls: Optional["_models.SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ListBootstrapDataRequest(_Model): + """Empty request body for listing FlexNode bootstrap data.""" + + +class LoadBalancer(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """The configurations regarding multiple standard load balancers. If not supplied, single load + balancer mode will be used. Multiple standard load balancers mode will be used if at lease one + configuration is supplied. There has to be a configuration named ``kubernetes``. The name field + will be the name of the corresponding public load balancer. There will be an internal load + balancer created if needed, and the name will be ``-internal``. The internal lb shares + the same configurations as the external one. The internal lbs are not needed to be included in + LoadBalancer list. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: The properties of the load balancer. + :vartype properties: ~azure.mgmt.containerservice.models.LoadBalancerProperties + """ + + properties: Optional["_models.LoadBalancerProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the load balancer.""" + + __flattened_items = [ + "primary_agent_pool_name", + "allow_service_placement", + "service_label_selector", + "service_namespace_selector", + "node_selector", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.LoadBalancerProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class LoadBalancerProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Properties for a load balancer resource. + + :ivar primary_agent_pool_name: Required field. A string value that must specify the ID of an + existing agent pool. All nodes in the given pool will always be added to this load balancer. + This agent pool must have at least one node and minCount>=1 for autoscaling operations. An + agent pool can only be the primary pool for a single load balancer. Required. + :vartype primary_agent_pool_name: str + :ivar allow_service_placement: Whether to automatically place services on the load balancer. If + not supplied, the default value is true. If set to false manually, both of the external and the + internal load balancer will not be selected for services unless they explicitly target it. + :vartype allow_service_placement: bool + :ivar service_label_selector: Only services that must match this selector can be placed on this + load balancer. + :vartype service_label_selector: ~azure.mgmt.containerservice.models.LabelSelector + :ivar service_namespace_selector: Services created in namespaces that match the selector can be + placed on this load balancer. + :vartype service_namespace_selector: ~azure.mgmt.containerservice.models.LabelSelector + :ivar node_selector: Nodes that match this selector will be possible members of this load + balancer. + :vartype node_selector: ~azure.mgmt.containerservice.models.LabelSelector + :ivar provisioning_state: The current provisioning state. + :vartype provisioning_state: str + """ + + primary_agent_pool_name: str = rest_field( + name="primaryAgentPoolName", visibility=["read", "create", "update", "delete", "query"] + ) + """Required field. A string value that must specify the ID of an existing agent pool. All nodes in + the given pool will always be added to this load balancer. This agent pool must have at least + one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool + for a single load balancer. Required.""" + allow_service_placement: Optional[bool] = rest_field( + name="allowServicePlacement", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to automatically place services on the load balancer. If not supplied, the default + value is true. If set to false manually, both of the external and the internal load balancer + will not be selected for services unless they explicitly target it.""" + service_label_selector: Optional["_models.LabelSelector"] = rest_field( + name="serviceLabelSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Only services that must match this selector can be placed on this load balancer.""" + service_namespace_selector: Optional["_models.LabelSelector"] = rest_field( + name="serviceNamespaceSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Services created in namespaces that match the selector can be placed on this load balancer.""" + node_selector: Optional["_models.LabelSelector"] = rest_field( + name="nodeSelector", visibility=["read", "create", "update", "delete", "query"] + ) + """Nodes that match this selector will be possible members of this load balancer.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current provisioning state.""" + + @overload + def __init__( + self, + *, + primary_agent_pool_name: str, + allow_service_placement: Optional[bool] = None, + service_label_selector: Optional["_models.LabelSelector"] = None, + service_namespace_selector: Optional["_models.LabelSelector"] = None, + node_selector: Optional["_models.LabelSelector"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LocalDNSOverride(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Overrides for localDNS profile. + + :ivar query_logging: Log level for DNS queries in localDNS. Known values are: "Error" and + "Log". + :vartype query_logging: str or ~azure.mgmt.containerservice.models.LocalDNSQueryLogging + :ivar protocol: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream + DNS server. Known values are: "PreferUDP" and "ForceTCP". + :vartype protocol: str or ~azure.mgmt.containerservice.models.LocalDNSProtocol + :ivar forward_destination: Destination server for DNS queries to be forwarded from localDNS. + Known values are: "ClusterCoreDNS" and "VnetDNS". + :vartype forward_destination: str or + ~azure.mgmt.containerservice.models.LocalDNSForwardDestination + :ivar forward_policy: Forward policy for selecting upstream DNS server. See `forward plugin + `_ for more information. Known values are: "Sequential", + "RoundRobin", and "Random". + :vartype forward_policy: str or ~azure.mgmt.containerservice.models.LocalDNSForwardPolicy + :ivar max_concurrent: Maximum number of concurrent queries. See `forward plugin + `_ for more information. + :vartype max_concurrent: int + :ivar cache_duration_in_seconds: Cache max TTL in seconds. See `cache plugin + `_ for more information. + :vartype cache_duration_in_seconds: int + :ivar serve_stale_duration_in_seconds: Serve stale duration in seconds. See `cache plugin + `_ for more information. + :vartype serve_stale_duration_in_seconds: int + :ivar serve_stale: Policy for serving stale data. See `cache plugin + `_ for more information. Known values are: "Verify", + "Immediate", and "Disable". + :vartype serve_stale: str or ~azure.mgmt.containerservice.models.LocalDNSServeStale + """ + + query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = rest_field( + name="queryLogging", visibility=["read", "create", "update", "delete", "query"] + ) + """Log level for DNS queries in localDNS. Known values are: \"Error\" and \"Log\".""" + protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. Known + values are: \"PreferUDP\" and \"ForceTCP\".""" + forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = rest_field( + name="forwardDestination", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination server for DNS queries to be forwarded from localDNS. Known values are: + \"ClusterCoreDNS\" and \"VnetDNS\".""" + forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = rest_field( + name="forwardPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Forward policy for selecting upstream DNS server. See `forward plugin + `_ for more information. Known values are: \"Sequential\", + \"RoundRobin\", and \"Random\".""" + max_concurrent: Optional[int] = rest_field( + name="maxConcurrent", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of concurrent queries. See `forward plugin + `_ for more information.""" + cache_duration_in_seconds: Optional[int] = rest_field( + name="cacheDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache max TTL in seconds. See `cache plugin `_ for more + information.""" + serve_stale_duration_in_seconds: Optional[int] = rest_field( + name="serveStaleDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Serve stale duration in seconds. See `cache plugin `_ for + more information.""" + serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = rest_field( + name="serveStale", visibility=["read", "create", "update", "delete", "query"] + ) + """Policy for serving stale data. See `cache plugin `_ for more + information. Known values are: \"Verify\", \"Immediate\", and \"Disable\".""" + + @overload + def __init__( + self, + *, + query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = None, + protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = None, + forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = None, + forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = None, + max_concurrent: Optional[int] = None, + cache_duration_in_seconds: Optional[int] = None, + serve_stale_duration_in_seconds: Optional[int] = None, + serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LocalDNSProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve + performance and reliability of DNS resolution in an AKS cluster. For more details see + aka.ms/aks/localdns. + + :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and + "Disabled". + :vartype mode: str or ~azure.mgmt.containerservice.models.LocalDNSMode + :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.containerservice.models.LocalDNSState + :ivar vnet_dns_overrides: VnetDNS overrides apply to DNS traffic from pods with + dnsPolicy:default or kubelet (referred to as VnetDNS traffic). + :vartype vnet_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] + :ivar kube_dns_overrides: KubeDNS overrides apply to DNS traffic from pods with + dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). :vartype kube_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] """ - mode: Optional[Union[str, "_models.LocalDNSMode"]] = rest_field( + mode: Optional[Union[str, "_models.LocalDNSMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and + \"Disabled\".""" + state: Optional[Union[str, "_models.LocalDNSState"]] = rest_field(visibility=["read"]) + """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" + vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( + name="vnetDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to + as VnetDNS traffic).""" + kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( + name="kubeDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as + KubeDNS traffic).""" + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, "_models.LocalDNSMode"]] = None, + vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, + kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Machine(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """A machine. Contains details about the underlying virtual machine. A machine may be visible here + but not in kubectl get nodes; if so it may be because the machine has not been registered with + the Kubernetes API Server yet. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: The properties of the machine. + :vartype properties: ~azure.mgmt.containerservice.models.MachineProperties + :ivar zones: The Availability zone in which machine is located. + :vartype zones: list[str] + """ + + properties: Optional["_models.MachineProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the machine.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The Availability zone in which machine is located.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.MachineProperties"] = None, + zones: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineBillingProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The properties having to do with machine billing. + + :ivar spot_max_price: The max price (in US Dollars) you are willing to pay for spot instances. + Possible values are any decimal value greater than zero or -1 which indicates default price to + be up-to on-demand. For more details on spot pricing, see `spot VMs pricing + `_. + :vartype spot_max_price: float + """ + + spot_max_price: Optional[float] = rest_field( + name="spotMaxPrice", visibility=["read", "create", "update", "delete", "query"] + ) + """The max price (in US Dollars) you are willing to pay for spot instances. Possible values are + any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + For more details on spot pricing, see `spot VMs pricing + `_.""" + + @overload + def __init__( + self, + *, + spot_max_price: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineHardwareProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The hardware and GPU settings of the machine. + + :ivar vm_size: The size of the VM. VM size availability varies by region. If a node contains + insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more + details on restricted VM sizes, see: `https://docs.microsoft.com/azure/aks/quotas-skus-regions + `_. + :vartype vm_size: str + :ivar gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpu_instance_profile: str or ~azure.mgmt.containerservice.models.GPUInstanceProfile + :ivar gpu_profile: The GPU settings of the machine. + :vartype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile + :ivar ultra_ssd_enabled: Whether to enable UltraSSD. + :vartype ultra_ssd_enabled: bool + """ + + vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"]) + """The size of the VM. VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: `https://docs.microsoft.com/azure/aks/quotas-skus-regions + `_.""" + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = rest_field( + name="gpuInstanceProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + Known values are: \"MIG1g\", \"MIG2g\", \"MIG3g\", \"MIG4g\", and \"MIG7g\".""" + gpu_profile: Optional["_models.GPUProfile"] = rest_field( + name="gpuProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """The GPU settings of the machine.""" + ultra_ssd_enabled: Optional[bool] = rest_field( + name="ultraSsdEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable UltraSSD.""" + + @overload + def __init__( + self, + *, + vm_size: Optional[str] = None, + gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, + gpu_profile: Optional["_models.GPUProfile"] = None, + ultra_ssd_enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineIpAddress(_Model): + """The machine IP address details. + + :ivar family: To determine if address belongs IPv4 or IPv6 family. Known values are: "IPv4" and + "IPv6". + :vartype family: str or ~azure.mgmt.containerservice.models.IPFamily + :ivar ip: IPv4 or IPv6 address of the machine. + :vartype ip: str + """ + + family: Optional[Union[str, "_models.IPFamily"]] = rest_field(visibility=["read"]) + """To determine if address belongs IPv4 or IPv6 family. Known values are: \"IPv4\" and \"IPv6\".""" + ip: Optional[str] = rest_field(visibility=["read"]) + """IPv4 or IPv6 address of the machine.""" + + +class MachineKubernetesProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The Kubernetes configurations used by the machine. + + :ivar node_labels: The node labels on the machine. + :vartype node_labels: dict[str, str] + :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version + and are supported. When is specified, the + latest supported patch version is chosen automatically. + :vartype orchestrator_version: str + :ivar current_orchestrator_version: The version of Kubernetes running on the machine. If + orchestratorVersion was a fully specified version , this field will be + exactly equal to it. If orchestratorVersion was , this field will contain the full + version being used. + :vartype current_orchestrator_version: str + :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType + :ivar kubelet_config: The Kubelet configuration on the machine. + :vartype kubelet_config: ~azure.mgmt.containerservice.models.KubeletConfig + :ivar node_initialization_taints: Taints added on the node during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. These taints allow for required configuration to run before the node is ready to accept + workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint + nodes node1 key1=value1:NoSchedule-``. + :vartype node_initialization_taints: list[str] + :ivar node_taints: The taints added to new node during machine create. For example, + key=value:NoSchedule. + :vartype node_taints: list[str] + :ivar max_pods: The maximum number of pods that can run on a node. + :vartype max_pods: int + :ivar node_name: The node name in the Kubernetes cluster. + :vartype node_name: str + :ivar workload_runtime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime + :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. + :vartype artifact_streaming_profile: + ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + """ + + node_labels: Optional[dict[str, str]] = rest_field( + name="nodeLabels", visibility=["read", "create", "update", "delete", "query"] + ) + """The node labels on the machine.""" + orchestrator_version: Optional[str] = rest_field( + name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of Kubernetes specified by the user. Both patch version and + are supported. When is specified, the latest supported patch + version is chosen automatically.""" + current_orchestrator_version: Optional[str] = rest_field(name="currentOrchestratorVersion", visibility=["read"]) + """The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified + version , this field will be exactly equal to it. If orchestratorVersion was + , this field will contain the full version being used.""" + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = rest_field( + name="kubeletDiskType", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet + ephemeral storage. Known values are: \"OS\" and \"Temporary\".""" + kubelet_config: Optional["_models.KubeletConfig"] = rest_field( + name="kubeletConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """The Kubelet configuration on the machine.""" + node_initialization_taints: Optional[list[str]] = rest_field( + name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] + ) + """Taints added on the node during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" + node_taints: Optional[list[str]] = rest_field( + name="nodeTaints", visibility=["read", "create", "update", "delete", "query"] + ) + """The taints added to new node during machine create. For example, key=value:NoSchedule.""" + max_pods: Optional[int] = rest_field(name="maxPods", visibility=["read", "create", "update", "delete", "query"]) + """The maximum number of pods that can run on a node.""" + node_name: Optional[str] = rest_field(name="nodeName", visibility=["read"]) + """The node name in the Kubernetes cluster.""" + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = rest_field( + name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines the type of workload a node can run. Known values are: \"OCIContainer\", + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" + artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = rest_field( + name="artifactStreamingProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration for using artifact streaming on AKS.""" + + @overload + def __init__( + self, + *, + node_labels: Optional[dict[str, str]] = None, + orchestrator_version: Optional[str] = None, + kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, + kubelet_config: Optional["_models.KubeletConfig"] = None, + node_initialization_taints: Optional[list[str]] = None, + node_taints: Optional[list[str]] = None, + max_pods: Optional[int] = None, + workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, + artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineNetworkProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """network properties of the machine. + + :ivar ip_addresses: IPv4, IPv6 addresses of the machine. + :vartype ip_addresses: list[~azure.mgmt.containerservice.models.MachineIpAddress] + :ivar vnet_subnet_id: The ID of the subnet which node and optionally pods will join on startup. + If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the + form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnet_subnet_id: str + :ivar pod_subnet_id: The ID of the subnet which pods will join when launched. If omitted, pod + IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of + the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype pod_subnet_id: str + :ivar enable_node_public_ip: Whether the machine is allocated its own public IP. Some scenarios + may require the machine to receive their own dedicated public IP addresses. A common scenario + is for gaming workloads, where a console needs to make a direct connection to a cloud virtual + machine to minimize hops. The default is false. + :vartype enable_node_public_ip: bool + :ivar node_public_ip_prefix_id: The public IP prefix ID which VM node should use IPs from. This + is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype node_public_ip_prefix_id: str + :ivar node_public_ip_tags: IPTags of instance-level public IPs. + :vartype node_public_ip_tags: list[~azure.mgmt.containerservice.models.IPTag] + """ + + ip_addresses: Optional[list["_models.MachineIpAddress"]] = rest_field(name="ipAddresses", visibility=["read"]) + """IPv4, IPv6 addresses of the machine.""" + vnet_subnet_id: Optional[str] = rest_field( + name="vnetSubnetID", visibility=["read", "create", "update", "delete", "query"] + ) + """The ID of the subnet which node and optionally pods will join on startup. If this is not + specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.""" + pod_subnet_id: Optional[str] = rest_field( + name="podSubnetID", visibility=["read", "create", "update", "delete", "query"] + ) + """The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically + assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.""" + enable_node_public_ip: Optional[bool] = rest_field( + name="enableNodePublicIP", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the machine is allocated its own public IP. Some scenarios may require the machine to + receive their own dedicated public IP addresses. A common scenario is for gaming workloads, + where a console needs to make a direct connection to a cloud virtual machine to minimize hops. + The default is false.""" + node_public_ip_prefix_id: Optional[str] = rest_field( + name="nodePublicIPPrefixID", visibility=["read", "create", "update", "delete", "query"] + ) + """The public IP prefix ID which VM node should use IPs from. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.""" + node_public_ip_tags: Optional[list["_models.IPTag"]] = rest_field( + name="nodePublicIPTags", visibility=["read", "create", "update", "delete", "query"] + ) + """IPTags of instance-level public IPs.""" + + @overload + def __init__( + self, + *, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + node_public_ip_tags: Optional[list["_models.IPTag"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineOSProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The operating system and disk used by the machine. + + :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype os_type: str or ~azure.mgmt.containerservice.models.OSType + :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "AzureLinux", "AzureLinux3", "Mariner", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", + "Ubuntu2204", "Windows2025", "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and + "Ubuntu2604". + :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU + :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine + in the master/agent pool. If you specify 0, it will apply the default osDisk size according to + the vmSize specified. + :vartype os_disk_size_gb: int + :ivar os_disk_type: The OS disk type to be used for machines in the agent pool. The default is + 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see + `Ephemeral OS `_. + Known values are: "Managed" and "Ephemeral". + :vartype os_disk_type: str or ~azure.mgmt.containerservice.models.OSDiskType + :ivar enable_fips: Whether to use a FIPS-enabled OS. + :vartype enable_fips: bool + :ivar linux_profile: The Linux machine's specific profile. + :vartype linux_profile: ~azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile + :ivar windows_profile: The Windows machine's specific profile. + :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile + """ + + os_type: Optional[Union[str, "_models.OSType"]] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) + """The operating system type. The default is Linux. Known values are: \"Linux\" and \"Windows\".""" + os_sku: Optional[Union[str, "_models.OSSKU"]] = rest_field( + name="osSKU", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to + Windows2022 after Windows2019 is deprecated. Known values are: \"Ubuntu\", \"AzureLinux\", + \"AzureLinux3\", \"Mariner\", \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", + \"Ubuntu2204\", \"Windows2025\", \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", + and \"Ubuntu2604\".""" + os_disk_size_gb: Optional[int] = rest_field( + name="osDiskSizeGB", visibility=["read", "create", "update", "delete", "query"] + ) + """OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent + pool. If you specify 0, it will apply the default osDisk size according to the vmSize + specified.""" + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = rest_field( + name="osDiskType", visibility=["read", "create", "update", "delete", "query"] + ) + """The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the + VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. For more information see `Ephemeral OS + `_. Known values are: + \"Managed\" and \"Ephemeral\".""" + enable_fips: Optional[bool] = rest_field( + name="enableFIPS", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to use a FIPS-enabled OS.""" + linux_profile: Optional["_models.MachineOSProfileLinuxProfile"] = rest_field( + name="linuxProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """The Linux machine's specific profile.""" + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = rest_field( + name="windowsProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """The Windows machine's specific profile.""" + + @overload + def __init__( + self, + *, + os_type: Optional[Union[str, "_models.OSType"]] = None, + os_sku: Optional[Union[str, "_models.OSSKU"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, + enable_fips: Optional[bool] = None, + linux_profile: Optional["_models.MachineOSProfileLinuxProfile"] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineOSProfileLinuxProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The Linux machine's specific profile. + + :ivar linux_os_config: The OS configuration of Linux machine. + :vartype linux_os_config: ~azure.mgmt.containerservice.models.LinuxOSConfig + :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded + string which will be written to /etc/motd after decoding. This allows customization of the + message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a + static string (i.e., will be printed raw and not be executed as a script). + :vartype message_of_the_day: str + """ + + linux_os_config: Optional["_models.LinuxOSConfig"] = rest_field( + name="linuxOSConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """The OS configuration of Linux machine.""" + message_of_the_day: Optional[str] = rest_field( + name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] + ) + """Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be + written to /etc/motd after decoding. This allows customization of the message of the day for + Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will + be printed raw and not be executed as a script).""" + + @overload + def __init__( + self, + *, + linux_os_config: Optional["_models.LinuxOSConfig"] = None, + message_of_the_day: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MachineProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The properties of the machine. + + :ivar network: network properties of the machine. + :vartype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties + :ivar resource_id: Azure resource id of the machine. It can be used to GET underlying VM + Instance. + :vartype resource_id: str + :ivar hardware: The hardware and GPU settings of the machine. + :vartype hardware: ~azure.mgmt.containerservice.models.MachineHardwareProfile + :ivar operating_system: The operating system and disk used by the machine. + :vartype operating_system: ~azure.mgmt.containerservice.models.MachineOSProfile + :ivar kubernetes: The Kubernetes configurations used by the machine. + :vartype kubernetes: ~azure.mgmt.containerservice.models.MachineKubernetesProfile + :ivar mode: Machine only allows 'System' and 'User' mode. Known values are: "System", "User", + "Gateway", "ManagedSystem", and "Machines". + :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode + :ivar security: The security settings of the machine. + :vartype security: ~azure.mgmt.containerservice.models.MachineSecurityProfile + :ivar priority: The priority for the machine. If not specified, the default is 'Regular'. Known + values are: "Spot" and "Regular". + :vartype priority: str or ~azure.mgmt.containerservice.models.ScaleSetPriority + :ivar eviction_policy: The eviction policy for machine. This cannot be specified unless the + priority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and + "Deallocate". + :vartype eviction_policy: str or ~azure.mgmt.containerservice.models.ScaleSetEvictionPolicy + :ivar billing: The properties having to do with machine billing. + :vartype billing: ~azure.mgmt.containerservice.models.MachineBillingProfile + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :ivar tags: The tags to be persisted on the machine. + :vartype tags: dict[str, str] + :ivar e_tag: Unique read-only string used to implement optimistic concurrency. The eTag value + will change when the resource is updated. Specify an if-match or if-none-match header with the + eTag value for a subsequent request to enable optimistic concurrency per the normal eTag + convention. + :vartype e_tag: str + :ivar status: Contains read-only information about the machine. + :vartype status: ~azure.mgmt.containerservice.models.MachineStatus + :ivar local_dns_profile: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. + LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For + more details see aka.ms/aks/localdns. + :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile + :ivar capacity_reservation: The Capacity Reservation Group to provide virtual machines from a + reserved group of Machines. + :vartype capacity_reservation: ~azure.mgmt.containerservice.models.CapacityReservation + """ + + network: Optional["_models.MachineNetworkProperties"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and - \"Disabled\".""" - state: Optional[Union[str, "_models.LocalDNSState"]] = rest_field(visibility=["read"]) - """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" - vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( - name="vnetDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + """network properties of the machine.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Azure resource id of the machine. It can be used to GET underlying VM Instance.""" + hardware: Optional["_models.MachineHardwareProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The hardware and GPU settings of the machine.""" + operating_system: Optional["_models.MachineOSProfile"] = rest_field( + name="operatingSystem", visibility=["read", "create", "update", "delete", "query"] + ) + """The operating system and disk used by the machine.""" + kubernetes: Optional["_models.MachineKubernetesProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Kubernetes configurations used by the machine.""" + mode: Optional[Union[str, "_models.AgentPoolMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Machine only allows 'System' and 'User' mode. Known values are: \"System\", \"User\", + \"Gateway\", \"ManagedSystem\", and \"Machines\".""" + security: Optional["_models.MachineSecurityProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The security settings of the machine.""" + priority: Optional[Union[str, "_models.ScaleSetPriority"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The priority for the machine. If not specified, the default is 'Regular'. Known values are: + \"Spot\" and \"Regular\".""" + eviction_policy: Optional[Union[str, "_models.ScaleSetEvictionPolicy"]] = rest_field( + name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The eviction policy for machine. This cannot be specified unless the priority is 'Spot'. If not + specified, the default is 'Delete'. Known values are: \"Delete\" and \"Deallocate\".""" + billing: Optional["_models.MachineBillingProfile"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties having to do with machine billing.""" + node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) + """The version of node image.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The current deployment or provisioning state.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The tags to be persisted on the machine.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) + """Unique read-only string used to implement optimistic concurrency. The eTag value will change + when the resource is updated. Specify an if-match or if-none-match header with the eTag value + for a subsequent request to enable optimistic concurrency per the normal eTag convention.""" + status: Optional["_models.MachineStatus"] = rest_field(visibility=["read"]) + """Contains read-only information about the machine.""" + local_dns_profile: Optional["_models.LocalDNSProfile"] = rest_field( + name="localDNSProfile", visibility=["read", "create", "update", "delete", "query"] ) - """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to - as VnetDNS traffic).""" - kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( - name="kubeDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve + performance and reliability of DNS resolution in an AKS cluster. For more details see + aka.ms/aks/localdns.""" + capacity_reservation: Optional["_models.CapacityReservation"] = rest_field( + name="capacityReservation", visibility=["read", "create", "update", "delete", "query"] ) - """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as - KubeDNS traffic).""" + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines.""" @overload def __init__( self, *, - mode: Optional[Union[str, "_models.LocalDNSMode"]] = None, - vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, - kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, + network: Optional["_models.MachineNetworkProperties"] = None, + hardware: Optional["_models.MachineHardwareProfile"] = None, + operating_system: Optional["_models.MachineOSProfile"] = None, + kubernetes: Optional["_models.MachineKubernetesProfile"] = None, + mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, + security: Optional["_models.MachineSecurityProfile"] = None, + priority: Optional[Union[str, "_models.ScaleSetPriority"]] = None, + eviction_policy: Optional[Union[str, "_models.ScaleSetEvictionPolicy"]] = None, + billing: Optional["_models.MachineBillingProfile"] = None, + tags: Optional[dict[str, str]] = None, + local_dns_profile: Optional["_models.LocalDNSProfile"] = None, + capacity_reservation: Optional["_models.CapacityReservation"] = None, ) -> None: ... @overload @@ -3578,40 +6324,60 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Machine(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only - """A machine. Contains details about the underlying virtual machine. A machine may be visible here - but not in kubectl get nodes; if so it may be because the machine has not been registered with - the Kubernetes API Server yet. +class MachineSecurityProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The security settings of the machine. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.containerservice.models.SystemData - :ivar properties: The properties of the machine. - :vartype properties: ~azure.mgmt.containerservice.models.MachineProperties - :ivar zones: The Availability zone in which machine is located. - :vartype zones: list[str] + :ivar enable_vtpm: vTPM is a Trusted Launch feature for configuring a dedicated secure vault + for keys and measurements held locally on the node. For more details, see + aka.ms/aks/trustedlaunch. If not specified, the default is false. + :vartype enable_vtpm: bool + :ivar enable_secure_boot: Secure Boot is a feature of Trusted Launch which ensures that only + signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. + If not specified, the default is false. + :vartype enable_secure_boot: bool + :ivar ssh_access: SSH access method of an agent pool. Known values are: "LocalUser", + "Disabled", and "EntraId". + :vartype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess + :ivar enable_encryption_at_host: Whether to enable host based OS and data drive encryption. + This is only supported on certain VM sizes and in certain Azure regions. For more information, + see: `https://docs.microsoft.com/azure/aks/enable-host-encryption + `_. + :vartype enable_encryption_at_host: bool """ - properties: Optional["_models.MachineProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + enable_vtpm: Optional[bool] = rest_field( + name="enableVTPM", visibility=["read", "create", "update", "delete", "query"] ) - """The properties of the machine.""" - zones: Optional[list[str]] = rest_field(visibility=["read"]) - """The Availability zone in which machine is located.""" + """vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and + measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not + specified, the default is false.""" + enable_secure_boot: Optional[bool] = rest_field( + name="enableSecureBoot", visibility=["read", "create", "update", "delete", "query"] + ) + """Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and + drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + default is false.""" + ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = rest_field( + name="sshAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """SSH access method of an agent pool. Known values are: \"LocalUser\", \"Disabled\", and + \"EntraId\".""" + enable_encryption_at_host: Optional[bool] = rest_field( + name="enableEncryptionAtHost", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable host based OS and data drive encryption. This is only supported on certain VM + sizes and in certain Azure regions. For more information, see: + `https://docs.microsoft.com/azure/aks/enable-host-encryption + `_.""" @overload def __init__( self, *, - properties: Optional["_models.MachineProperties"] = None, + enable_vtpm: Optional[bool] = None, + enable_secure_boot: Optional[bool] = None, + ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = None, + enable_encryption_at_host: Optional[bool] = None, ) -> None: ... @overload @@ -3625,47 +6391,43 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MachineIpAddress(_Model): - """The machine IP address details. - - :ivar family: To determine if address belongs IPv4 or IPv6 family. Known values are: "IPv4" and - "IPv6". - :vartype family: str or ~azure.mgmt.containerservice.models.IPFamily - :ivar ip: IPv4 or IPv6 address of the machine. - :vartype ip: str - """ - - family: Optional[Union[str, "_models.IPFamily"]] = rest_field(visibility=["read"]) - """To determine if address belongs IPv4 or IPv6 family. Known values are: \"IPv4\" and \"IPv6\".""" - ip: Optional[str] = rest_field(visibility=["read"]) - """IPv4 or IPv6 address of the machine.""" - - -class MachineNetworkProperties(_Model): - """network properties of the machine. - - :ivar ip_addresses: IPv4, IPv6 addresses of the machine. - :vartype ip_addresses: list[~azure.mgmt.containerservice.models.MachineIpAddress] - """ - - ip_addresses: Optional[list["_models.MachineIpAddress"]] = rest_field(name="ipAddresses", visibility=["read"]) - """IPv4, IPv6 addresses of the machine.""" - - -class MachineProperties(_Model): - """The properties of the machine. +class MachineStatus(_Model): + """Contains read-only information about the machine. - :ivar network: network properties of the machine. - :vartype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties - :ivar resource_id: Azure resource id of the machine. It can be used to GET underlying VM - Instance. - :vartype resource_id: str + :ivar provisioning_error: The error details information of the machine. Preserves the detailed + info of failure. If there was no error, this field is omitted. + :vartype provisioning_error: ~azure.mgmt.containerservice.models.ErrorDetail + :ivar creation_timestamp: Specifies the time at which the machine was created. + :vartype creation_timestamp: ~datetime.datetime + :ivar drift_action: The drift action of the machine. Indicates whether a machine has deviated + from its expected state due to changes in managed cluster properties, requiring corrective + action. Known values are: "Synced" and "Recreate". + :vartype drift_action: str or ~azure.mgmt.containerservice.models.DriftAction + :ivar drift_reason: Reason for machine drift. Provides detailed information on why the machine + has drifted. This field is omitted if the machine is up to date. + :vartype drift_reason: str + :ivar vm_state: Virtual machine state. Indicates the current state of the underlying virtual + machine. Known values are: "Running" and "Deleted". + :vartype vm_state: str or ~azure.mgmt.containerservice.models.VmState """ - network: Optional["_models.MachineNetworkProperties"] = rest_field(visibility=["read"]) - """network properties of the machine.""" - resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) - """Azure resource id of the machine. It can be used to GET underlying VM Instance.""" + provisioning_error: Optional["_models.ErrorDetail"] = rest_field(name="provisioningError", visibility=["read"]) + """The error details information of the machine. Preserves the detailed info of failure. If there + was no error, this field is omitted.""" + creation_timestamp: Optional[datetime.datetime] = rest_field( + name="creationTimestamp", visibility=["read"], format="rfc3339" + ) + """Specifies the time at which the machine was created.""" + drift_action: Optional[Union[str, "_models.DriftAction"]] = rest_field(name="driftAction", visibility=["read"]) + """The drift action of the machine. Indicates whether a machine has deviated from its expected + state due to changes in managed cluster properties, requiring corrective action. Known values + are: \"Synced\" and \"Recreate\".""" + drift_reason: Optional[str] = rest_field(name="driftReason", visibility=["read"]) + """Reason for machine drift. Provides detailed information on why the machine has drifted. This + field is omitted if the machine is up to date.""" + vm_state: Optional[Union[str, "_models.VmState"]] = rest_field(name="vmState", visibility=["read"]) + """Virtual machine state. Indicates the current state of the underlying virtual machine. Known + values are: \"Running\" and \"Deleted\".""" class MaintenanceConfiguration(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only @@ -3693,7 +6455,7 @@ class MaintenanceConfiguration(ProxyResource): # pylint: disable=docstring-keyw ) """Properties of a default maintenance configuration.""" - __flattened_items = ["time_in_week", "not_allowed_time", "maintenance_window"] + __flattened_items = ["time_in_week", "not_allowed_time", "maintenance_window_id", "maintenance_window"] @overload def __init__( @@ -3740,6 +6502,12 @@ class MaintenanceConfigurationProperties(_Model): # pylint: disable=docstring-k :vartype time_in_week: list[~azure.mgmt.containerservice.models.TimeInWeek] :ivar not_allowed_time: Time slots on which upgrade is not allowed. :vartype not_allowed_time: list[~azure.mgmt.containerservice.models.TimeSpan] + :ivar maintenance_window_id: The fully qualified resource ID of the maintenance window that + this maintenance configuration is linked to. When set, the schedule is derived read-only from + the linked maintenance window — maintenanceWindow becomes a computed field. When absent (the + default), the schedule is defined inline via the maintenanceWindow property. The caller must + have read access to the target maintenance window. + :vartype maintenance_window_id: str :ivar maintenance_window: Maintenance window for the maintenance configuration. :vartype maintenance_window: ~azure.mgmt.containerservice.models.MaintenanceWindow """ @@ -3754,6 +6522,14 @@ class MaintenanceConfigurationProperties(_Model): # pylint: disable=docstring-k name="notAllowedTime", visibility=["read", "create", "update", "delete", "query"] ) """Time slots on which upgrade is not allowed.""" + maintenance_window_id: Optional[str] = rest_field( + name="maintenanceWindowId", visibility=["read", "create", "update", "delete", "query"] + ) + """The fully qualified resource ID of the maintenance window that this maintenance configuration + is linked to. When set, the schedule is derived read-only from the linked maintenance window — + maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined + inline via the maintenanceWindow property. The caller must have read access to the target + maintenance window.""" maintenance_window: Optional["_models.MaintenanceWindow"] = rest_field( name="maintenanceWindow", visibility=["read", "create", "update", "delete", "query"] ) @@ -3765,6 +6541,7 @@ def __init__( *, time_in_week: Optional[list["_models.TimeInWeek"]] = None, not_allowed_time: Optional[list["_models.TimeSpan"]] = None, + maintenance_window_id: Optional[str] = None, maintenance_window: Optional["_models.MaintenanceWindow"] = None, ) -> None: ... @@ -3895,6 +6672,147 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class MaintenanceWindowResource(TrackedResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """A maintenance window is a resource-group-scoped resource that defines a reusable maintenance + schedule which can be linked to maintenance configurations on one or more managed clusters. For + more information, see `https://aka.ms/aks/maintenance-windows + `_. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of a maintenance window. + :vartype properties: ~azure.mgmt.containerservice.models.MaintenanceWindowResourceProperties + """ + + properties: Optional["_models.MaintenanceWindowResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of a maintenance window.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.MaintenanceWindowResourceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MaintenanceWindowResourceProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Properties of a maintenance window. For more information, see + `https://aka.ms/aks/maintenance-windows `_. + + :ivar provisioning_state: The provisioning state of the maintenance window. Known values are: + "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.models.ResourceProvisioningState + :ivar schedule: Recurrence schedule for the maintenance window. One and only one of the + schedule types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. + Required. + :vartype schedule: ~azure.mgmt.containerservice.models.Schedule + :ivar start_date: The date the maintenance window activates. If the current date is before this + date, the maintenance window is inactive and will not be used. If not specified, the + maintenance window will be active right away. + :vartype start_date: ~datetime.date + :ivar start_time: The start time of the maintenance window. Accepted values are from '00:00' to + '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means + UTC time '00:00'. Required. + :vartype start_time: str + :ivar duration_hours: Length of the maintenance window in hours. Required. + :vartype duration_hours: int + :ivar utc_offset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + for PST. If not specified, the default is '+00:00'. Note: this is a static offset and does not + adjust for Daylight Saving Time. Customers in DST-observing regions should pick the offset that + matches their preferred wall-clock time year-round; the maintenance window will shift by one + hour relative to local time when DST starts or ends. + :vartype utc_offset: str + :ivar not_allowed_dates: Date ranges during which maintenance is not allowed. 'utcOffset' + applies to these dates. For example, with 'utcOffset: +02:00' and a date span of '2026-12-23' + to '2027-01-03', maintenance will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in + UTC time. + :vartype not_allowed_dates: list[~azure.mgmt.containerservice.models.DateSpan] + """ + + provisioning_state: Optional[Union[str, "_models.ResourceProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state of the maintenance window. Known values are: \"Succeeded\", \"Failed\", + and \"Canceled\".""" + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Recurrence schedule for the maintenance window. One and only one of the schedule types should + be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. Required.""" + start_date: Optional[datetime.date] = rest_field( + name="startDate", visibility=["read", "create", "update", "delete", "query"] + ) + """The date the maintenance window activates. If the current date is before this date, the + maintenance window is inactive and will not be used. If not specified, the maintenance window + will be active right away.""" + start_time: str = rest_field(name="startTime", visibility=["read", "create", "update", "delete", "query"]) + """The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. + 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time + '00:00'. Required.""" + duration_hours: int = rest_field(name="durationHours", visibility=["read", "create", "update", "delete", "query"]) + """Length of the maintenance window in hours. Required.""" + utc_offset: Optional[str] = rest_field(name="utcOffset", visibility=["read", "create", "update", "delete", "query"]) + """The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not + specified, the default is '+00:00'. Note: this is a static offset and does not adjust for + Daylight Saving Time. Customers in DST-observing regions should pick the offset that matches + their preferred wall-clock time year-round; the maintenance window will shift by one hour + relative to local time when DST starts or ends.""" + not_allowed_dates: Optional[list["_models.DateSpan"]] = rest_field( + name="notAllowedDates", visibility=["read", "create", "update", "delete", "query"] + ) + """Date ranges during which maintenance is not allowed. 'utcOffset' applies to these dates. For + example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to '2027-01-03', maintenance + will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time.""" + + @overload + def __init__( + self, + *, + schedule: "_models.Schedule", + start_time: str, + duration_hours: int, + start_date: Optional[datetime.date] = None, + utc_offset: Optional[str] = None, + not_allowed_dates: Optional[list["_models.DateSpan"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ManagedCluster(TrackedResource): # pylint: disable=docstring-keyword-should-match-keyword-only """Managed cluster. @@ -3956,6 +6874,7 @@ class ManagedCluster(TrackedResource): # pylint: disable=docstring-keyword-shou __flattened_items = [ "provisioning_state", "power_state", + "creation_data", "max_agent_pools", "kubernetes_version", "current_kubernetes_version", @@ -3975,6 +6894,9 @@ class ManagedCluster(TrackedResource): # pylint: disable=docstring-keyword-shou "node_resource_group_profile", "enable_rbac", "support_plan", + "enable_fips", + "enable_node_hardening", + "enable_namespace_resources", "network_profile", "aad_profile", "auto_upgrade_profile", @@ -4000,6 +6922,9 @@ class ManagedCluster(TrackedResource): # pylint: disable=docstring-keyword-shou "ai_toolchain_operator_profile", "scheduler_profile", "hosted_system_profile", + "health_monitor_profile", + "control_plane_scaling_profile", + "node_disruption_profile", "status", ] @@ -4330,7 +7255,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -4359,9 +7284,9 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst :vartype os_type: str or ~azure.mgmt.containerservice.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -4374,13 +7299,13 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst are: "Delete" and "Deallocate". :vartype scale_down_mode: str or ~azure.mgmt.containerservice.models.ScaleDownMode :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", - "AvailabilitySet", and "VirtualMachines". + "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -4401,8 +7326,19 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst :ivar node_image_version: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype node_image_version: str + :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is + Rolling. Known values are: "Rolling" and "BlueGreen". + :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy + :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. + When this feature is enabled, the entire operating system will be locally cached on the + ephemeral OS disk, preventing E17 events caused by network failures. + :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings + :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies + when upgrade strategy is set to BlueGreen. + :vartype upgrade_settings_blue_green: + ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -4447,6 +7383,14 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst :ivar node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype node_taints: list[str] + :ivar node_initialization_taints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype node_initialization_taints: list[str] :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -4510,6 +7454,10 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile + :ivar prepared_image_specification_profile: Settings to determine the prepared image + specification used to provision nodes in a pool. + :vartype prepared_image_specification_profile: + ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile """ e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) @@ -4548,7 +7496,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] ) """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", and \"KataVmIsolation\".""" + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" message_of_the_day: Optional[str] = rest_field( name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] ) @@ -4586,9 +7534,9 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst ) """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) """The maximum number of nodes for auto-scaling.""" min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) @@ -4606,8 +7554,8 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst type: Optional[Union[str, "_models.AgentPoolType"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", and - \"VirtualMachines\".""" + """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", + \"VirtualMachines\", and \"FlexNodes\".""" mode: Optional[Union[str, "_models.AgentPoolMode"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -4615,7 +7563,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", and \"Gateway\".""" + \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" orchestrator_version: Optional[str] = rest_field( name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] ) @@ -4639,10 +7587,26 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst ) """The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed.""" + upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = rest_field( + name="upgradeStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: + \"Rolling\" and \"BlueGreen\".""" + enable_os_disk_full_caching: Optional[bool] = rest_field( + name="enableOSDiskFullCaching", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the + entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events + caused by network failures.""" upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = rest_field( name="upgradeSettings", visibility=["read", "create", "update", "delete", "query"] ) """Settings for upgrading the agentpool.""" + upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = rest_field( + name="upgradeSettingsBlueGreen", visibility=["read", "create", "update", "delete", "query"] + ) + """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to + BlueGreen.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """The current deployment or provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field( @@ -4701,6 +7665,16 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst ) """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" + node_initialization_taints: Optional[list[str]] = rest_field( + name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] + ) + """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + after node pool is created, but nodes will not be recreated with new taints until another + operation that requires recreation (e.g. node image upgrade) happens. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" proximity_placement_group_id: Optional[str] = rest_field( name="proximityPlacementGroupID", visibility=["read", "create", "update", "delete", "query"] ) @@ -4798,6 +7772,10 @@ class ManagedClusterAgentPoolProfileProperties(_Model): # pylint: disable=docst """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" + prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = rest_field( + name="preparedImageSpecificationProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Settings to determine the prepared image specification used to provision nodes in a pool.""" @overload def __init__( # pylint: disable=too-many-locals @@ -4824,7 +7802,10 @@ def __init__( # pylint: disable=too-many-locals mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, node_image_version: Optional[str] = None, + upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, + enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -4835,6 +7816,7 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[dict[str, str]] = None, node_labels: Optional[dict[str, str]] = None, node_taints: Optional[list[str]] = None, + node_initialization_taints: Optional[list[str]] = None, proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, @@ -4855,6 +7837,7 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, + prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, ) -> None: ... @overload @@ -4902,7 +7885,7 @@ class ManagedClusterAgentPoolProfile( root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -4931,9 +7914,9 @@ class ManagedClusterAgentPoolProfile( :vartype os_type: str or ~azure.mgmt.containerservice.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -4946,13 +7929,13 @@ class ManagedClusterAgentPoolProfile( are: "Delete" and "Deallocate". :vartype scale_down_mode: str or ~azure.mgmt.containerservice.models.ScaleDownMode :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", - "AvailabilitySet", and "VirtualMachines". + "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -4973,8 +7956,19 @@ class ManagedClusterAgentPoolProfile( :ivar node_image_version: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype node_image_version: str + :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is + Rolling. Known values are: "Rolling" and "BlueGreen". + :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy + :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. + When this feature is enabled, the entire operating system will be locally cached on the + ephemeral OS disk, preventing E17 events caused by network failures. + :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings + :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies + when upgrade strategy is set to BlueGreen. + :vartype upgrade_settings_blue_green: + ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -5019,6 +8013,14 @@ class ManagedClusterAgentPoolProfile( :ivar node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype node_taints: list[str] + :ivar node_initialization_taints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype node_initialization_taints: list[str] :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -5082,6 +8084,10 @@ class ManagedClusterAgentPoolProfile( LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile + :ivar prepared_image_specification_profile: Settings to determine the prepared image + specification used to provision nodes in a pool. + :vartype prepared_image_specification_profile: + ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile :ivar name: Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less. Required. :vartype name: str @@ -5117,7 +8123,10 @@ def __init__( # pylint: disable=too-many-locals mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, node_image_version: Optional[str] = None, + upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, + enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, + upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -5128,6 +8137,7 @@ def __init__( # pylint: disable=too-many-locals tags: Optional[dict[str, str]] = None, node_labels: Optional[dict[str, str]] = None, node_taints: Optional[list[str]] = None, + node_initialization_taints: Optional[list[str]] = None, proximity_placement_group_id: Optional[str] = None, kubelet_config: Optional["_models.KubeletConfig"] = None, linux_os_config: Optional["_models.LinuxOSConfig"] = None, @@ -5148,6 +8158,7 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, + prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, ) -> None: ... @overload @@ -5881,8 +8892,47 @@ class ManagedClusterBootstrapProfile(_Model): # pylint: disable=docstring-keywo def __init__( self, *, - artifact_source: Optional[Union[str, "_models.ArtifactSource"]] = None, - container_registry_id: Optional[str] = None, + artifact_source: Optional[Union[str, "_models.ArtifactSource"]] = None, + container_registry_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedClusterControlPlaneScalingProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Profile for providing scaled and performance guaranteed control plane capacity to deliver + consistent performance under high workload. Requires Kubernetes version 1.33.0 or later. + + :ivar scaling_size: The scaling size of the control plane. Scaling sizes offer guaranteed + capacity and predictable Kubernetes performance beyond standard tier defaults. Higher H sizes + provide increased performance guarantees. See `https://aka.ms/aks/hyperscale + `_ for performance metrics details for each size. Required. + Known values are: "H2", "H4", and "H8". + :vartype scaling_size: str or ~azure.mgmt.containerservice.models.ControlPlaneScalingSize + """ + + scaling_size: Union[str, "_models.ControlPlaneScalingSize"] = rest_field( + name="scalingSize", visibility=["read", "create", "update", "delete", "query"] + ) + """The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable + Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased + performance guarantees. See `https://aka.ms/aks/hyperscale `_ + for performance metrics details for each size. Required. Known values are: \"H2\", \"H4\", and + \"H8\".""" + + @overload + def __init__( + self, + *, + scaling_size: Union[str, "_models.ControlPlaneScalingSize"], ) -> None: ... @overload @@ -5930,6 +8980,44 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ManagedClusterHealthMonitorProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Health monitor profile for the managed cluster. + + :ivar enable_continuous_control_plane_and_addon_monitor: Whether to enable continuous control + plane and addon monitor. + :vartype enable_continuous_control_plane_and_addon_monitor: bool + :ivar enable_on_demand_monitor: Whether to enable on-demand monitor. + :vartype enable_on_demand_monitor: bool + """ + + enable_continuous_control_plane_and_addon_monitor: Optional[bool] = rest_field( + name="enableContinuousControlPlaneAndAddonMonitor", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable continuous control plane and addon monitor.""" + enable_on_demand_monitor: Optional[bool] = rest_field( + name="enableOnDemandMonitor", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable on-demand monitor.""" + + @overload + def __init__( + self, + *, + enable_continuous_control_plane_and_addon_monitor: Optional[bool] = None, + enable_on_demand_monitor: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ManagedClusterHostedSystemProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Settings for hosted system addons. @@ -5997,6 +9085,9 @@ class ManagedClusterHTTPProxyConfig(_Model): # pylint: disable=docstring-keywor :vartype https_proxy: str :ivar no_proxy: The endpoints that should not go through proxy. :vartype no_proxy: list[str] + :ivar effective_no_proxy: A read-only list of all endpoints for which traffic should not be + sent to the proxy. This list is a superset of noProxy and values injected by AKS. + :vartype effective_no_proxy: list[str] :ivar trusted_ca: Alternative CA cert to use for connecting to proxy servers. :vartype trusted_ca: str :ivar enabled: Whether to enable HTTP proxy. If disabled, the specified proxy configuration @@ -6014,6 +9105,9 @@ class ManagedClusterHTTPProxyConfig(_Model): # pylint: disable=docstring-keywor name="noProxy", visibility=["read", "create", "update", "delete", "query"] ) """The endpoints that should not go through proxy.""" + effective_no_proxy: Optional[list[str]] = rest_field(name="effectiveNoProxy", visibility=["read"]) + """A read-only list of all endpoints for which traffic should not be sent to the proxy. This list + is a superset of noProxy and values injected by AKS.""" trusted_ca: Optional[str] = rest_field(name="trustedCa", visibility=["read", "create", "update", "delete", "query"]) """Alternative CA cert to use for connecting to proxy servers.""" enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -6113,6 +9207,42 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ManagedClusterIngressDefaultDomainProfile( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Default domain profile for the managed cluster ingress profile. + + :ivar enabled: Whether to enable Default Domain. + :vartype enabled: bool + :ivar domain_name: The unique fully qualified domain name assigned to the cluster. This will + not change even if disabled then reenabled. + :vartype domain_name: str + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether to enable Default Domain.""" + domain_name: Optional[str] = rest_field(name="domainName", visibility=["read"]) + """The unique fully qualified domain name assigned to the cluster. This will not change even if + disabled then reenabled.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ManagedClusterIngressProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Ingress profile for the container service cluster. @@ -6125,6 +9255,10 @@ class ManagedClusterIngressProfile(_Model): # pylint: disable=docstring-keyword :ivar gateway_api: Settings for the managed Gateway API installation. :vartype gateway_api: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration + :ivar application_load_balancer: Settings for the managed Application Load Balancer + installation. + :vartype application_load_balancer: + ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer """ web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = rest_field( @@ -6138,6 +9272,10 @@ class ManagedClusterIngressProfile(_Model): # pylint: disable=docstring-keyword name="gatewayAPI", visibility=["read", "create", "update", "delete", "query"] ) """Settings for the managed Gateway API installation.""" + application_load_balancer: Optional["_models.ManagedClusterIngressProfileApplicationLoadBalancer"] = rest_field( + name="applicationLoadBalancer", visibility=["read", "create", "update", "delete", "query"] + ) + """Settings for the managed Application Load Balancer installation.""" @overload def __init__( @@ -6145,6 +9283,44 @@ def __init__( *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, gateway_api: Optional["_models.ManagedClusterIngressProfileGatewayConfiguration"] = None, + application_load_balancer: Optional["_models.ManagedClusterIngressProfileApplicationLoadBalancer"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedClusterIngressProfileApplicationLoadBalancer( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Application Load Balancer settings for the ingress profile. + + :ivar enabled: Whether to enable Application Load Balancer. + :vartype enabled: bool + :ivar identity: Managed identity of the Application Load Balancer add-on. This is the identity + that should be granted permissions to manage the associated Application Gateway for Containers + resource. + :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether to enable Application Load Balancer.""" + identity: Optional["_models.UserAssignedIdentity"] = rest_field(visibility=["read"]) + """Managed identity of the Application Load Balancer add-on. This is the identity that should be + granted permissions to manage the associated Application Gateway for Containers resource.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, ) -> None: ... @overload @@ -6256,6 +9432,11 @@ class ManagedClusterIngressProfileWebAppRouting( `_ for more instructions. :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity + :ivar default_domain: Configuration for the Default Domain. This is a unique, autogenerated + domain that comes with a signed TLS Certificate allowing for secure HTTPS. See `the Default + Domain documentation `_ for more instructions. + :vartype default_domain: + ~azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile """ enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -6285,6 +9466,12 @@ class ManagedClusterIngressProfileWebAppRouting( Azure Key Vault. See `this overview of the add-on `_ for more instructions.""" + default_domain: Optional["_models.ManagedClusterIngressDefaultDomainProfile"] = rest_field( + name="defaultDomain", visibility=["read", "create", "update", "delete", "query"] + ) + """Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a + signed TLS Certificate allowing for secure HTTPS. See `the Default Domain documentation + `_ for more instructions.""" @overload def __init__( @@ -6294,6 +9481,7 @@ def __init__( gateway_api_implementations: Optional["_models.ManagedClusterWebAppRoutingGatewayAPIImplementations"] = None, dns_zone_resource_ids: Optional[list[str]] = None, nginx: Optional["_models.ManagedClusterIngressProfileNginx"] = None, + default_domain: Optional["_models.ManagedClusterIngressDefaultDomainProfile"] = None, ) -> None: ... @overload @@ -6333,8 +9521,12 @@ class ManagedClusterLoadBalancerProfile(_Model): # pylint: disable=docstring-ke cluster or not. :vartype enable_multiple_standard_load_balancers: bool :ivar backend_pool_type: The type of the managed inbound Load Balancer BackendPool. Known - values are: "NodeIPConfiguration" and "NodeIP". + values are: "NodeIPConfiguration", "NodeIP", and "PodIP". :vartype backend_pool_type: str or ~azure.mgmt.containerservice.models.BackendPoolType + :ivar cluster_service_load_balancer_health_probe_mode: The health probing behavior for External + Traffic Policy Cluster services. Known values are: "ServiceNodePort" and "Shared". + :vartype cluster_service_load_balancer_health_probe_mode: str or + ~azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode """ managed_outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = rest_field( @@ -6371,7 +9563,14 @@ class ManagedClusterLoadBalancerProfile(_Model): # pylint: disable=docstring-ke name="backendPoolType", visibility=["read", "create", "update", "delete", "query"] ) """The type of the managed inbound Load Balancer BackendPool. Known values are: - \"NodeIPConfiguration\" and \"NodeIP\".""" + \"NodeIPConfiguration\", \"NodeIP\", and \"PodIP\".""" + cluster_service_load_balancer_health_probe_mode: Optional[ + Union[str, "_models.ClusterServiceLoadBalancerHealthProbeMode"] + ] = rest_field( + name="clusterServiceLoadBalancerHealthProbeMode", visibility=["read", "create", "update", "delete", "query"] + ) + """The health probing behavior for External Traffic Policy Cluster services. Known values are: + \"ServiceNodePort\" and \"Shared\".""" @overload def __init__( @@ -6384,6 +9583,9 @@ def __init__( idle_timeout_in_minutes: Optional[int] = None, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Optional[Union[str, "_models.BackendPoolType"]] = None, + cluster_service_load_balancer_health_probe_mode: Optional[ + Union[str, "_models.ClusterServiceLoadBalancerHealthProbeMode"] + ] = None, ) -> None: ... @overload @@ -7121,6 +10323,8 @@ class ManagedClusterPoolUpgradeProfile(_Model): # pylint: disable=docstring-key :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + :ivar components_by_releases: List of components grouped by kubernetes major.minor version. + :vartype components_by_releases: list[~azure.mgmt.containerservice.models.ComponentsByRelease] """ kubernetes_version: str = rest_field( @@ -7138,6 +10342,10 @@ class ManagedClusterPoolUpgradeProfile(_Model): # pylint: disable=docstring-key visibility=["read", "create", "update", "delete", "query"] ) """List of orchestrator types and versions available for upgrade.""" + components_by_releases: Optional[list["_models.ComponentsByRelease"]] = rest_field( + name="componentsByReleases", visibility=["read", "create", "update", "delete", "query"] + ) + """List of components grouped by kubernetes major.minor version.""" @overload def __init__( @@ -7147,6 +10355,7 @@ def __init__( os_type: Union[str, "_models.OSType"], name: Optional[str] = None, upgrades: Optional[list["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, ) -> None: ... @overload @@ -7169,6 +10378,8 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem( :vartype kubernetes_version: str :ivar is_preview: Whether the Kubernetes version is currently in preview. :vartype is_preview: bool + :ivar is_out_of_support: Whether the Kubernetes version is out of support. + :vartype is_out_of_support: bool """ kubernetes_version: Optional[str] = rest_field( @@ -7179,6 +10390,10 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem( name="isPreview", visibility=["read", "create", "update", "delete", "query"] ) """Whether the Kubernetes version is currently in preview.""" + is_out_of_support: Optional[bool] = rest_field( + name="isOutOfSupport", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the Kubernetes version is out of support.""" @overload def __init__( @@ -7186,6 +10401,7 @@ def __init__( *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, + is_out_of_support: Optional[bool] = None, ) -> None: ... @overload @@ -7206,6 +10422,9 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho :vartype provisioning_state: str :ivar power_state: The Power State of the cluster. :vartype power_state: ~azure.mgmt.containerservice.models.PowerState + :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the cluster + will be created/upgraded using a snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.models.CreationData :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int :ivar kubernetes_version: The version of Kubernetes specified by the user. Both patch version @@ -7271,6 +10490,24 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho :ivar support_plan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: "KubernetesOfficial" and "AKSLongTermSupport". :vartype support_plan: str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan + :ivar enable_fips: Whether to enable FIPS mode at the cluster level. When enabled, this setting + enforces FIPS compliance for all AKS-managed components, such as the node operating system, + addons, and `managed containerized components `_. See + `Enable cluster-wide FIPS `_ for more details. When this property is + enabled, all node pools in the cluster must also be FIPS-enabled. + :vartype enable_fips: bool + :ivar enable_node_hardening: Whether to enable node hardening at the cluster level. When + enabled, AKS applies hardened defaults for soft eviction thresholds, kube-reserved, and + system-reserved on all Linux node pools in the cluster. Per-node-pool kubeletConfig settings + take precedence over hardening defaults. On agent pools running Kubernetes 1.37 or later, node + hardening is enabled by default and cannot be disabled; setting this field to false has no + effect on those pools. + :vartype enable_node_hardening: bool + :ivar enable_namespace_resources: Enable namespace as Azure resource. The default value is + false. It can be enabled/disabled on creation and updating of the managed cluster. See + `https://aka.ms/NamespaceARMResource `_ for more details + on Namespace as a ARM Resource. + :vartype enable_namespace_resources: bool :ivar network_profile: The network configuration profile. :vartype network_profile: ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile :ivar aad_profile: The Azure Active Directory configuration. @@ -7311,7 +10548,7 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho :ivar ingress_profile: Ingress profile for the managed cluster. :vartype ingress_profile: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfile :ivar public_network_access: PublicNetworkAccess of the managedCluster. Allow or deny public - network access for AKS. Known values are: "Enabled" and "Disabled". + network access for AKS. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or ~azure.mgmt.containerservice.models.PublicNetworkAccess :ivar workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. :vartype workload_auto_scaler_profile: @@ -7344,6 +10581,16 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho `_. :vartype hosted_system_profile: ~azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile + :ivar health_monitor_profile: Health monitor profile for the managed cluster. + :vartype health_monitor_profile: + ~azure.mgmt.containerservice.models.ManagedClusterHealthMonitorProfile + :ivar control_plane_scaling_profile: Profile for providing scaled and performance guaranteed + control plane capacity to deliver consistent performance under high workload. Requires + Kubernetes version 1.33.0 or later. + :vartype control_plane_scaling_profile: + ~azure.mgmt.containerservice.models.ManagedClusterControlPlaneScalingProfile + :ivar node_disruption_profile: Node disruption profile for a managed cluster. + :vartype node_disruption_profile: ~azure.mgmt.containerservice.models.NodeDisruptionProfile :ivar status: Contains read-only information about the Managed Cluster. :vartype status: ~azure.mgmt.containerservice.models.ManagedClusterStatus """ @@ -7352,6 +10599,11 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho """The current provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field(name="powerState", visibility=["read"]) """The Power State of the cluster.""" + creation_data: Optional["_models.CreationData"] = rest_field( + name="creationData", visibility=["read", "create", "update", "delete", "query"] + ) + """CreationData to be used to specify the source Snapshot ID if the cluster will be + created/upgraded using a snapshot.""" max_agent_pools: Optional[int] = rest_field(name="maxAgentPools", visibility=["read"]) """The max number of agent pools for the managed cluster.""" kubernetes_version: Optional[str] = rest_field( @@ -7437,6 +10689,28 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho ) """The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: \"KubernetesOfficial\" and \"AKSLongTermSupport\".""" + enable_fips: Optional[bool] = rest_field( + name="enableFIPS", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable FIPS mode at the cluster level. When enabled, this setting enforces FIPS + compliance for all AKS-managed components, such as the node operating system, addons, and + `managed containerized components `_. See `Enable + cluster-wide FIPS `_ for more details. When this property is enabled, + all node pools in the cluster must also be FIPS-enabled.""" + enable_node_hardening: Optional[bool] = rest_field( + name="enableNodeHardening", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether to enable node hardening at the cluster level. When enabled, AKS applies hardened + defaults for soft eviction thresholds, kube-reserved, and system-reserved on all Linux node + pools in the cluster. Per-node-pool kubeletConfig settings take precedence over hardening + defaults. On agent pools running Kubernetes 1.37 or later, node hardening is enabled by default + and cannot be disabled; setting this field to false has no effect on those pools.""" + enable_namespace_resources: Optional[bool] = rest_field( + name="enableNamespaceResources", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable namespace as Azure resource. The default value is false. It can be enabled/disabled on + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource + `_ for more details on Namespace as a ARM Resource.""" network_profile: Optional["_models.ContainerServiceNetworkProfile"] = rest_field( name="networkProfile", visibility=["read", "create", "update", "delete", "query"] ) @@ -7505,7 +10779,7 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"] ) """PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS. Known - values are: \"Enabled\" and \"Disabled\".""" + values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\".""" workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = rest_field( name="workloadAutoScalerProfile", visibility=["read", "create", "update", "delete", "query"] ) @@ -7548,6 +10822,19 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho """Settings for hosted system addons. For more information, see `https://aka.ms/aks/automatic/systemcomponents `_.""" + health_monitor_profile: Optional["_models.ManagedClusterHealthMonitorProfile"] = rest_field( + name="healthMonitorProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Health monitor profile for the managed cluster.""" + control_plane_scaling_profile: Optional["_models.ManagedClusterControlPlaneScalingProfile"] = rest_field( + name="controlPlaneScalingProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Profile for providing scaled and performance guaranteed control plane capacity to deliver + consistent performance under high workload. Requires Kubernetes version 1.33.0 or later.""" + node_disruption_profile: Optional["_models.NodeDisruptionProfile"] = rest_field( + name="nodeDisruptionProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Node disruption profile for a managed cluster.""" status: Optional["_models.ManagedClusterStatus"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -7557,6 +10844,7 @@ class ManagedClusterProperties(_Model): # pylint: disable=docstring-keyword-sho def __init__( # pylint: disable=too-many-locals self, *, + creation_data: Optional["_models.CreationData"] = None, kubernetes_version: Optional[str] = None, dns_prefix: Optional[str] = None, fqdn_subdomain: Optional[str] = None, @@ -7571,6 +10859,9 @@ def __init__( # pylint: disable=too-many-locals node_resource_group_profile: Optional["_models.ManagedClusterNodeResourceGroupProfile"] = None, enable_rbac: Optional[bool] = None, support_plan: Optional[Union[str, "_models.KubernetesSupportPlan"]] = None, + enable_fips: Optional[bool] = None, + enable_node_hardening: Optional[bool] = None, + enable_namespace_resources: Optional[bool] = None, network_profile: Optional["_models.ContainerServiceNetworkProfile"] = None, aad_profile: Optional["_models.ManagedClusterAADProfile"] = None, auto_upgrade_profile: Optional["_models.ManagedClusterAutoUpgradeProfile"] = None, @@ -7595,6 +10886,9 @@ def __init__( # pylint: disable=too-many-locals ai_toolchain_operator_profile: Optional["_models.ManagedClusterAIToolchainOperatorProfile"] = None, scheduler_profile: Optional["_models.SchedulerProfile"] = None, hosted_system_profile: Optional["_models.ManagedClusterHostedSystemProfile"] = None, + health_monitor_profile: Optional["_models.ManagedClusterHealthMonitorProfile"] = None, + control_plane_scaling_profile: Optional["_models.ManagedClusterControlPlaneScalingProfile"] = None, + node_disruption_profile: Optional["_models.NodeDisruptionProfile"] = None, status: Optional["_models.ManagedClusterStatus"] = None, ) -> None: ... @@ -7850,6 +11144,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ManagedClusterPropertiesForSnapshot(_Model): + """managed cluster properties for snapshot, these properties are read only. + + :ivar kubernetes_version: The current kubernetes version. + :vartype kubernetes_version: str + :ivar sku: The current managed cluster sku. + :vartype sku: ~azure.mgmt.containerservice.models.ManagedClusterSKU + :ivar enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + :vartype enable_rbac: bool + :ivar network_profile: The current network profile. + :vartype network_profile: ~azure.mgmt.containerservice.models.NetworkProfileForSnapshot + """ + + kubernetes_version: Optional[str] = rest_field(name="kubernetesVersion", visibility=["read"]) + """The current kubernetes version.""" + sku: Optional["_models.ManagedClusterSKU"] = rest_field(visibility=["read"]) + """The current managed cluster sku.""" + enable_rbac: Optional[bool] = rest_field(name="enableRbac", visibility=["read"]) + """Whether the cluster has enabled Kubernetes Role-Based Access Control or not.""" + network_profile: Optional["_models.NetworkProfileForSnapshot"] = rest_field( + name="networkProfile", visibility=["read"] + ) + """The current network profile.""" + + class ManagedClusterSecurityProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Security profile for the container service cluster. @@ -7859,6 +11178,12 @@ class ManagedClusterSecurityProfile(_Model): # pylint: disable=docstring-keywor `_ settings for the security profile. :vartype azure_key_vault_kms: ~azure.mgmt.containerservice.models.AzureKeyVaultKms + :ivar kubernetes_resource_object_encryption_profile: Encryption at rest of Kubernetes resource + objects. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. + :vartype kubernetes_resource_object_encryption_profile: + ~azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile :ivar workload_identity: Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure cloud resources securely with Azure AD. See `https://aka.ms/aks/wi `_ for more details. @@ -7867,10 +11192,24 @@ class ManagedClusterSecurityProfile(_Model): # pylint: disable=docstring-keywor :ivar image_cleaner: Image Cleaner settings for the security profile. :vartype image_cleaner: ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner + :ivar image_integrity: Image integrity is a feature that works with Azure Policy to verify + image integrity by signature. This will not have any effect unless Azure Policy is applied to + enforce image signatures. See `https://aka.ms/aks/image-integrity + `_ for how to use this feature via policy. + :vartype image_integrity: + ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity + :ivar node_restriction: `Node Restriction + `_ + settings for the security profile. + :vartype node_restriction: + ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction :ivar custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. :vartype custom_ca_trust_certificates: list[bytes] + :ivar service_account_image_pull_profile: Defines service account based image pull settings. + :vartype service_account_image_pull_profile: + ~azure.mgmt.containerservice.models.ServiceAccountImagePullProfile """ defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = rest_field( @@ -7883,6 +11222,14 @@ class ManagedClusterSecurityProfile(_Model): # pylint: disable=docstring-keywor """Azure Key Vault `key management service `_ settings for the security profile.""" + kubernetes_resource_object_encryption_profile: Optional["_models.KubernetesResourceObjectEncryptionProfile"] = ( + rest_field( + name="kubernetesResourceObjectEncryptionProfile", visibility=["read", "create", "update", "delete", "query"] + ) + ) + """Encryption at rest of Kubernetes resource objects. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_.""" workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = rest_field( name="workloadIdentity", visibility=["read", "create", "update", "delete", "query"] ) @@ -7893,12 +11240,29 @@ class ManagedClusterSecurityProfile(_Model): # pylint: disable=docstring-keywor name="imageCleaner", visibility=["read", "create", "update", "delete", "query"] ) """Image Cleaner settings for the security profile.""" + image_integrity: Optional["_models.ManagedClusterSecurityProfileImageIntegrity"] = rest_field( + name="imageIntegrity", visibility=["read", "create", "update", "delete", "query"] + ) + """Image integrity is a feature that works with Azure Policy to verify image integrity by + signature. This will not have any effect unless Azure Policy is applied to enforce image + signatures. See `https://aka.ms/aks/image-integrity `_ for + how to use this feature via policy.""" + node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = rest_field( + name="nodeRestriction", visibility=["read", "create", "update", "delete", "query"] + ) + """`Node Restriction + `_ + settings for the security profile.""" custom_ca_trust_certificates: Optional[list[bytes]] = rest_field( name="customCATrustCertificates", visibility=["read", "create", "update", "delete", "query"], format="base64" ) """A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_.""" + service_account_image_pull_profile: Optional["_models.ServiceAccountImagePullProfile"] = rest_field( + name="serviceAccountImagePullProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Defines service account based image pull settings.""" @overload def __init__( @@ -7906,9 +11270,15 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, + kubernetes_resource_object_encryption_profile: Optional[ + "_models.KubernetesResourceObjectEncryptionProfile" + ] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, + image_integrity: Optional["_models.ManagedClusterSecurityProfileImageIntegrity"] = None, + node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, custom_ca_trust_certificates: Optional[list[bytes]] = None, + service_account_image_pull_profile: Optional["_models.ServiceAccountImagePullProfile"] = None, ) -> None: ... @overload @@ -8158,6 +11528,66 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ManagedClusterSecurityProfileImageIntegrity( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Image integrity related settings for the security profile. + + :ivar enabled: Whether to enable image integrity. The default value is false. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether to enable image integrity. The default value is false.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedClusterSecurityProfileNodeRestriction( + _Model +): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only + """Node Restriction settings for the security profile. + + :ivar enabled: Whether to enable Node Restriction. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether to enable Node Restriction.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ManagedClusterSecurityProfileWorkloadIdentity( _Model ): # pylint: disable=name-too-long,docstring-keyword-should-match-keyword-only @@ -8263,6 +11693,122 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ManagedClusterSnapshot(TrackedResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """A managed cluster snapshot resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of a managed cluster snapshot. + :vartype properties: ~azure.mgmt.containerservice.models.ManagedClusterSnapshotProperties + """ + + properties: Optional["_models.ManagedClusterSnapshotProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of a managed cluster snapshot.""" + + __flattened_items = ["creation_data", "snapshot_type", "managed_cluster_properties_read_only"] + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ManagedClusterSnapshotProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ManagedClusterSnapshotProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Properties for a managed cluster snapshot. + + :ivar creation_data: CreationData to be used to specify the source resource ID to create this + snapshot. + :vartype creation_data: ~azure.mgmt.containerservice.models.CreationData + :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :vartype snapshot_type: str or ~azure.mgmt.containerservice.models.SnapshotType + :ivar managed_cluster_properties_read_only: What the properties will be showed when getting + managed cluster snapshot. Those properties are read-only. + :vartype managed_cluster_properties_read_only: + ~azure.mgmt.containerservice.models.ManagedClusterPropertiesForSnapshot + """ + + creation_data: Optional["_models.CreationData"] = rest_field( + name="creationData", visibility=["read", "create", "update", "delete", "query"] + ) + """CreationData to be used to specify the source resource ID to create this snapshot.""" + snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = rest_field( + name="snapshotType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and + \"ManagedCluster\".""" + managed_cluster_properties_read_only: Optional["_models.ManagedClusterPropertiesForSnapshot"] = rest_field( + name="managedClusterPropertiesReadOnly", visibility=["read"] + ) + """What the properties will be showed when getting managed cluster snapshot. Those properties are + read-only.""" + + @overload + def __init__( + self, + *, + creation_data: Optional["_models.CreationData"] = None, + snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ManagedClusterStaticEgressGatewayProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """The Static Egress Gateway addon configuration for the cluster. @@ -8778,16 +12324,25 @@ class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( :ivar enabled: Whether to enable VPA. Default value is false. Required. :vartype enabled: bool + :ivar addon_autoscaling: Whether VPA add-on is enabled and configured to scale AKS-managed + add-ons. Known values are: "Enabled" and "Disabled". + :vartype addon_autoscaling: str or ~azure.mgmt.containerservice.models.AddonAutoscaling """ enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Whether to enable VPA. Default value is false. Required.""" + addon_autoscaling: Optional[Union[str, "_models.AddonAutoscaling"]] = rest_field( + name="addonAutoscaling", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. Known values are: + \"Enabled\" and \"Disabled\".""" @overload def __init__( self, *, enabled: bool, + addon_autoscaling: Optional[Union[str, "_models.AddonAutoscaling"]] = None, ) -> None: ... @overload @@ -8908,6 +12463,162 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class MeshMembership(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """Mesh membership of a managed cluster. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: Mesh membership properties of a managed cluster. + :vartype properties: ~azure.mgmt.containerservice.models.MeshMembershipProperties + :ivar managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :vartype managed_by: str + :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + :vartype e_tag: str + """ + + properties: Optional["_models.MeshMembershipProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Mesh membership properties of a managed cluster.""" + managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update"]) + """The fully qualified resource ID of the resource that manages this resource. Indicates if this + resource is managed by another Azure resource. If this is present, complete mode deployment + will not delete the resource if it is removed from the template since it is managed by another + resource.""" + e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) + """If eTag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.MeshMembershipProperties"] = None, + managed_by: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MeshMembershipPrivateConnectProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Private connect profile for mesh membership. + + :ivar private_ip_address: The private IP address of the member cluster private FQDN. This is a + read-only property populated by the service. + :vartype private_ip_address: str + :ivar subnet_resource_id: The delegated subnet resource ID. Customer can provide their own + subnet, or AKS will allocate one if not specified. When providing your own subnet, the minimum + required size is /28. + :vartype subnet_resource_id: str + """ + + private_ip_address: Optional[str] = rest_field(name="privateIpAddress", visibility=["read"]) + """The private IP address of the member cluster private FQDN. This is a read-only property + populated by the service.""" + subnet_resource_id: Optional[str] = rest_field( + name="subnetResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The delegated subnet resource ID. Customer can provide their own subnet, or AKS will allocate + one if not specified. When providing your own subnet, the minimum required size is /28.""" + + @overload + def __init__( + self, + *, + subnet_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MeshMembershipProperties(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Mesh membership properties of a managed cluster. + + :ivar provisioning_state: The current provisioning state of the Mesh Membership. Known values + are: "Canceled", "Creating", "Deleting", "Failed", "Succeeded", and "Updating". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.models.MeshMembershipProvisioningState + :ivar private_connect_profile: Profile for configuring private connectivity between the mesh + control plane and member clusters. When configured, communication between the mesh control + plane and this member cluster occurs over private network instead of public networks. Visit + `https://aka.ms/applink `_ for more information. + :vartype private_connect_profile: + ~azure.mgmt.containerservice.models.MeshMembershipPrivateConnectProfile + :ivar managed_mesh_id: The ARM resource id for the managed mesh member. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + Visit `https://aka.ms/applink `_ for more information. Required. + :vartype managed_mesh_id: str + """ + + provisioning_state: Optional[Union[str, "_models.MeshMembershipProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The current provisioning state of the Mesh Membership. Known values are: \"Canceled\", + \"Creating\", \"Deleting\", \"Failed\", \"Succeeded\", and \"Updating\".""" + private_connect_profile: Optional["_models.MeshMembershipPrivateConnectProfile"] = rest_field( + name="privateConnectProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Profile for configuring private connectivity between the mesh control plane and member + clusters. When configured, communication between the mesh control plane and this member cluster + occurs over private network instead of public networks. Visit `https://aka.ms/applink + `_ for more information.""" + managed_mesh_id: str = rest_field(name="managedMeshID", visibility=["read", "create", "update", "delete", "query"]) + """The ARM resource id for the managed mesh member. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + Visit `https://aka.ms/applink `_ for more information. Required.""" + + @overload + def __init__( + self, + *, + managed_mesh_id: str, + private_connect_profile: Optional["_models.MeshMembershipPrivateConnectProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class MeshRevision(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Holds information on upgrades and compatibility for given major.minor mesh release. @@ -9159,23 +12870,273 @@ class NamespaceProperties(_Model): # pylint: disable=docstring-keyword-should-m adoption_policy: Optional[Union[str, "_models.AdoptionPolicy"]] = rest_field( name="adoptionPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """Action if Kubernetes namespace with same name already exists. Known values are: \"Never\", - \"IfIdentical\", and \"Always\".""" - delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = rest_field( - name="deletePolicy", visibility=["read", "create", "update", "delete", "query"] + """Action if Kubernetes namespace with same name already exists. Known values are: \"Never\", + \"IfIdentical\", and \"Always\".""" + delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = rest_field( + name="deletePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Delete options of a namespace. Known values are: \"Keep\" and \"Delete\".""" + + @overload + def __init__( + self, + *, + labels: Optional[dict[str, str]] = None, + annotations: Optional[dict[str, str]] = None, + default_resource_quota: Optional["_models.ResourceQuota"] = None, + default_network_policy: Optional["_models.NetworkPolicies"] = None, + adoption_policy: Optional[Union[str, "_models.AdoptionPolicy"]] = None, + delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkPolicies(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Default network policy of the namespace, specifying ingress and egress rules. + + :ivar ingress: Enum representing different network policy rules. Known values are: "DenyAll", + "AllowAll", and "AllowSameNamespace". + :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule + :ivar egress: Enum representing different network policy rules. Known values are: "DenyAll", + "AllowAll", and "AllowSameNamespace". + :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule + """ + + ingress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", + and \"AllowSameNamespace\".""" + egress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", + and \"AllowSameNamespace\".""" + + @overload + def __init__( + self, + *, + ingress: Optional[Union[str, "_models.PolicyRule"]] = None, + egress: Optional[Union[str, "_models.PolicyRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkProfileForSnapshot(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """network profile for managed cluster snapshot, these properties are read only. + + :ivar network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", + "kubenet", and "none". + :vartype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin + :ivar network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "overlay" + :vartype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode + :ivar network_policy: networkPolicy for managed cluster snapshot. Known values are: "none", + "calico", "azure", and "cilium". + :vartype network_policy: str or ~azure.mgmt.containerservice.models.NetworkPolicy + :ivar network_mode: networkMode for managed cluster snapshot. Known values are: "transparent" + and "bridge". + :vartype network_mode: str or ~azure.mgmt.containerservice.models.NetworkMode + :ivar load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: + "service", "standard", and "basic". + :vartype load_balancer_sku: str or ~azure.mgmt.containerservice.models.LoadBalancerSku + """ + + network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = rest_field( + name="networkPlugin", visibility=["read", "create", "update", "delete", "query"] + ) + """networkPlugin for managed cluster snapshot. Known values are: \"azure\", \"kubenet\", and + \"none\".""" + network_plugin_mode: Optional[Union[str, "_models.NetworkPluginMode"]] = rest_field( + name="networkPluginMode", visibility=["read", "create", "update", "delete", "query"] + ) + """NetworkPluginMode for managed cluster snapshot. \"overlay\"""" + network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = rest_field( + name="networkPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """networkPolicy for managed cluster snapshot. Known values are: \"none\", \"calico\", \"azure\", + and \"cilium\".""" + network_mode: Optional[Union[str, "_models.NetworkMode"]] = rest_field( + name="networkMode", visibility=["read", "create", "update", "delete", "query"] + ) + """networkMode for managed cluster snapshot. Known values are: \"transparent\" and \"bridge\".""" + load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = rest_field( + name="loadBalancerSku", visibility=["read", "create", "update", "delete", "query"] + ) + """loadBalancerSku for managed cluster snapshot. Known values are: \"service\", \"standard\", and + \"basic\".""" + + @overload + def __init__( + self, + *, + network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = None, + network_plugin_mode: Optional[Union[str, "_models.NetworkPluginMode"]] = None, + network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, + load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NodeDisruptionProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Node disruption profile for a managed cluster. + + :ivar node_disruption_policy: The policy configuration for when to allow certain operations + which require node re-image and trigger redeployment. For example, some operations, such as + updating the .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an + existing managed cluster, trigger rolling updates of the nodes. This setting allows control + over when such updates are accepted. The default is 'Allow'. For a full list of covered + operations see aka.ms/aks/nodedisruptionpolicy". Known values are: "Allow", + "AllowDuringMaintenanceWindow", and "Block". + :vartype node_disruption_policy: str or + ~azure.mgmt.containerservice.models.NodeDisruptionPolicy + """ + + node_disruption_policy: Optional[Union[str, "_models.NodeDisruptionPolicy"]] = rest_field( + name="nodeDisruptionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The policy configuration for when to allow certain operations which require node re-image and + trigger redeployment. For example, some operations, such as updating the + .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing + managed cluster, trigger rolling updates of the nodes. This setting allows control over when + such updates are accepted. The default is 'Allow'. For a full list of covered operations see + aka.ms/aks/nodedisruptionpolicy\". Known values are: \"Allow\", + \"AllowDuringMaintenanceWindow\", and \"Block\".""" + + @overload + def __init__( + self, + *, + node_disruption_policy: Optional[Union[str, "_models.NodeDisruptionPolicy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NodeImageVersion(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """node image version profile for given major.minor.patch release. + + :ivar os: The operating system of the node image. Example: AKSUbuntu. + :vartype os: str + :ivar sku: The SKU or flavor of the node image. Example: 2004gen2containerd. + :vartype sku: str + :ivar version: major.minor.patch version of the node image version release. Example: + 2024.02.02. + :vartype version: str + :ivar full_name: The OS + SKU + version of the node image. Example: + AKSUbuntu-1804gen2containerd-2024.02.02. + :vartype full_name: str + """ + + os: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operating system of the node image. Example: AKSUbuntu.""" + sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The SKU or flavor of the node image. Example: 2004gen2containerd.""" + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """major.minor.patch version of the node image version release. Example: 2024.02.02.""" + full_name: Optional[str] = rest_field(name="fullName", visibility=["read", "create", "update", "delete", "query"]) + """The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02.""" + + @overload + def __init__( + self, + *, + os: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + full_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NvidiaGPUProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """NVIDIA-specific GPU settings. + + :ivar management_mode: The Managed GPU experience installs additional components, such as the + Data Center GPU Manager (DCGM) metrics for monitoring, on top of the GPU driver for you. For + more details of what is installed, check out aka.ms/aks/managed-gpu. Known values are: + "Unmanaged" and "Managed". + :vartype management_mode: str or ~azure.mgmt.containerservice.models.ManagementMode + :ivar driver_mode: NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA + Kubernetes device plugin. DRA installs the NVIDIA DRA driver. Known values are: "DevicePlugin" + and "DRA". + :vartype driver_mode: str or ~azure.mgmt.containerservice.models.NvidiaDriverMode + :ivar mig_strategy: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed + MIG support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. + When not specified, the default is None. Known values are: "None", "Single", and "Mixed". + :vartype mig_strategy: str or ~azure.mgmt.containerservice.models.MigStrategy + """ + + management_mode: Optional[Union[str, "_models.ManagementMode"]] = rest_field( + name="managementMode", visibility=["read", "create", "update", "delete", "query"] + ) + """The Managed GPU experience installs additional components, such as the Data Center GPU Manager + (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is + installed, check out aka.ms/aks/managed-gpu. Known values are: \"Unmanaged\" and \"Managed\".""" + driver_mode: Optional[Union[str, "_models.NvidiaDriverMode"]] = rest_field( + name="driverMode", visibility=["read", "create", "update", "delete", "query"] ) - """Delete options of a namespace. Known values are: \"Keep\" and \"Delete\".""" + """NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA Kubernetes device plugin. + DRA installs the NVIDIA DRA driver. Known values are: \"DevicePlugin\" and \"DRA\".""" + mig_strategy: Optional[Union[str, "_models.MigStrategy"]] = rest_field( + name="migStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more + information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + the default is None. Known values are: \"None\", \"Single\", and \"Mixed\".""" @overload def __init__( self, *, - labels: Optional[dict[str, str]] = None, - annotations: Optional[dict[str, str]] = None, - default_resource_quota: Optional["_models.ResourceQuota"] = None, - default_network_policy: Optional["_models.NetworkPolicies"] = None, - adoption_policy: Optional[Union[str, "_models.AdoptionPolicy"]] = None, - delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = None, + management_mode: Optional[Union[str, "_models.ManagementMode"]] = None, + driver_mode: Optional[Union[str, "_models.NvidiaDriverMode"]] = None, + mig_strategy: Optional[Union[str, "_models.MigStrategy"]] = None, ) -> None: ... @overload @@ -9189,34 +13150,77 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class NetworkPolicies(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only - """Default network policy of the namespace, specifying ingress and egress rules. +class OperationStatusResult(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The current status of an async operation. - :ivar ingress: Enum representing different network policy rules. Known values are: "DenyAll", - "AllowAll", and "AllowSameNamespace". - :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule - :ivar egress: Enum representing different network policy rules. Known values are: "DenyAll", - "AllowAll", and "AllowSameNamespace". - :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule + :ivar id: Fully qualified ID for the async operation. + :vartype id: str + :ivar name: Name of the async operation. + :vartype name: str + :ivar status: Operation status. Required. + :vartype status: str + :ivar percent_complete: Percent of the operation that is complete. + :vartype percent_complete: float + :ivar start_time: The start time of the operation. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the operation. + :vartype end_time: ~datetime.datetime + :ivar operations: The operations list. + :vartype operations: list[~azure.mgmt.containerservice.models.OperationStatusResult] + :ivar error: If present, details of the operation error. + :vartype error: ~azure.mgmt.containerservice.models.ErrorDetail + :ivar resource_id: Fully qualified ID of the resource against which the original async + operation was started. + :vartype resource_id: str + :ivar operation_type: The type of the operation. + :vartype operation_type: str + :ivar sub_operation_type: The type of the suboperation. + :vartype sub_operation_type: str """ - ingress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", - and \"AllowSameNamespace\".""" - egress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Fully qualified ID for the async operation.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the async operation.""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Operation status. Required.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percent of the operation that is complete.""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The start time of the operation.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The end time of the operation.""" + operations: Optional[list["_models.OperationStatusResult"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", - and \"AllowSameNamespace\".""" + """The operations list.""" + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """If present, details of the operation error.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Fully qualified ID of the resource against which the original async operation was started.""" + operation_type: Optional[str] = rest_field(name="operationType", visibility=["read"]) + """The type of the operation.""" + sub_operation_type: Optional[str] = rest_field(name="subOperationType", visibility=["read"]) + """The type of the suboperation.""" @overload def __init__( self, *, - ingress: Optional[Union[str, "_models.PolicyRule"]] = None, - egress: Optional[Union[str, "_models.PolicyRule"]] = None, + status: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + name: Optional[str] = None, + percent_complete: Optional[float] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + operations: Optional[list["_models.OperationStatusResult"]] = None, + error: Optional["_models.ErrorDetail"] = None, ) -> None: ... @overload @@ -9348,6 +13352,29 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class PoolBootstrapData(_Model): + """Bootstrap configuration for a FlexNode pool. + + :ivar azure: Azure environment and cluster identity information. + :vartype azure: ~azure.mgmt.containerservice.models.BootstrapAzureConfig + :ivar components: Component versions for the node runtime. + :vartype components: ~azure.mgmt.containerservice.models.BootstrapComponentVersions + :ivar networking: Network configuration for the node. + :vartype networking: ~azure.mgmt.containerservice.models.BootstrapNetworkingConfig + :ivar node: Node-level configuration for kubelet, labels, and taints. + :vartype node: ~azure.mgmt.containerservice.models.BootstrapNodeConfig + """ + + azure: Optional["_models.BootstrapAzureConfig"] = rest_field(visibility=["read"]) + """Azure environment and cluster identity information.""" + components: Optional["_models.BootstrapComponentVersions"] = rest_field(visibility=["read"]) + """Component versions for the node runtime.""" + networking: Optional["_models.BootstrapNetworkingConfig"] = rest_field(visibility=["read"]) + """Network configuration for the node.""" + node: Optional["_models.BootstrapNodeConfig"] = rest_field(visibility=["read"]) + """Node-level configuration for kubelet, labels, and taints.""" + + class PortRange(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """The port range. @@ -9421,6 +13448,39 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class PreparedImageSpecificationProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Settings to determine the prepared image specification used to provision nodes in a pool. + + :ivar prepared_image_specification_id: The resource ID of the prepared image specification + resource to use. This can include a version. Omitting the version will use the latest version + of the prepared image specification. + :vartype prepared_image_specification_id: str + """ + + prepared_image_specification_id: Optional[str] = rest_field( + name="preparedImageSpecificationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the prepared image specification resource to use. This can include a + version. Omitting the version will use the latest version of the prepared image specification.""" + + @overload + def __init__( + self, + *, + prepared_image_specification_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class PrivateEndpoint(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Private endpoint which a connection belongs to. @@ -9713,6 +13773,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class RebalanceLoadBalancersRequestBody(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """The names of the load balancers to rebalance. If set to empty, all load balancers will be + rebalanced. + + :ivar load_balancer_names: The load balancer names list. + :vartype load_balancer_names: list[str] + """ + + load_balancer_names: Optional[list[str]] = rest_field( + name="loadBalancerNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The load balancer names list.""" + + @overload + def __init__( + self, + *, + load_balancer_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class RelativeMonthlySchedule(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. @@ -9859,6 +13950,222 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ResourceSku(_Model): + """Describes an available Compute SKU. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

Possible + Values:

**Standard**

**Basic**. + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: ~azure.mgmt.containerservice.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those locations where the + SKU is available. + :vartype location_info: list[~azure.mgmt.containerservice.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: list[~azure.mgmt.containerservice.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: list[~azure.mgmt.containerservice.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~azure.mgmt.containerservice.models.ResourceSkuRestrictions] + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of resource the SKU applies to.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of SKU.""" + tier: Optional[str] = rest_field(visibility=["read"]) + """Specifies the tier of virtual machines in a scale set.

Possible Values:

+ **Standard**

**Basic**.""" + size: Optional[str] = rest_field(visibility=["read"]) + """The Size of the SKU.""" + family: Optional[str] = rest_field(visibility=["read"]) + """The Family of this particular SKU.""" + kind: Optional[str] = rest_field(visibility=["read"]) + """The Kind of resources that are supported in this SKU.""" + capacity: Optional["_models.ResourceSkuCapacity"] = rest_field(visibility=["read"]) + """Specifies the number of virtual machines in the scale set.""" + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of locations that the SKU is available.""" + location_info: Optional[list["_models.ResourceSkuLocationInfo"]] = rest_field( + name="locationInfo", visibility=["read"] + ) + """A list of locations and availability zones in those locations where the SKU is available.""" + api_versions: Optional[list[str]] = rest_field(name="apiVersions", visibility=["read"]) + """The api versions that support this SKU.""" + costs: Optional[list["_models.ResourceSkuCosts"]] = rest_field(visibility=["read"]) + """Metadata for retrieving price info.""" + capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"]) + """A name value pair to describe the capability.""" + restrictions: Optional[list["_models.ResourceSkuRestrictions"]] = rest_field(visibility=["read"]) + """The restrictions because of which SKU cannot be used. This is empty if there are no + restrictions.""" + + +class ResourceSkuCapabilities(_Model): + """Describes The SKU capabilities object. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """An invariant to describe the feature.""" + value: Optional[str] = rest_field(visibility=["read"]) + """An invariant if the feature is measured by quantity.""" + + +class ResourceSkuCapacity(_Model): + """Describes scaling information of a SKU. + + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", + "Manual", and "None". + :vartype scale_type: str or ~azure.mgmt.containerservice.models.ResourceSkuCapacityScaleType + """ + + minimum: Optional[int] = rest_field(visibility=["read"]) + """The minimum capacity.""" + maximum: Optional[int] = rest_field(visibility=["read"]) + """The maximum capacity that can be set.""" + default: Optional[int] = rest_field(visibility=["read"]) + """The default capacity.""" + scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = rest_field( + name="scaleType", visibility=["read"] + ) + """The scale type applicable to the sku. Known values are: \"Automatic\", \"Manual\", and + \"None\".""" + + +class ResourceSkuCosts(_Model): + """Describes metadata for retrieving price info. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: int + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + meter_id: Optional[str] = rest_field(name="meterID", visibility=["read"]) + """Used for querying price from commerce.""" + quantity: Optional[int] = rest_field(visibility=["read"]) + """The multiplier is needed to extend the base metered cost.""" + extended_unit: Optional[str] = rest_field(name="extendedUnit", visibility=["read"]) + """An invariant to show the extended unit.""" + + +class ResourceSkuLocationInfo(_Model): + """Describes an available Compute SKU Location Information. + + :ivar location: Location of the SKU. + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific zones. + :vartype zone_details: list[~azure.mgmt.containerservice.models.ResourceSkuZoneDetails] + :ivar extended_locations: The names of extended locations. + :vartype extended_locations: list[str] + :ivar type: The type of the extended location. "EdgeZone" + :vartype type: str or ~azure.mgmt.containerservice.models.ExtendedLocationTypes + """ + + location: Optional[str] = rest_field(visibility=["read"]) + """Location of the SKU.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """List of availability zones where the SKU is supported.""" + zone_details: Optional[list["_models.ResourceSkuZoneDetails"]] = rest_field(name="zoneDetails", visibility=["read"]) + """Details of capabilities available to a SKU in specific zones.""" + extended_locations: Optional[list[str]] = rest_field(name="extendedLocations", visibility=["read"]) + """The names of extended locations.""" + type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = rest_field(visibility=["read"]) + """The type of the extended location. \"EdgeZone\"""" + + +class ResourceSkuRestrictionInfo(_Model): + """Describes an available Compute SKU Restriction Information. + + :ivar locations: Locations where the SKU is restricted. + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """Locations where the SKU is restricted.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """List of availability zones where the SKU is restricted.""" + + +class ResourceSkuRestrictions(_Model): + """Describes scaling information of a SKU. + + :ivar type: The type of restrictions. Known values are: "Location" and "Zone". + :vartype type: str or ~azure.mgmt.containerservice.models.ResourceSkuRestrictionsType + :ivar values_property: The value of restrictions. If the restriction type is set to location. + This would be different locations where the SKU is restricted. + :vartype values_property: list[str] + :ivar restriction_info: The information about the restriction where the SKU cannot be used. + :vartype restriction_info: ~azure.mgmt.containerservice.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and + "NotAvailableForSubscription". + :vartype reason_code: str or + ~azure.mgmt.containerservice.models.ResourceSkuRestrictionsReasonCode + """ + + type: Optional[Union[str, "_models.ResourceSkuRestrictionsType"]] = rest_field(visibility=["read"]) + """The type of restrictions. Known values are: \"Location\" and \"Zone\".""" + values_property: Optional[list[str]] = rest_field(name="values", visibility=["read"], original_tsp_name="values") + """The value of restrictions. If the restriction type is set to location. This would be different + locations where the SKU is restricted.""" + restriction_info: Optional["_models.ResourceSkuRestrictionInfo"] = rest_field( + name="restrictionInfo", visibility=["read"] + ) + """The information about the restriction where the SKU cannot be used.""" + reason_code: Optional[Union[str, "_models.ResourceSkuRestrictionsReasonCode"]] = rest_field( + name="reasonCode", visibility=["read"] + ) + """The reason for restriction. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\".""" + + +class ResourceSkuZoneDetails(_Model): + """Describes The zonal capabilities of a SKU. + + :ivar name: The set of zones that the SKU is available in with the specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU in the specified list + of zones. + :vartype capabilities: list[~azure.mgmt.containerservice.models.ResourceSkuCapabilities] + """ + + name: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of zones that the SKU is available in with the specified capabilities.""" + capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"]) + """A list of capabilities that are available for the SKU in the specified list of zones.""" + + class RunCommandRequest(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """A run command request. @@ -9953,6 +14260,63 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) +class SafeguardsAvailableVersion(ProxyResource): # pylint: disable=docstring-keyword-should-match-keyword-only + """Available Safeguards Version. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.containerservice.models.SystemData + :ivar properties: Whether the version is default or not and support info. Required. + :vartype properties: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties + """ + + properties: "_models.SafeguardsAvailableVersionsProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Whether the version is default or not and support info. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.SafeguardsAvailableVersionsProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SafeguardsAvailableVersionsProperties(_Model): + """Whether the version is default or not and support info. + + :ivar is_default_version: Whether this is the default version. + :vartype is_default_version: bool + :ivar support: Whether the version is preview or stable. Known values are: "Preview" and + "Stable". + :vartype support: str or ~azure.mgmt.containerservice.models.SafeguardsSupport + """ + + is_default_version: Optional[bool] = rest_field(name="isDefaultVersion", visibility=["read"]) + """Whether this is the default version.""" + support: Optional[Union[str, "_models.SafeguardsSupport"]] = rest_field(visibility=["read"]) + """Whether the version is preview or stable. Known values are: \"Preview\" and \"Stable\".""" + + class ScaleProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Specifications on how to scale a VirtualMachines agent pool. @@ -10114,6 +14478,57 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class ServiceAccountImagePullProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Profile for configuring image pull authentication to use service account scoped managed + identities for authentication instead of node scoped managed identity (kubelet identity) for + authentication to Azure Container Registry. For more information, refer to + `https://aka.ms/aks/identity-binding/acr-image-pull/docs + `_. + + :ivar enabled: Indicates whether service account based image pull is enabled, for which + identity bindings are required for the managed identity to be used for authentication. For more + information, refer to `https://aka.ms/aks/identity-binding-docs + `_. + :vartype enabled: bool + :ivar default_managed_identity_id: Optional. The default managed identity resource ID used for + image pulls at the cluster level. When configured, this identity is used if a Pod’s service + account does not explicitly specify an identity for pulling images. If not configured and no + identity is specified at service account level, image will be pulled via anonymous + authentication. + :vartype default_managed_identity_id: str + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Indicates whether service account based image pull is enabled, for which identity bindings are + required for the managed identity to be used for authentication. For more information, refer to + `https://aka.ms/aks/identity-binding-docs `_.""" + default_managed_identity_id: Optional[str] = rest_field( + name="defaultManagedIdentityId", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional. The default managed identity resource ID used for image pulls at the cluster level. + When configured, this identity is used if a Pod’s service account does not explicitly specify + an identity for pulling images. If not configured and no identity is specified at service + account level, image will be pulled via anonymous authentication.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + default_managed_identity_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class ServiceMeshProfile(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Service mesh profile for a managed cluster. @@ -10229,7 +14644,8 @@ class SnapshotProperties(_Model): # pylint: disable=docstring-keyword-should-ma :ivar creation_data: CreationData to be used to specify the source agent pool resource ID to create this snapshot. :vartype creation_data: ~azure.mgmt.containerservice.models.CreationData - :ivar snapshot_type: The type of a snapshot. The default is NodePool. "NodePool" + :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". :vartype snapshot_type: str or ~azure.mgmt.containerservice.models.SnapshotType :ivar kubernetes_version: The version of Kubernetes. :vartype kubernetes_version: str @@ -10240,9 +14656,9 @@ class SnapshotProperties(_Model): # pylint: disable=docstring-keyword-should-ma :vartype os_type: str or ~azure.mgmt.containerservice.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar vm_size: The size of the VM. :vartype vm_size: str @@ -10257,7 +14673,8 @@ class SnapshotProperties(_Model): # pylint: disable=docstring-keyword-should-ma snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = rest_field( name="snapshotType", visibility=["read", "create", "update", "delete", "query"] ) - """The type of a snapshot. The default is NodePool. \"NodePool\"""" + """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and + \"ManagedCluster\".""" kubernetes_version: Optional[str] = rest_field(name="kubernetesVersion", visibility=["read"]) """The version of Kubernetes.""" node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) @@ -10267,9 +14684,9 @@ class SnapshotProperties(_Model): # pylint: disable=docstring-keyword-should-ma os_sku: Optional[Union[str, "_models.OSSKU"]] = rest_field(name="osSku", visibility=["read"]) """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read"]) """The size of the VM.""" enable_fips: Optional[bool] = rest_field(name="enableFIPS", visibility=["read"]) @@ -10294,6 +14711,131 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class SoftEvictionGracePeriod(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Grace periods for kubelet soft eviction thresholds. Each field is a Go-style duration string + (e.g. '1m30s') that specifies how long the corresponding soft eviction signal must be crossed + before pod eviction is triggered. A grace period only applies when the matching soft eviction + threshold is set. + + :ivar memory_available: The grace period for the memoryAvailable soft eviction signal, + expressed as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', + 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. Default is '30s'. + :vartype memory_available: str + :ivar node_fs_available: The grace period for the nodeFsAvailable soft eviction signal, + expressed as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', + 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. Default is '2m'. + :vartype node_fs_available: str + :ivar node_fs_inodes_free: The grace period for the nodeFsInodesFree soft eviction signal, + expressed as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', + 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. Default is '2m'. + :vartype node_fs_inodes_free: str + """ + + memory_available: Optional[str] = rest_field( + name="memoryAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The grace period for the memoryAvailable soft eviction signal, expressed as a Go-style duration + string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + greater than or equal to '30s'. Default is '30s'.""" + node_fs_available: Optional[str] = rest_field( + name="nodeFsAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The grace period for the nodeFsAvailable soft eviction signal, expressed as a Go-style duration + string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + greater than or equal to '30s'. Default is '2m'.""" + node_fs_inodes_free: Optional[str] = rest_field( + name="nodeFsInodesFree", visibility=["read", "create", "update", "delete", "query"] + ) + """The grace period for the nodeFsInodesFree soft eviction signal, expressed as a Go-style + duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + Must be greater than or equal to '30s'. Default is '2m'.""" + + @overload + def __init__( + self, + *, + memory_available: Optional[str] = None, + node_fs_available: Optional[str] = None, + node_fs_inodes_free: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SoftEvictionThreshold(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only + """Soft eviction thresholds for kubelet. These thresholds trigger graceful pod eviction when node + resources drop below the specified values for at least the corresponding grace period defined + in softEvictionGracePeriod. Supported formats are Ki, Mi, Gi, or percentages using %. + + :ivar memory_available: The threshold for available memory below which soft pod eviction is + triggered. Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute + minimum is 100Mi; percentage minimum is 2%. Default uses a capacity-based step ladder: 500Mi + for nodes with <=8GiB, 750Mi for 16GiB, and 1024Mi (1Gi) for >=32GiB. Must also be greater than + the effective hardEvictionThreshold.memoryAvailable. + :vartype memory_available: str + :ivar node_fs_available: The threshold for available node filesystem space below which soft pod + eviction is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). + Default is '12%'. Must be greater than or equal to 10% and greater than the effective + hardEvictionThreshold.nodeFsAvailable. + :vartype node_fs_available: str + :ivar node_fs_inodes_free: The threshold for available inodes on the node filesystem below + which soft pod eviction is triggered. Accepts absolute inode counts (e.g. '100000') or + percentage values (e.g. '5%'). Default is '7%'. Percentage values must be greater than or equal + to 5% and greater than the effective hardEvictionThreshold.nodeFsInodesFree. + :vartype node_fs_inodes_free: str + """ + + memory_available: Optional[str] = rest_field( + name="memoryAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available memory below which soft pod eviction is triggered. Accepts absolute + values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute minimum is 100Mi; percentage + minimum is 2%. Default uses a capacity-based step ladder: 500Mi for nodes with <=8GiB, 750Mi + for 16GiB, and 1024Mi (1Gi) for >=32GiB. Must also be greater than the effective + hardEvictionThreshold.memoryAvailable.""" + node_fs_available: Optional[str] = rest_field( + name="nodeFsAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available node filesystem space below which soft pod eviction is triggered. + Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Default is '12%'. Must + be greater than or equal to 10% and greater than the effective + hardEvictionThreshold.nodeFsAvailable.""" + node_fs_inodes_free: Optional[str] = rest_field( + name="nodeFsInodesFree", visibility=["read", "create", "update", "delete", "query"] + ) + """The threshold for available inodes on the node filesystem below which soft pod eviction is + triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). + Default is '7%'. Percentage values must be greater than or equal to 5% and greater than the + effective hardEvictionThreshold.nodeFsInodesFree.""" + + @overload + def __init__( + self, + *, + memory_available: Optional[str] = None, + node_fs_available: Optional[str] = None, + node_fs_inodes_free: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + class SysctlConfig(_Model): # pylint: disable=docstring-keyword-should-match-keyword-only """Sysctl settings for Linux agent nodes. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py index 69da5e12a363..a484f1c8d559 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py @@ -15,16 +15,25 @@ from ._operations import AgentPoolsOperations # type: ignore from ._operations import ManagedClustersOperations # type: ignore from ._operations import MaintenanceConfigurationsOperations # type: ignore +from ._operations import MaintenanceWindowsOperations # type: ignore from ._operations import ManagedNamespacesOperations # type: ignore from ._operations import MachinesOperations # type: ignore from ._operations import PrivateEndpointConnectionsOperations # type: ignore from ._operations import SnapshotsOperations # type: ignore +from ._operations import ManagedClusterSnapshotsOperations # type: ignore from ._operations import TrustedAccessRoleBindingsOperations # type: ignore +from ._operations import LoadBalancersOperations # type: ignore from ._operations import IdentityBindingsOperations # type: ignore +from ._operations import JWTAuthenticatorsOperations # type: ignore +from ._operations import MeshMembershipsOperations # type: ignore from ._operations import Operations # type: ignore +from ._operations import AlertConfigurationsOperations # type: ignore +from ._operations import OperationStatusResultOperations # type: ignore from ._operations import PrivateLinkResourcesOperations # type: ignore from ._operations import ResolvePrivateLinkServiceIdOperations # type: ignore from ._operations import TrustedAccessRolesOperations # type: ignore +from ._operations import ContainerServiceOperations # type: ignore +from ._operations import VmSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -34,16 +43,25 @@ "AgentPoolsOperations", "ManagedClustersOperations", "MaintenanceConfigurationsOperations", + "MaintenanceWindowsOperations", "ManagedNamespacesOperations", "MachinesOperations", "PrivateEndpointConnectionsOperations", "SnapshotsOperations", + "ManagedClusterSnapshotsOperations", "TrustedAccessRoleBindingsOperations", + "LoadBalancersOperations", "IdentityBindingsOperations", + "JWTAuthenticatorsOperations", + "MeshMembershipsOperations", "Operations", + "AlertConfigurationsOperations", + "OperationStatusResultOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", "TrustedAccessRolesOperations", + "ContainerServiceOperations", + "VmSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py index efc36aeb5404..416830cfdfec 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py @@ -54,7 +54,7 @@ def build_agent_pools_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,7 +91,7 @@ def build_agent_pools_create_or_update_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +136,7 @@ def build_agent_pools_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" path_format_arguments = { @@ -172,7 +172,7 @@ def build_agent_pools_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -199,7 +199,7 @@ def build_agent_pools_abort_latest_operation_request( # pylint: disable=name-to ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort" path_format_arguments = { @@ -217,6 +217,29 @@ def build_agent_pools_abort_latest_operation_request( # pylint: disable=name-to return HttpRequest(method="POST", url=_url, params=_params, **kwargs) +def build_agent_pools_complete_upgrade_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + def build_agent_pools_delete_machines_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -224,7 +247,7 @@ def build_agent_pools_delete_machines_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" path_format_arguments = { @@ -252,7 +275,7 @@ def build_agent_pools_upgrade_node_image_version_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -275,13 +298,90 @@ def build_agent_pools_upgrade_node_image_version_request( # pylint: disable=nam return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_agent_pools_list_bootstrap_data_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/listBootstrapData" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_agent_pools_update_request( + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["if-match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + def build_agent_pools_get_available_agent_pool_versions_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -309,7 +409,7 @@ def build_agent_pools_get_upgrade_profile_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -338,7 +438,7 @@ def build_managed_clusters_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -373,7 +473,7 @@ def build_managed_clusters_create_or_update_request( # pylint: disable=name-too _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -416,7 +516,7 @@ def build_managed_clusters_update_tags_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -451,6 +551,7 @@ def build_managed_clusters_delete_request( resource_name: str, subscription_id: str, *, + ignore_pod_disruption_budget: Optional[bool] = None, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any @@ -458,7 +559,7 @@ def build_managed_clusters_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" path_format_arguments = { @@ -471,6 +572,10 @@ def build_managed_clusters_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if ignore_pod_disruption_budget is not None: + _params["ignore-pod-disruption-budget"] = _SERIALIZER.query( + "ignore_pod_disruption_budget", ignore_pod_disruption_budget, "bool" + ) # Construct headers if_match = prep_if_match(etag, match_condition) @@ -489,7 +594,7 @@ def build_managed_clusters_list_by_resource_group_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -514,7 +619,7 @@ def build_managed_clusters_list_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -540,7 +645,7 @@ def build_managed_clusters_get_access_profile_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -574,7 +679,7 @@ def build_managed_clusters_list_cluster_admin_credentials_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -610,7 +715,7 @@ def build_managed_clusters_list_cluster_user_credentials_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -647,7 +752,7 @@ def build_managed_clusters_list_cluster_monitoring_user_credentials_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -678,7 +783,7 @@ def build_managed_clusters_reset_service_principal_profile_request( # pylint: d _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" path_format_arguments = { @@ -706,7 +811,7 @@ def build_managed_clusters_reset_aad_profile_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" path_format_arguments = { @@ -732,7 +837,7 @@ def build_managed_clusters_rotate_cluster_certificates_request( # pylint: disab ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" path_format_arguments = { @@ -754,7 +859,7 @@ def build_managed_clusters_abort_latest_operation_request( # pylint: disable=na ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort" path_format_arguments = { @@ -776,7 +881,7 @@ def build_managed_clusters_rotate_service_account_signing_keys_request( # pylin ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" path_format_arguments = { @@ -798,7 +903,7 @@ def build_managed_clusters_stop_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" path_format_arguments = { @@ -820,7 +925,7 @@ def build_managed_clusters_start_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" path_format_arguments = { @@ -844,7 +949,7 @@ def build_managed_clusters_run_command_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -874,7 +979,7 @@ def build_managed_clusters_get_command_result_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -903,7 +1008,7 @@ def build_managed_clusters_list_outbound_network_dependencies_endpoints_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -925,13 +1030,41 @@ def build_managed_clusters_list_outbound_network_dependencies_endpoints_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_managed_clusters_rebalance_load_balancers_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_managed_clusters_get_upgrade_profile_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -953,13 +1086,127 @@ def build_managed_clusters_get_upgrade_profile_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_managed_clusters_get_guardrails_versions_request( # pylint: disable=name-too-long + location: str, version: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "version": _SERIALIZER.url("version", version, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_clusters_list_guardrails_versions_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_clusters_get_safeguards_versions_request( # pylint: disable=name-too-long + location: str, version: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "version": _SERIALIZER.url("version", version, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_clusters_list_safeguards_versions_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + def build_managed_clusters_get_mesh_revision_profile_request( # pylint: disable=name-too-long location: str, mode: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -987,7 +1234,7 @@ def build_managed_clusters_list_mesh_revision_profiles_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1016,7 +1263,7 @@ def build_managed_clusters_get_mesh_upgrade_profile_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1045,7 +1292,7 @@ def build_managed_clusters_list_mesh_upgrade_profiles_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1073,7 +1320,7 @@ def build_managed_clusters_list_kubernetes_versions_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1102,7 +1349,7 @@ def build_maintenance_configurations_get_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1132,7 +1379,7 @@ def build_maintenance_configurations_create_or_update_request( # pylint: disabl _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1162,7 +1409,7 @@ def build_maintenance_configurations_delete_request( # pylint: disable=name-too ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" path_format_arguments = { @@ -1186,7 +1433,7 @@ def build_maintenance_configurations_list_by_managed_cluster_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1208,22 +1455,21 @@ def build_maintenance_configurations_list_by_managed_cluster_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_namespaces_get_request( - resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_get_request( + resource_group_name: str, maintenance_window_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + "maintenanceWindowName": _SERIALIZER.url("maintenance_window_name", maintenance_window_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1237,23 +1483,22 @@ def build_managed_namespaces_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_namespaces_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, maintenance_window_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + "maintenanceWindowName": _SERIALIZER.url("maintenance_window_name", maintenance_window_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1269,23 +1514,22 @@ def build_managed_namespaces_create_or_update_request( # pylint: disable=name-t return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_namespaces_update_request( - resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_update_tags_request( # pylint: disable=name-too-long + resource_group_name: str, maintenance_window_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + "maintenanceWindowName": _SERIALIZER.url("maintenance_window_name", maintenance_window_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1301,19 +1545,18 @@ def build_managed_namespaces_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_namespaces_delete_request( - resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_delete_request( + resource_group_name: str, maintenance_window_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows/{maintenanceWindowName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + "maintenanceWindowName": _SERIALIZER.url("maintenance_window_name", maintenance_window_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1324,21 +1567,20 @@ def build_managed_namespaces_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_managed_namespaces_list_by_managed_cluster_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_list_request( + resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/maintenanceWindows" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1352,22 +1594,19 @@ def build_managed_namespaces_list_by_managed_cluster_request( # pylint: disable return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_namespaces_list_credential_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +def build_maintenance_windows_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}/listCredential" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/maintenanceWindows" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1378,12 +1617,185 @@ def build_managed_namespaces_list_credential_request( # pylint: disable=name-to # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_machines_get_request( - resource_group_name: str, - resource_name: str, +def build_managed_namespaces_get_request( + resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_namespaces_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_namespaces_update_request( + resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_namespaces_delete_request( + resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_managed_namespaces_list_by_managed_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_namespaces_list_credential_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, managed_namespace_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}/listCredential" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "managedNamespaceName": _SERIALIZER.url("managed_namespace_name", managed_namespace_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_machines_get_request( + resource_group_name: str, + resource_name: str, agent_pool_name: str, machine_name: str, subscription_id: str, @@ -1392,7 +1804,7 @@ def build_machines_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1416,13 +1828,60 @@ def build_machines_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_machines_create_or_update_request( + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machine_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + "machineName": _SERIALIZER.url("machine_name", machine_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["if-match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + def build_machines_list_request( resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1455,7 +1914,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1491,7 +1950,7 @@ def build_private_endpoint_connections_update_request( # pylint: disable=name-t _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1527,7 +1986,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" path_format_arguments = { @@ -1553,7 +2012,7 @@ def build_private_endpoint_connections_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1581,7 +2040,7 @@ def build_snapshots_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1610,7 +2069,7 @@ def build_snapshots_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1641,7 +2100,7 @@ def build_snapshots_update_tags_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1670,7 +2129,7 @@ def build_snapshots_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" path_format_arguments = { @@ -1693,7 +2152,7 @@ def build_snapshots_list_by_resource_group_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1718,7 +2177,7 @@ def build_snapshots_list_request(subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1738,28 +2197,21 @@ def build_snapshots_list_request(subscription_id: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any +def build_managed_cluster_snapshots_get_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1773,29 +2225,22 @@ def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any +def build_managed_cluster_snapshots_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1811,25 +2256,22 @@ def build_trusted_access_role_bindings_create_or_update_request( # pylint: disa return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_delete_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any +def build_managed_cluster_snapshots_update_tags_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1837,24 +2279,50 @@ def build_trusted_access_role_bindings_delete_request( # pylint: disable=name-t # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too-long + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_cluster_snapshots_delete_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_managed_cluster_snapshots_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1868,22 +2336,54 @@ def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_identity_bindings_get_request( - resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +def build_managed_cluster_snapshots_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1897,23 +2397,29 @@ def build_identity_bindings_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_identity_bindings_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +def build_trusted_access_role_bindings_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1929,19 +2435,25 @@ def build_identity_bindings_create_or_update_request( # pylint: disable=name-to return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_identity_bindings_delete_request( - resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +def build_trusted_access_role_bindings_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + trusted_access_role_binding_name: str, + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1952,17 +2464,17 @@ def build_identity_bindings_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_identity_bindings_list_by_managed_cluster_request( # pylint: disable=name-too-long +def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -1980,15 +2492,25 @@ def build_identity_bindings_list_by_managed_cluster_request( # pylint: disable= return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_operations_list_request(**kwargs: Any) -> HttpRequest: +def build_load_balancers_get_request( + resource_group_name: str, resource_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/providers/Microsoft.ContainerService/operations" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -1999,21 +2521,23 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_link_resources_list_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +def build_load_balancers_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2022,23 +2546,47 @@ def build_private_link_resources_list_request( # pylint: disable=name-too-long _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_resolve_private_link_service_id_post_request( # pylint: disable=name-too-long +def build_load_balancers_delete_request( + resource_group_name: str, resource_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_load_balancers_list_by_managed_cluster_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -2051,27 +2599,27 @@ def build_resolve_private_link_service_id_post_request( # pylint: disable=name- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_roles_list_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_identity_bindings_get_request( + resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" - ) + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2085,146 +2633,6745 @@ def build_trusted_access_roles_list_request(location: str, subscription_id: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class AgentPoolsOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. +def build_identity_bindings_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`agent_pools` attribute. - """ + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), + } - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> _models.AgentPool: - """Gets the specified managed cluster agent pool. + _url: str = _url.format(**path_format_arguments) # type: ignore - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: AgentPool. The AgentPool is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - _request = build_agent_pools_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) +def build_identity_bindings_delete_request( + resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - response = pipeline_response.http_response + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), + } - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_identity_bindings_list_by_managed_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_jwt_authenticators_get_request( + resource_group_name: str, resource_name: str, jwt_authenticator_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_jwt_authenticators_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, jwt_authenticator_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_jwt_authenticators_delete_request( + resource_group_name: str, resource_name: str, jwt_authenticator_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_jwt_authenticators_list_by_managed_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_mesh_memberships_get_request( + resource_group_name: str, resource_name: str, mesh_membership_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_mesh_memberships_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, mesh_membership_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_mesh_memberships_delete_request( + resource_group_name: str, resource_name: str, mesh_membership_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_mesh_memberships_list_by_managed_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operations_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.ContainerService/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alert_configurations_get_request( + resource_group_name: str, resource_name: str, configuration_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alert_configurations_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, configuration_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_alert_configurations_delete_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, configuration_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations/{configurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "configurationName": _SERIALIZER.url("configuration_name", configuration_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_alert_configurations_list_by_managed_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/alertConfigurations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_status_result_list_by_agent_pool_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + subscription_id: str, + *, + active_only: Optional[bool] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if active_only is not None: + _params["activeOnly"] = _SERIALIZER.query("active_only", active_only, "bool") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_status_result_get_by_agent_pool_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + operation_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_status_result_list_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operation_status_result_get_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_link_resources_list_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_resolve_private_link_service_id_post_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_trusted_access_roles_list_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_container_service_list_node_image_versions_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_vm_skus_list_request( + location: str, subscription_id: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-06-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/vmSkus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if include_extended_locations is not None: + _params["includeExtendedLocations"] = _SERIALIZER.query( + "include_extended_locations", include_extended_locations, "bool" + ) + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class AgentPoolsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPool: + """Gets the specified managed cluster agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: AgentPool. The AgentPool is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + + _request = build_agent_pools_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPool, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, _types.AgentPool, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPool, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _types.AgentPool, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.AgentPool + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, _types.AgentPool, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. Is either a AgentPool type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPool or + ~azure.mgmt.containerservice.types.AgentPool or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AgentPool, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AgentPool].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AgentPool]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_agent_pools_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods + on a node without considering Pod Disruption Budget. Default value is None. + :paramtype ignore_pod_disruption_budget: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> ItemPaged["_models.AgentPool"]: + """Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of AgentPool + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AgentPool]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_agent_pools_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AgentPool], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _abort_latest_operation_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_agent_pools_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on agent pool. + + Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a + Canceling state and eventually to a Canceled state when cancellation finishes. If the operation + completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _complete_upgrade_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_agent_pools_complete_upgrade_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_complete_upgrade( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Completes the upgrade of an agent pool. + + Completes the upgrade operation for the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._complete_upgrade_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _delete_machines_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: Union[_models.AgentPoolDeleteMachinesParameter, _types.AgentPoolDeleteMachinesParameter, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(machines, (IOBase, bytes)): + _content = machines + else: + _content = json.dumps(machines, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_delete_machines_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: _models.AgentPoolDeleteMachinesParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machines: A list of machines from the agent pool to be deleted. Required. + :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: _types.AgentPoolDeleteMachinesParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machines: A list of machines from the agent pool to be deleted. Required. + :type machines: ~azure.mgmt.containerservice.types.AgentPoolDeleteMachinesParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machines: A list of machines from the agent pool to be deleted. Required. + :type machines: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: Union[_models.AgentPoolDeleteMachinesParameter, _types.AgentPoolDeleteMachinesParameter, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machines: A list of machines from the agent pool to be deleted. Is either a + AgentPoolDeleteMachinesParameter type or a IO[bytes] type. Required. + :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter or + ~azure.mgmt.containerservice.types.AgentPoolDeleteMachinesParameter or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_machines_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machines=machines, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_agent_pools_upgrade_node_image_version_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: `https://docs.microsoft.com/azure/aks/node-image-upgrade + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @overload + def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: _models.ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.containerservice.models.ListBootstrapDataRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: _types.ListBootstrapDataRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: ~azure.mgmt.containerservice.types.ListBootstrapDataRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_bootstrap_data( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + body: Union[_models.ListBootstrapDataRequest, _types.ListBootstrapDataRequest, IO[bytes]], + **kwargs: Any + ) -> _models.PoolBootstrapData: + """Lists bootstrap data for a FlexNode agent pool. + + Returns pool-level bootstrap configuration for FlexNode machines. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param body: The content of the action request. Is either a ListBootstrapDataRequest type or a + IO[bytes] type. Required. + :type body: ~azure.mgmt.containerservice.models.ListBootstrapDataRequest or + ~azure.mgmt.containerservice.types.ListBootstrapDataRequest or IO[bytes] + :return: PoolBootstrapData. The PoolBootstrapData is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PoolBootstrapData + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PoolBootstrapData] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_list_bootstrap_data_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PoolBootstrapData, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPoolUpdate, _types.AgentPoolUpdate, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _models.AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPoolUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: _types.AgentPoolUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. + :type parameters: ~azure.mgmt.containerservice.types.AgentPoolUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPoolUpdate, _types.AgentPoolUpdate, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Updates an agent pool in the specified managed cluster. Visit + `https://aka.ms/aks/concurrent-node-operations + `_ for more information. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param parameters: The resource properties to be updated. Is either a AgentPoolUpdate type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPoolUpdate or + ~azure.mgmt.containerservice.types.AgentPoolUpdate or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AgentPool, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AgentPool].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AgentPool]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def get_available_agent_pool_versions( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.AgentPoolAvailableVersions: + """Gets a list of supported Kubernetes versions for the specified agent pool. + + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + + _request = build_agent_pools_get_available_agent_pool_versions_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> _models.AgentPoolUpgradeProfile: + """Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_agent_pools_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ManagedClustersOperations: # pylint: disable=docstring-missing-param,too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """Gets a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedCluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedCluster, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedCluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or + ~azure.mgmt.containerservice.types.ManagedCluster or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedCluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedCluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedCluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Updates tags on a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either + a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedCluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedCluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedCluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + params_added_on={"2026-06-02-preview": ["ignore_pod_disruption_budget"]}, + api_versions_list=[ + "2025-10-01", + "2026-01-01", + "2026-02-01", + "2026-03-01", + "2026-04-01", + "2026-05-01", + "2026-06-01", + "2026-06-02-preview", + ], + ) + def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + @api_version_validation( + params_added_on={"2026-06-02-preview": ["ignore_pod_disruption_budget"]}, + api_versions_list=[ + "2025-10-01", + "2026-01-01", + "2026-02-01", + "2026-03-01", + "2026-04-01", + "2026-05-01", + "2026-06-01", + "2026-06-02-preview", + ], + ) + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods + on a node without considering Pod Disruption Budget. Default value is None. + :paramtype ignore_pod_disruption_budget: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: + """Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ManagedCluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedCluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + :return: An iterator like instance of ManagedCluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedCluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + 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. + + **WARNING**: This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :return: ManagedClusterAccessProfile. The ManagedClusterAccessProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_access_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + role_name=role_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterAccessProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_cluster_admin_credentials( + self, resource_group_name: str, resource_name: str, *, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the admin credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_managed_clusters_list_cluster_admin_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + *, + server_fqdn: Optional[str] = None, + format: Optional[Union[str, _models.Format]] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Lists the user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str + :keyword format: Only apply to AAD clusters, specifies the format of returned kubeconfig. + Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec + format kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and + "exec". Default value is None. + :paramtype format: str or ~azure.mgmt.containerservice.models.Format + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_managed_clusters_list_cluster_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + format=format, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_cluster_monitoring_user_credentials( + self, resource_group_name: str, resource_name: str, *, server_fqdn: Optional[str] = None, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_managed_clusters_list_cluster_monitoring_user_credentials_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.ManagedClusterServicePrincipalProfile, _types.ManagedClusterServicePrincipalProfile, IO[bytes] + ], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_reset_service_principal_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedClusterServicePrincipalProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.ManagedClusterServicePrincipalProfile, _types.ManagedClusterServicePrincipalProfile, IO[bytes] + ], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. Is either a + ManagedClusterServicePrincipalProfile type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile or + ~azure.mgmt.containerservice.types.ManagedClusterServicePrincipalProfile or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, _types.ManagedClusterAADProfile, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_reset_aad_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedClusterAADProfile, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterAADProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterAADProfile, _types.ManagedClusterAADProfile, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory + integration `_ to update your cluster with AKS-managed Azure + AD. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. Is either a + ManagedClusterAADProfile type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile or + ~azure.mgmt.containerservice.types.ManagedClusterAADProfile or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _rotate_cluster_certificates_initial( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the certificates of a managed cluster. + + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _abort_latest_operation_initial( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_abort_latest_operation_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_abort_latest_operation( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Aborts last operation running on managed cluster. + + Aborts the currently running operation on the managed cluster. The Managed Cluster will be + moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If + the operation completes before cancellation can take place, a 409 error code is returned. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._abort_latest_operation_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_rotate_service_account_signing_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_rotate_service_account_signing_keys( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the service account signing keys of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rotate_service_account_signing_keys_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_stop_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Stops a Managed Cluster. + + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_start_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: + """Starts a previously stopped Managed Cluster. + + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, _types.RunCommandRequest, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(request_payload, (IOBase, bytes)): + _content = request_payload + else: + _content = json.dumps(request_payload, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_run_command_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _models.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: _types.RunCommandRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: ~azure.mgmt.containerservice.types.RunCommandRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Required. + :type request_payload: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_run_command( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, _types.RunCommandRequest, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.RunCommandResult]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param request_payload: The run command request. Is either a RunCommandRequest type or a + IO[bytes] type. Required. + :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest or + ~azure.mgmt.containerservice.types.RunCommandRequest or IO[bytes] + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + 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, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.RunCommandResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.RunCommandResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.RunCommandResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def get_command_result( + self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any + ) -> Optional[_models.RunCommandResult]: + """Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param command_id: Id of the command. Required. + :type command_id: str + :return: RunCommandResult or None. The RunCommandResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.RunCommandResult or None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_command_result_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + command_id=command_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RunCommandResult, response.json()) + + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.OutboundEnvironmentEndpoint"]: + """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. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OutboundEnvironmentEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OutboundEnvironmentEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _rebalance_load_balancers_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.RebalanceLoadBalancersRequestBody, _types.RebalanceLoadBalancersRequestBody, IO[bytes] + ], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_rebalance_load_balancers_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.RebalanceLoadBalancersRequestBody, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: ~azure.mgmt.containerservice.types.RebalanceLoadBalancersRequestBody + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_rebalance_load_balancers( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[ + _models.RebalanceLoadBalancersRequestBody, _types.RebalanceLoadBalancersRequestBody, IO[bytes] + ], + **kwargs: Any + ) -> LROPoller[None]: + """Rebalance nodes across specific load balancers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The names of the load balancers to be rebalanced. If set to empty, all load + balancers will be rebalanced. Is either a RebalanceLoadBalancersRequestBody type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or + ~azure.mgmt.containerservice.types.RebalanceLoadBalancersRequestBody or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._rebalance_load_balancers_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """Gets the upgrade profile of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> _models.GuardrailsAvailableVersion: + """Gets supported Guardrails version in the specified subscription and location. + + Contains Guardrails version along with its support info and whether it is a default version. + + :param location: The name of the Azure region. Required. + :type location: str + :param version: Safeguards version. Required. + :type version: str + :return: GuardrailsAvailableVersion. The GuardrailsAvailableVersion is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersion + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_guardrails_versions_request( + location=location, + version=version, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GuardrailsAvailableVersion, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_guardrails_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.GuardrailsAvailableVersion"]: + """Gets a list of supported Guardrails versions in the specified subscription and location. + + Contains list of Guardrails version along with its support info and whether it is a default + version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of GuardrailsAvailableVersion + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.GuardrailsAvailableVersion]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_guardrails_versions_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.GuardrailsAvailableVersion], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_safeguards_versions(self, location: str, version: str, **kwargs: Any) -> _models.SafeguardsAvailableVersion: + """Gets supported Safeguards version in the specified subscription and location. + + Contains Safeguards version along with its support info and whether it is a default version. + + :param location: The name of the Azure region. Required. + :type location: str + :param version: Safeguards version. Required. + :type version: str + :return: SafeguardsAvailableVersion. The SafeguardsAvailableVersion is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_safeguards_versions_request( + location=location, + version=version, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SafeguardsAvailableVersion, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_safeguards_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.SafeguardsAvailableVersion"]: + """Gets a list of supported Safeguards versions in the specified subscription and location. + + Contains list of Safeguards version along with its support info and whether it is a default + version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of SafeguardsAvailableVersion + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SafeguardsAvailableVersion]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_safeguards_versions_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SafeguardsAvailableVersion], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: + """Gets a mesh revision profile for a specified mesh in the specified location. + + Contains extra metadata on the revision, including supported revisions, cluster compatibility + and available upgrades. + + :param location: The name of the Azure region. Required. + :type location: str + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_mesh_revision_profile_request( + location=location, + mode=mode, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged["_models.MeshRevisionProfile"]: + """Lists mesh revision profiles for all meshes in the specified location. + + Contains extra metadata on each revision, including supported revisions, cluster compatibility + and available upgrades. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of MeshRevisionProfile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_mesh_revision_profiles_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshRevisionProfile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_mesh_upgrade_profile( + self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any + ) -> _models.MeshUpgradeProfile: + """Gets available upgrades for a service mesh in a cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_mesh_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + mode=mode, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.AgentPool, response.json()) + deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - parameters: Union[_models.AgentPool, _types.AgentPool, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: + @distributed_trace + def list_mesh_upgrade_profiles( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.MeshUpgradeProfile"]: + """Lists available upgrades for all service meshes in a specific cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MeshUpgradeProfile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_clusters_list_mesh_upgrade_profiles_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshUpgradeProfile], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: + """Gets a list of supported Kubernetes versions in the specified subscription. + + Contains extra metadata on the version, including supported patch versions, capabilities, + available upgrades, and details on preview status of the version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) + + _request = build_managed_clusters_list_kubernetes_versions_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class MaintenanceConfigurationsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> _models.MaintenanceConfiguration: + """Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - _request = build_agent_pools_create_or_update_request( + _request = build_maintenance_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, + config_name=config_name, subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -2234,18 +9381,19 @@ def _create_or_update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -2253,263 +9401,169 @@ def _create_or_update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload - def begin_create_or_update( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - parameters: _models.AgentPool, + config_name: str, + parameters: _models.MaintenanceConfiguration, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """Creates or updates an agent pool in the specified managed cluster. + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param parameters: The agent pool to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.AgentPool + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - parameters: _types.AgentPool, + config_name: str, + parameters: _types.MaintenanceConfiguration, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """Creates or updates an agent pool in the specified managed cluster. + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param parameters: The agent pool to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.AgentPool + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, + config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """Creates or updates an agent pool in the specified managed cluster. + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param parameters: The agent pool to create or update. Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_or_update( + def create_or_update( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - parameters: Union[_models.AgentPool, _types.AgentPool, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, _types.MaintenanceConfiguration, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """Creates or updates an agent pool in the specified managed cluster. + ) -> _models.MaintenanceConfiguration: + """Creates or updates a maintenance configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param parameters: The agent pool to create or update. Is either a AgentPool type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.AgentPool or - ~azure.mgmt.containerservice.types.AgentPool or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is either a + MaintenanceConfiguration type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or + ~azure.mgmt.containerservice.types.MaintenanceConfiguration or IO[bytes] + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.AgentPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AgentPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AgentPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - _request = build_agent_pools_delete_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_maintenance_configurations_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, + config_name=config_name, subscription_id=self._config.subscription_id, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, - etag=etag, - match_condition=match_condition, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -2519,18 +9573,19 @@ def _delete_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -2538,119 +9593,99 @@ def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace - def begin_delete( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes an agent pool in the specified managed cluster. + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :keyword ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods - on a node without considering Pod Disruption Budget. Default value is None. - :paramtype ignore_pod_disruption_budget: bool - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :return: None + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, - etag=etag, - match_condition=match_condition, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + _request = build_maintenance_configurations_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + config_name=config_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> ItemPaged["_models.AgentPool"]: - """Gets a list of agent pools in the specified managed cluster. + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.MaintenanceConfiguration"]: + """Gets a list of maintenance configurations in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of AgentPool - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.AgentPool] + :return: An iterator like instance of MaintenanceConfiguration + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.AgentPool]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2663,7 +9698,7 @@ def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_agent_pools_list_request( + _request = build_maintenance_configurations_list_by_managed_cluster_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -2706,7 +9741,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.AgentPool], + List[_models.MaintenanceConfiguration], deserialized.get("value", []), ) if cls: @@ -2720,22 +9755,144 @@ def get_next(next_link=None): pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) - response = pipeline_response.http_response + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class MaintenanceWindowsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`maintenance_windows` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get( + self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any + ) -> _models.MaintenanceWindowResource: + """Gets the specified maintenance window. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) + + _request = build_maintenance_windows_get_request( + resource_group_name=resource_group_name, + maintenance_window_name=maintenance_window_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore - def _abort_latest_operation_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _create_or_update_initial( + self, + resource_group_name: str, + maintenance_window_name: str, + resource: Union[_models.MaintenanceWindowResource, _types.MaintenanceWindowResource, IO[bytes]], + **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2745,17 +9902,26 @@ def _abort_latest_operation_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_agent_pools_abort_latest_operation_request( + content_type = content_type or "application/json" + _content = None + if isinstance(resource, (IOBase, bytes)): + _content = resource + else: + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_maintenance_windows_create_or_update_request( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -2772,7 +9938,7 @@ def _abort_latest_operation_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -2785,11 +9951,10 @@ def _abort_latest_operation_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: + if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -2799,39 +9964,146 @@ def _abort_latest_operation_initial( return deserialized # type: ignore - @distributed_trace - def begin_abort_latest_operation( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Aborts last operation running on agent pool. + @overload + def begin_create_or_update( + self, + resource_group_name: str, + maintenance_window_name: str, + resource: _models.MaintenanceWindowResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. - Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a - Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - completes before cancellation can take place, a 409 error code is returned. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: ~azure.mgmt.containerservice.models.MaintenanceWindowResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + maintenance_window_name: str, + resource: _types.MaintenanceWindowResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: ~azure.mgmt.containerservice.types.MaintenanceWindowResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + maintenance_window_name: str, + resource: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Required. + :type resource: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_create_or_update( + self, + resource_group_name: str, + maintenance_window_name: str, + resource: Union[_models.MaintenanceWindowResource, _types.MaintenanceWindowResource, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.MaintenanceWindowResource]: + """Creates or updates a maintenance window. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param resource: The maintenance window to create or update. Is either a + MaintenanceWindowResource type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.containerservice.models.MaintenanceWindowResource or + ~azure.mgmt.containerservice.types.MaintenanceWindowResource or IO[bytes] + :return: An instance of LROPoller that returns MaintenanceWindowResource. The + MaintenanceWindowResource is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MaintenanceWindowResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._abort_latest_operation_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + maintenance_window_name=maintenance_window_name, + resource=resource, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -2840,9 +10112,12 @@ def begin_abort_latest_operation( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -2857,260 +10132,216 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.MaintenanceWindowResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _delete_machines_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: Union[_models.AgentPoolDeleteMachinesParameter, _types.AgentPoolDeleteMachinesParameter, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(machines, (IOBase, bytes)): - _content = machines - else: - _content = json.dumps(machines, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_agent_pools_delete_machines_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") + return LROPoller[_models.MaintenanceWindowResource]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore @overload - def begin_delete_machines( + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: _models.AgentPoolDeleteMachinesParameter, + maintenance_window_name: str, + properties: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in an agent pool. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :paramtype content_type: str + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_delete_machines( + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: _types.AgentPoolDeleteMachinesParameter, + maintenance_window_name: str, + properties: _types.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in an agent pool. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: ~azure.mgmt.containerservice.types.AgentPoolDeleteMachinesParameter + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: ~azure.mgmt.containerservice.types.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_delete_machines( + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: IO[bytes], + maintenance_window_name: str, + properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in an agent pool. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: IO[bytes] + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. + Required. + :type properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_delete_machines( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "maintenance_window_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def update_tags( self, resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: Union[_models.AgentPoolDeleteMachinesParameter, _types.AgentPoolDeleteMachinesParameter, IO[bytes]], + maintenance_window_name: str, + properties: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in an agent pool. + ) -> _models.MaintenanceWindowResource: + """Updates tags on a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machines: A list of machines from the agent pool to be deleted. Is either a - AgentPoolDeleteMachinesParameter type or a IO[bytes] type. Required. - :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter or - ~azure.mgmt.containerservice.types.AgentPoolDeleteMachinesParameter or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str + :param properties: Parameters supplied to the Update maintenance window Tags operation. Is + either a TagsObject type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: MaintenanceWindowResource. The MaintenanceWindowResource is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceWindowResource :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_machines_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - machines=machines, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.MaintenanceWindowResource] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_maintenance_windows_update_tags_request( + resource_group_name=resource_group_name, + maintenance_window_name=maintenance_window_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + deserialized = _deserialize(_models.MaintenanceWindowResource, response.json()) - def _upgrade_node_image_version_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> Iterator[bytes]: + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "maintenance_window_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _delete_initial(self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -3124,10 +10355,9 @@ def _upgrade_node_image_version_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_agent_pools_upgrade_node_image_version_request( + _request = build_maintenance_windows_delete_request( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + maintenance_window_name=maintenance_window_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -3146,7 +10376,7 @@ def _upgrade_node_image_version_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -3160,9 +10390,6 @@ def _upgrade_node_image_version_initial( response_headers = {} if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) @@ -3174,23 +10401,21 @@ def _upgrade_node_image_version_initial( return deserialized # type: ignore @distributed_trace - def begin_upgrade_node_image_version( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Upgrades the node image version of an agent pool to the latest. - - Upgrading the node image version of an agent pool applies the newest OS and runtime updates to - the nodes. AKS provides one new image per week with the latest updates. For more details on - node image versions, see: `https://docs.microsoft.com/azure/aks/node-image-upgrade - `_. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "maintenance_window_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_delete(self, resource_group_name: str, maintenance_window_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes a maintenance window. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str + :param maintenance_window_name: The name of the maintenance window. Required. + :type maintenance_window_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -3203,10 +10428,9 @@ def begin_upgrade_node_image_version( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._upgrade_node_image_version_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, + maintenance_window_name=maintenance_window_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -3241,25 +10465,27 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def get_available_agent_pool_versions( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.AgentPoolAvailableVersions: - """Gets a list of supported Kubernetes versions for the specified agent pool. - - See `supported Kubernetes versions - `_ for more details about - the version lifecycle. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.MaintenanceWindowResource"]: + """Lists maintenance windows in the specified resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions + :return: An iterator like instance of MaintenanceWindowResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MaintenanceWindowResource]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -3268,72 +10494,98 @@ def get_available_agent_pool_versions( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) + _request = build_maintenance_windows_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_agent_pools_get_available_agent_pool_versions_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MaintenanceWindowResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - response = pipeline_response.http_response + def get_next(next_link=None): + _request = prepare_request(next_link) - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) @distributed_trace - def get_upgrade_profile( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> _models.AgentPoolUpgradeProfile: - """Gets the upgrade profile for an agent pool. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.MaintenanceWindowResource"]: + """Lists maintenance windows in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile + :return: An iterator like instance of MaintenanceWindowResource + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceWindowResource] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MaintenanceWindowResource]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -3342,65 +10594,87 @@ def get_upgrade_profile( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) + _request = build_maintenance_windows_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_agent_pools_get_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + return _request - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MaintenanceWindowResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) -class ManagedClustersOperations: # pylint: disable=docstring-missing-param,too-many-public-methods +class ManagedNamespacesOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`managed_clusters` attribute. + :attr:`managed_namespaces` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3411,16 +10685,20 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: - """Gets a managed cluster. + def get( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.ManagedNamespace: + """Gets the specified namespace of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedCluster + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3431,101 +10709,17 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedCluster, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_managed_clusters_create_or_update_request( + _request = build_managed_namespaces_get_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -3535,18 +10729,19 @@ def _create_or_update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -3554,219 +10749,22 @@ def _create_or_update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.ManagedCluster, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: _types.ManagedCluster, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedCluster - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedCluster, _types.ManagedCluster, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Creates or updates a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or - ~azure.mgmt.containerservice.types.ManagedCluster or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedCluster, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedCluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedCluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_tags_initial( + def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -3775,12 +10773,6 @@ def _update_tags_initial( 409: ResourceExistsError, 304: ResourceNotModifiedError, } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -3796,12 +10788,11 @@ def _update_tags_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_clusters_update_tags_request( + _request = build_managed_namespaces_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, content_type=content_type, api_version=self._config.api_version, content=_content, @@ -3821,7 +10812,7 @@ def _update_tags_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -3834,11 +10825,10 @@ def _update_tags_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: + if response.status_code == 201: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -3849,313 +10839,148 @@ def _update_tags_initial( return deserialized # type: ignore @overload - def begin_update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.TagsObject, + managed_namespace_name: str, + parameters: _models.ManagedNamespace, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _types.TagsObject, + managed_namespace_name: str, + parameters: _types.ManagedNamespace, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedNamespace :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, + managed_namespace_name: str, parameters: IO[bytes], *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """Updates tags on a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either - a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or - ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedCluster, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedCluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedCluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def begin_delete( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], **kwargs: Any - ) -> LROPoller[None]: - """Deletes a managed cluster. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Is either a ManagedNamespace type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or + ~azure.mgmt.containerservice.types.ManagedNamespace or IO[bytes] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - etag=etag, - match_condition=match_condition, + managed_namespace_name=managed_namespace_name, + parameters=parameters, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -4164,317 +10989,153 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: - """Lists managed clusters in the specified subscription and resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of ManagedCluster - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_managed_clusters_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedCluster], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: - """Gets a list of managed clusters in the specified subscription. - - :return: An iterator like instance of ManagedCluster - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_managed_clusters_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedCluster], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedNamespace, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - return ItemPaged(get_next, extract_data) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - @distributed_trace - 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. + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedNamespace].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedNamespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - **WARNING**: This API will be deprecated. Instead use `ListClusterUserCredentials - `_ or - `ListClusterAdminCredentials - `_ . + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param role_name: The name of the role for managed cluster accessProfile resource. Required. - :type role_name: str - :return: ManagedClusterAccessProfile. The ManagedClusterAccessProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_access_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - role_name=role_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterAccessProfile, response.json()) + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :raises ~azure.core.exceptions.HttpResponseError: + """ - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. - return deserialized # type: ignore + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list_cluster_admin_credentials( - self, resource_group_name: str, resource_name: str, *, server_fqdn: Optional[str] = None, **kwargs: Any - ) -> _models.CredentialResults: - """Lists the admin credentials of a managed cluster. + def update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4485,17 +11146,27 @@ def list_cluster_admin_credentials( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_managed_clusters_list_cluster_admin_credentials_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_namespaces_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - server_fqdn=server_fqdn, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -4528,41 +11199,16 @@ def list_cluster_admin_credentials( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.CredentialResults, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def list_cluster_user_credentials( - self, - resource_group_name: str, - resource_name: str, - *, - server_fqdn: Optional[str] = None, - format: Optional[Union[str, _models.Format]] = None, - **kwargs: Any - ) -> _models.CredentialResults: - """Lists the user credentials of a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :keyword format: Only apply to AAD clusters, specifies the format of returned kubeconfig. - Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec - format kubeconfig, which requires kubelogin binary in the path. Known values are: "azure" and - "exec". Default value is None. - :paramtype format: str or ~azure.mgmt.containerservice.models.Format - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _delete_initial( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -4574,14 +11220,13 @@ def list_cluster_user_credentials( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_list_cluster_user_credentials_request( + _request = build_managed_namespaces_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - server_fqdn=server_fqdn, - format=format, api_version=self._config.api_version, headers=_headers, params=_params, @@ -4592,19 +11237,18 @@ def list_cluster_user_credentials( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -4612,33 +11256,103 @@ def list_cluster_user_credentials( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def list_cluster_monitoring_user_credentials( - self, resource_group_name: str, resource_name: str, *, server_fqdn: Optional[str] = None, **kwargs: Any - ) -> _models.CredentialResults: - """Lists the cluster monitoring user credentials of a managed cluster. + def begin_delete( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a namespace. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.ManagedNamespace"]: + """Gets a list of managed namespaces in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of ManagedNamespace + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -4647,65 +11361,97 @@ def list_cluster_monitoring_user_credentials( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + _request = build_managed_namespaces_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_managed_clusters_list_cluster_monitoring_user_credentials_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - server_fqdn=server_fqdn, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + return _request - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedNamespace], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) - def _reset_service_principal_profile_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[ - _models.ManagedClusterServicePrincipalProfile, _types.ManagedClusterServicePrincipalProfile, IO[bytes] - ], - **kwargs: Any - ) -> Iterator[bytes]: + @distributed_trace + def list_credential( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -4714,26 +11460,17 @@ def _reset_service_principal_profile_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - _request = build_managed_clusters_reset_service_principal_profile_request( + _request = build_managed_namespaces_list_credential_request( resource_group_name=resource_group_name, resource_name=resource_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -4743,18 +11480,19 @@ def _reset_service_principal_profile_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -4762,184 +11500,140 @@ def _reset_service_principal_profile_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def begin_reset_service_principal_profile( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.ManagedClusterServicePrincipalProfile, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Reset the Service Principal Profile of a managed cluster. - - This action cannot be performed on a cluster that is not using a service principal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The service principal profile to set on the managed cluster. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_reset_service_principal_profile( - self, - resource_group_name: str, - resource_name: str, - parameters: _types.ManagedClusterServicePrincipalProfile, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Reset the Service Principal Profile of a managed cluster. - - This action cannot be performed on a cluster that is not using a service principal. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The service principal profile to set on the managed cluster. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterServicePrincipalProfile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - @overload - def begin_reset_service_principal_profile( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Reset the Service Principal Profile of a managed cluster. +class MachinesOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. - This action cannot be performed on a cluster that is not using a service principal. + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`machines` attribute. + """ - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The service principal profile to set on the managed cluster. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def begin_reset_service_principal_profile( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[ - _models.ManagedClusterServicePrincipalProfile, _types.ManagedClusterServicePrincipalProfile, IO[bytes] - ], - **kwargs: Any - ) -> LROPoller[None]: - """Reset the Service Principal Profile of a managed cluster. - - This action cannot be performed on a cluster that is not using a service principal. + def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any + ) -> _models.Machine: + """Get a specific machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The service principal profile to set on the managed cluster. Is either a - ManagedClusterServicePrincipalProfile type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile or - ~azure.mgmt.containerservice.types.ManagedClusterServicePrincipalProfile or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :return: Machine. The Machine is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Machine :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + _request = build_machines_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + deserialized = _deserialize(_models.Machine, response.json()) - def _reset_aad_profile_initial( + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "machine_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.ManagedClusterAADProfile, _types.ManagedClusterAADProfile, IO[bytes]], + agent_pool_name: str, + machine_name: str, + parameters: Union[_models.Machine, _types.Machine, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -4948,6 +11642,12 @@ def _reset_aad_profile_initial( 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -4963,10 +11663,14 @@ def _reset_aad_profile_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_clusters_reset_aad_profile_request( + _request = build_machines_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, content_type=content_type, api_version=self._config.api_version, content=_content, @@ -4986,7 +11690,7 @@ def _reset_aad_profile_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -4999,8 +11703,10 @@ def _reset_aad_profile_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -5011,138 +11717,201 @@ def _reset_aad_profile_initial( return deserialized # type: ignore @overload - def begin_reset_aad_profile( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.ManagedClusterAADProfile, + agent_pool_name: str, + machine_name: str, + parameters: _models.Machine, *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[None]: - """Reset the AAD Profile of a managed cluster. - - **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory - integration `_ to update your cluster with AKS-managed Azure - AD. + ) -> LROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.Machine :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_reset_aad_profile( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _types.ManagedClusterAADProfile, + agent_pool_name: str, + machine_name: str, + parameters: _types.Machine, *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[None]: - """Reset the AAD Profile of a managed cluster. - - **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory - integration `_ to update your cluster with AKS-managed Azure - AD. + ) -> LROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterAADProfile + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.Machine :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_reset_aad_profile( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, + agent_pool_name: str, + machine_name: str, parameters: IO[bytes], *, content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[None]: - """Reset the AAD Profile of a managed cluster. - - **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory - integration `_ to update your cluster with AKS-managed Azure - AD. + ) -> LROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Required. + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_reset_aad_profile( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "machine_name", + "content_type", + "accept", + "etag", + "match_condition", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.ManagedClusterAADProfile, _types.ManagedClusterAADProfile, IO[bytes]], + agent_pool_name: str, + machine_name: str, + parameters: Union[_models.Machine, _types.Machine, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[None]: - """Reset the AAD Profile of a managed cluster. - - **WARNING**: This API will be deprecated. Please see `AKS-managed Azure Active Directory - integration `_ to update your cluster with AKS-managed Azure - AD. + ) -> LROPoller[_models.Machine]: + """Creates or updates a machine in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: The AAD profile to set on the Managed Cluster. Is either a - ManagedClusterAADProfile type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile or - ~azure.mgmt.containerservice.types.ManagedClusterAADProfile or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :param parameters: The machine to create or update. Is either a Machine type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.Machine or + ~azure.mgmt.containerservice.types.Machine or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Machine. The Machine is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._reset_aad_profile_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, parameters=parameters, + etag=etag, + match_condition=match_condition, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -5152,9 +11921,12 @@ def begin_reset_aad_profile( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Machine, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -5169,17 +11941,38 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.Machine].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return LROPoller[_models.Machine]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> ItemPaged["_models.Machine"]: + """Gets a list of machines in the specified agent pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An iterator like instance of Machine + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Machine] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) - def _rotate_cluster_certificates_initial( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5188,121 +11981,121 @@ def _rotate_cluster_certificates_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + _request = build_machines_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_managed_clusters_rotate_cluster_certificates_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Machine], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + return pipeline_response - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + return ItemPaged(get_next, extract_data) - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore +class PrivateEndpointConnectionsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. - return deserialized # type: ignore + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def begin_rotate_cluster_certificates( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Rotates the certificates of a managed cluster. + def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets the specified private endpoint connection. - See `Certificate rotation `_ for - more details about rotating managed cluster certificates. + To learn more about private clusters, see: + `https://docs.microsoft.com/azure/aks/private-clusters + `_. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _abort_latest_operation_initial( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5314,11 +12107,12 @@ def _abort_latest_operation_initial( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - _request = build_managed_clusters_abort_latest_operation_request( + _request = build_private_endpoint_connections_get_request( resource_group_name=resource_group_name, resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5330,18 +12124,19 @@ def _abort_latest_operation_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -5349,87 +12144,136 @@ def _abort_latest_operation_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def begin_abort_latest_operation( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Aborts last operation running on managed cluster. + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. - Aborts the currently running operation on the managed cluster. The Managed Cluster will be - moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If - the operation completes before cancellation can take place, a 409 error code is returned. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: _types.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: ~azure.mgmt.containerservice.types.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Updates a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. Is either a + PrivateEndpointConnection type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or + ~azure.mgmt.containerservice.types.PrivateEndpointConnection or IO[bytes] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._abort_latest_operation_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5438,16 +12282,27 @@ def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-lo } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - _request = build_managed_clusters_rotate_service_account_signing_keys_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -5457,18 +12312,19 @@ def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-lo _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -5476,78 +12332,19 @@ def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-lo ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def begin_rotate_service_account_signing_keys( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Rotates the service account signing keys of a managed cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._rotate_service_account_signing_keys_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: + def _delete_initial( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5561,9 +12358,10 @@ def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_stop_request( + _request = build_private_endpoint_connections_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5582,7 +12380,7 @@ def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -5595,8 +12393,10 @@ def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + if response.status_code == 200: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -5607,20 +12407,18 @@ def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: return deserialized # type: ignore @distributed_trace - def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: - """Stops a Managed Cluster. - - This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a - cluster stops the control plane and agent nodes entirely, while maintaining all object and - cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster - `_ for more details about stopping a - cluster. + def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -5633,9 +12431,10 @@ def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = self._stop_initial( + 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, headers=_headers, params=_params, @@ -5669,7 +12468,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: + @distributed_trace + 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. + + To learn more about private clusters, see: + `https://docs.microsoft.com/azure/aks/private-clusters + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5681,9 +12499,9 @@ def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - _request = build_managed_clusters_start_request( + _request = build_private_endpoint_connections_list_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -5697,18 +12515,19 @@ def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -5716,85 +12535,47 @@ def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + +class SnapshotsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`snapshots` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace - def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> LROPoller[None]: - """Starts a previously stopped Managed Cluster. - - See `starting a cluster `_ for more - details about starting a cluster. + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: + """Gets a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _run_command_initial( - self, - resource_group_name: str, - resource_name: str, - request_payload: Union[_models.RunCommandRequest, _types.RunCommandRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5803,26 +12584,16 @@ def _run_command_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(request_payload, (IOBase, bytes)): - _content = request_payload - else: - _content = json.dumps(request_payload, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - _request = build_managed_clusters_run_command_request( + _request = build_snapshots_get_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -5832,18 +12603,19 @@ def _run_command_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -5851,209 +12623,118 @@ def _run_command_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload - def begin_run_command( + def create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: _models.RunCommandRequest, + parameters: _models.Snapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.RunCommandResult]: - """Submits a command to run against the Managed Cluster. - - AKS will create a pod to run the command. This is primarily useful for private clusters. For - more information see `AKS Run Command - `_. + ) -> _models.Snapshot: + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Required. - :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_run_command( + def create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: _types.RunCommandRequest, + parameters: _types.Snapshot, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.RunCommandResult]: - """Submits a command to run against the Managed Cluster. - - AKS will create a pod to run the command. This is primarily useful for private clusters. For - more information see `AKS Run Command - `_. + ) -> _models.Snapshot: + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Required. - :type request_payload: ~azure.mgmt.containerservice.types.RunCommandRequest + :param parameters: The snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.Snapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_run_command( + def create_or_update( self, resource_group_name: str, resource_name: str, - request_payload: IO[bytes], + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.RunCommandResult]: - """Submits a command to run against the Managed Cluster. - - AKS will create a pod to run the command. This is primarily useful for private clusters. For - more information see `AKS Run Command - `_. + ) -> _models.Snapshot: + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param request_payload: The run command request. Required. - :type request_payload: IO[bytes] + :param parameters: The snapshot to create or update. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_run_command( - self, - resource_group_name: str, - resource_name: str, - request_payload: Union[_models.RunCommandRequest, _types.RunCommandRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.RunCommandResult]: - """Submits a command to run against the Managed Cluster. - - AKS will create a pod to run the command. This is primarily useful for private clusters. For - more information see `AKS Run Command - `_. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param request_payload: The run command request. Is either a RunCommandRequest type or a - IO[bytes] type. Required. - :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest or - ~azure.mgmt.containerservice.types.RunCommandRequest or IO[bytes] - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - 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, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.RunCommandResult, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.RunCommandResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.RunCommandResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def get_command_result( - self, resource_group_name: str, resource_name: str, command_id: str, **kwargs: Any - ) -> Optional[_models.RunCommandResult]: - """Gets the results of a command which has been run on the Managed Cluster. + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param command_id: Id of the command. Required. - :type command_id: str - :return: RunCommandResult or None. The RunCommandResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.RunCommandResult or None + :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot or + ~azure.mgmt.containerservice.types.Snapshot or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6064,17 +12745,26 @@ def get_command_result( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_command_result_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - command_id=command_id, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -6091,7 +12781,7 @@ def get_command_result( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -6104,143 +12794,118 @@ def get_command_result( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None - response_headers = {} - if response.status_code == 200: - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.RunCommandResult, response.json()) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @distributed_trace - def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.OutboundEnvironmentEndpoint"]: - """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. + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint] + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.OutboundEnvironmentEndpoint]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_managed_clusters_list_outbound_network_dependencies_endpoints_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OutboundEnvironmentEndpoint], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ - return pipeline_response + @overload + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. - return ItemPaged(get_next, extract_data) + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def get_upgrade_profile( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.ManagedClusterUpgradeProfile: - """Gets the upgrade profile of a managed cluster. + def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.Snapshot: + """Updates tags on a snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a + TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6251,16 +12916,26 @@ def get_upgrade_profile( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_upgrade_profile_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_snapshots_update_tags_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -6293,7 +12968,7 @@ def get_upgrade_profile( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -6301,18 +12976,18 @@ def get_upgrade_profile( return deserialized # type: ignore @distributed_trace - def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: - """Gets a mesh revision profile for a specified mesh in the specified location. - - Contains extra metadata on the revision, including supported revisions, cluster compatibility - and available upgrades. + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """Deletes a snapshot. - :param location: The name of the Azure region. Required. - :type location: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: None + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6326,11 +13001,11 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_revision_profile_request( - location=location, - mode=mode, + _request = build_snapshots_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6341,20 +13016,14 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -6362,33 +13031,24 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged["_models.MeshRevisionProfile"]: - """Lists mesh revision profiles for all meshes in the specified location. - - Contains extra metadata on each revision, including supported revisions, cluster compatibility - and available upgrades. + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: + """Lists snapshots in the specified subscription and resource group. - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of MeshRevisionProfile - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6401,8 +13061,8 @@ def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_mesh_revision_profiles_request( - location=location, + _request = build_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6443,7 +13103,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshRevisionProfile], + List[_models.Snapshot], deserialized.get("value", []), ) if cls: @@ -6472,99 +13132,17 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def get_mesh_upgrade_profile( - self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any - ) -> _models.MeshUpgradeProfile: - """Gets available upgrades for a service mesh in a cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_mesh_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mode=mode, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_mesh_upgrade_profiles( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.MeshUpgradeProfile"]: - """Lists available upgrades for all service meshes in a specific cluster. + def list(self, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of MeshUpgradeProfile - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6577,9 +13155,7 @@ def list_mesh_upgrade_profiles( def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_mesh_upgrade_profiles_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_snapshots_list_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6620,7 +13196,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshUpgradeProfile], + List[_models.Snapshot], deserialized.get("value", []), ) if cls: @@ -6648,18 +13224,42 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @distributed_trace - def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: - """Gets a list of supported Kubernetes versions in the specified subscription. - Contains extra metadata on the version, including supported patch versions, capabilities, - available upgrades, and details on preview status of the version. +class ManagedClusterSnapshotsOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. - :param location: The name of the Azure region. Required. - :type location: str - :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`managed_cluster_snapshots` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: + """Gets a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6673,10 +13273,11 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - _request = build_managed_clusters_list_kubernetes_versions_request( - location=location, + _request = build_managed_cluster_snapshots_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6711,48 +13312,129 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. -class MaintenanceConfigurationsOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`maintenance_configurations` attribute. - """ + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _types.ManagedClusterSnapshot, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.ManagedClusterSnapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param parameters: The managed cluster snapshot to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Gets the specified maintenance configuration of a managed cluster. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterSnapshot, _types.ManagedClusterSnapshot, IO[bytes]], + **kwargs: Any + ) -> _models.ManagedClusterSnapshot: + """Creates or updates a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param parameters: The managed cluster snapshot to create or update. Is either a + ManagedClusterSnapshot type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or + ~azure.mgmt.containerservice.types.ManagedClusterSnapshot or IO[bytes] + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6763,17 +13445,26 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_get_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_cluster_snapshots_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -6790,7 +13481,7 @@ def get( response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -6806,7 +13497,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -6814,127 +13505,124 @@ def get( return deserialized # type: ignore @overload - def create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: _models.MaintenanceConfiguration, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: _types.MaintenanceConfiguration, + parameters: _types.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.MaintenanceConfiguration + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. + :type parameters: ~azure.mgmt.containerservice.types.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_or_update( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def update_tags( self, resource_group_name: str, resource_name: str, - config_name: str, - parameters: Union[_models.MaintenanceConfiguration, _types.MaintenanceConfiguration, IO[bytes]], + parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + ) -> _models.ManagedClusterSnapshot: + """Updates tags on a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Is either a - MaintenanceConfiguration type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or - ~azure.mgmt.containerservice.types.MaintenanceConfiguration or IO[bytes] - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. + Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or + ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] + :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -6949,7 +13637,7 @@ def create_or_update( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -6958,10 +13646,9 @@ def create_or_update( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_maintenance_configurations_create_or_update_request( + _request = build_managed_cluster_snapshots_update_tags_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -6982,7 +13669,7 @@ def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -6998,7 +13685,7 @@ def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -7006,19 +13693,23 @@ def create_or_update( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name"] + }, + api_versions_list=["2026-06-02-preview"], + ) def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> None: - """Deletes a maintenance configuration. + """Deletes a managed cluster snapshot. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: @@ -7031,63 +13722,165 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_managed_cluster_snapshots_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.ManagedClusterSnapshot"]: + """Lists managed cluster snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of ManagedClusterSnapshot + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_cluster_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request - cls: ClsType[None] = kwargs.pop("cls", None) + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedClusterSnapshot], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - _request = build_maintenance_configurations_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + def get_next(next_link=None): + _request = prepare_request(next_link) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + return pipeline_response - if cls: - return cls(pipeline_response, None, {}) # type: ignore + return ItemPaged(get_next, extract_data) @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.MaintenanceConfiguration"]: - """Gets a list of maintenance configurations in the specified managed cluster. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={"2026-06-02-preview": ["api_version", "subscription_id", "accept"]}, + api_versions_list=["2026-06-02-preview"], + ) + def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedClusterSnapshot"]: + """Gets a list of managed cluster snapshots in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of MaintenanceConfiguration + :return: An iterator like instance of ManagedClusterSnapshot :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7100,9 +13893,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_maintenance_configurations_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_managed_cluster_snapshots_list_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7143,7 +13934,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MaintenanceConfiguration], + List[_models.ManagedClusterSnapshot], deserialized.get("value", []), ) if cls: @@ -7172,14 +13963,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ManagedNamespacesOperations: # pylint: disable=docstring-missing-param +class TrustedAccessRoleBindingsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`managed_namespaces` attribute. + :attr:`trusted_access_role_bindings` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -7191,19 +13982,20 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def get( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.ManagedNamespace: - """Gets the specified namespace of a managed cluster. + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """Get a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -7217,12 +14009,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) - _request = build_managed_namespaces_get_request( + _request = build_trusted_access_role_bindings_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7257,462 +14049,275 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_namespaces_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.ManagedNamespace, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _types.ManagedNamespace, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.ManagedNamespace - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ + return deserialized # type: ignore - @distributed_trace - def begin_create_or_update( + def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, _types.ManagedNamespace, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[ + _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] + ], **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Is either a ManagedNamespace type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or - ~azure.mgmt.containerservice.types.ManagedNamespace or IO[bytes] - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(trusted_access_role_binding, (IOBase, bytes)): + _content = trusted_access_role_binding + else: + _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_trusted_access_role_bindings_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedNamespace].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") ) - return LROPoller[_models.ManagedNamespace]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: _models.TagsObject, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: _types.TagsObject, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _types.TrustedAccessRoleBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: IO[bytes] + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Required. + :type trusted_access_role_binding: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[ + _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] + ], **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """Create or update a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or - ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :param trusted_access_role_binding: A trusted access role binding. Is either a + TrustedAccessRoleBinding type or a IO[bytes] type. Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + or ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding or IO[bytes] + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, + trusted_access_role_binding=trusted_access_role_binding, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - _request = build_managed_namespaces_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.TrustedAccessRoleBinding]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _delete_initial( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7727,10 +14332,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_namespaces_delete_request( + _request = build_trusted_access_role_bindings_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -7778,17 +14383,17 @@ def _delete_initial( @distributed_trace def begin_delete( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes a namespace. + """Delete a trusted access role binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -7804,7 +14409,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -7839,24 +14444,25 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_managed_cluster( + def list( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.ManagedNamespace"]: - """Gets a list of managed namespaces in the specified managed cluster. + ) -> ItemPaged["_models.TrustedAccessRoleBinding"]: + """List trusted access role bindings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of ManagedNamespace - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] + :return: An iterator like instance of TrustedAccessRoleBinding + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7869,7 +14475,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_managed_namespaces_list_by_managed_cluster_request( + _request = build_trusted_access_role_bindings_list_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -7912,7 +14518,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ManagedNamespace], + List[_models.TrustedAccessRoleBinding], deserialized.get("value", []), ) if cls: @@ -7936,25 +14542,246 @@ def get_next(next_link=None): ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class LoadBalancersOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`load_balancers` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> _models.LoadBalancer: + """Gets the specified load balancer. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + + _request = build_load_balancers_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.LoadBalancer, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: _models.LoadBalancer, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: _types.LoadBalancer, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.LoadBalancer + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ - return ItemPaged(get_next, extract_data) + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list_credential( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.CredentialResults: - """Lists the credentials of a namespace. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + load_balancer_name: str, + parameters: Union[_models.LoadBalancer, _types.LoadBalancer, IO[bytes]], + **kwargs: Any + ) -> _models.LoadBalancer: + """Creates or updates a load balancer in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :param parameters: The load balancer to create or update. Is either a LoadBalancer type or a + IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or + ~azure.mgmt.containerservice.types.LoadBalancer or IO[bytes] + :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -7965,17 +14792,27 @@ def list_credential( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - _request = build_managed_namespaces_list_credential_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_load_balancers_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -7992,7 +14829,7 @@ def list_credential( response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -8008,50 +14845,29 @@ def list_credential( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.CredentialResults, response.json()) + deserialized = _deserialize(_models.LoadBalancer, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - -class MachinesOperations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`machines` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any - ) -> _models.Machine: - """Get a specific machine in the specified agent pool. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :return: Machine. The Machine is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Machine - :raises ~azure.core.exceptions.HttpResponseError: - """ + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _delete_initial( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8063,13 +14879,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_machines_get_request( + _request = build_load_balancers_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, + load_balancer_name=load_balancer_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8081,19 +14896,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8101,37 +14915,122 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Machine, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> ItemPaged["_models.Machine"]: - """Gets a list of machines in the specified agent pool. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "load_balancer_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_delete( + self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a load balancer in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :return: An iterator like instance of Machine - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Machine] + :param load_balancer_name: The name of the load balancer. Required. + :type load_balancer_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + load_balancer_name=load_balancer_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.LoadBalancer"]: + """Gets a list of load balancers in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of LoadBalancer + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LoadBalancer]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8144,10 +15043,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_machines_list_request( + _request = build_load_balancers_list_by_managed_cluster_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8188,7 +15086,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Machine], + List[_models.LoadBalancer], deserialized.get("value", []), ) if cls: @@ -8217,14 +15115,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class PrivateEndpointConnectionsOperations: # pylint: disable=docstring-missing-param +class IdentityBindingsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`private_endpoint_connections` attribute. + :attr:`identity_bindings` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -8235,25 +15133,34 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) def get( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets the specified private endpoint connection. - - To learn more about private clusters, see: - `https://docs.microsoft.com/azure/aks/private-clusters - `_. + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + ) -> _models.IdentityBinding: + """Gets the specified Identity Binding. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.IdentityBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8267,12 +15174,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_get_request( + _request = build_identity_bindings_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, + identity_binding_name=identity_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8307,203 +15214,311 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + deserialized = _deserialize(_models.IdentityBinding, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + identity_binding_name: str, + parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_identity_bindings_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: _models.PrivateEndpointConnection, + identity_binding_name: str, + parameters: _models.IdentityBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + ) -> LROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: _types.PrivateEndpointConnection, + identity_binding_name: str, + parameters: _types.IdentityBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + ) -> LROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. - :type parameters: ~azure.mgmt.containerservice.types.PrivateEndpointConnection + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.IdentityBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, + identity_binding_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + ) -> LROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Required. + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def update( + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, _types.PrivateEndpointConnection, IO[bytes]], + identity_binding_name: str, + parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + ) -> LROPoller[_models.IdentityBinding]: + """Creates or updates an identity binding in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: The updated private endpoint connection. Is either a - PrivateEndpointConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or - ~azure.mgmt.containerservice.types.PrivateEndpointConnection or IO[bytes] - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str + :param parameters: The identity binding to create or update. Is either a IdentityBinding type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or + ~azure.mgmt.containerservice.types.IdentityBinding or IO[bytes] + :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + identity_binding_name=identity_binding_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IdentityBinding, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - _request = build_private_endpoint_connections_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - if response.status_code not in [200, 201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + polling_method = polling + if cont_token: + return LROPoller[_models.IdentityBinding].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IdentityBinding]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8518,10 +15533,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_delete_request( + _request = build_identity_bindings_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, + identity_binding_name=identity_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8540,7 +15555,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -8553,10 +15568,11 @@ def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: + if response.status_code == 202: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -8567,18 +15583,31 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "identity_binding_name", + ] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) def begin_delete( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes a private endpoint connection. + """Deletes an identity binding in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str + :param identity_binding_name: The name of the identity binding. Required. + :type identity_binding_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -8594,7 +15623,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, + identity_binding_name=identity_binding_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -8629,25 +15658,32 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list( + @api_version_validation( + method_added_on="2026-04-01", + params_added_on={ + "2026-04-01": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01", "2026-06-02-preview"], + ) + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnectionListResult: - """Gets a list of private endpoint connections in the specified managed cluster. - - To learn more about private clusters, see: - `https://docs.microsoft.com/azure/aks/private-clusters - `_. + ) -> ItemPaged["_models.IdentityBinding"]: + """Gets a list of identity bindings in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is - compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult + :return: An iterator like instance of IdentityBinding + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8656,64 +15692,89 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + def prepare_request(next_link=None): + if not next_link: - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + _request = build_identity_bindings_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _request = build_private_endpoint_connections_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + return _request - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IdentityBinding], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) -class SnapshotsOperations: # pylint: disable=docstring-missing-param +class JWTAuthenticatorsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`snapshots` attribute. + :attr:`jwt_authenticators` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -8723,17 +15784,35 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: - """Gets a snapshot. + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> _models.JWTAuthenticator: + """Gets the specified JWT authenticator of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :return: JWTAuthenticator. The JWTAuthenticator is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8747,11 +15826,12 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) - _request = build_snapshots_get_request( + _request = build_jwt_authenticators_get_request( resource_group_name=resource_group_name, resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8786,117 +15866,36 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.Snapshot, response.json()) + deserialized = _deserialize(_models.JWTAuthenticator, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.Snapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: _types.Snapshot, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.Snapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The snapshot to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.Snapshot, _types.Snapshot, IO[bytes]], + jwt_authenticator_name: str, + parameters: Union[_models.JWTAuthenticator, _types.JWTAuthenticator, IO[bytes]], **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot or - ~azure.mgmt.containerservice.types.Snapshot or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8909,7 +15908,7 @@ def create_or_update( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -8918,9 +15917,10 @@ def create_or_update( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_snapshots_create_or_update_request( + _request = build_jwt_authenticators_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -8934,7 +15934,7 @@ def create_or_update( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -8942,11 +15942,10 @@ def create_or_update( response = pipeline_response.http_response if response.status_code not in [200, 201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8954,120 +15953,226 @@ def create_or_update( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.TagsObject, + jwt_authenticator_name: str, + parameters: _models.JWTAuthenticator, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> LROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _types.TagsObject, + jwt_authenticator_name: str, + parameters: _types.JWTAuthenticator, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> LROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.types.TagsObject + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.JWTAuthenticator :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update_tags( + def begin_create_or_update( self, resource_group_name: str, resource_name: str, + jwt_authenticator_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> LROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def update_tags( + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, _types.TagsObject, IO[bytes]], + jwt_authenticator_name: str, + parameters: Union[_models.JWTAuthenticator, _types.JWTAuthenticator, IO[bytes]], **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + ) -> LROPoller[_models.JWTAuthenticator]: + """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to + apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a - TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or - ~azure.mgmt.containerservice.types.TagsObject or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :param parameters: The JWT authenticator to create or update. Is either a JWTAuthenticator type + or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or + ~azure.mgmt.containerservice.types.JWTAuthenticator or IO[bytes] + :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.JWTAuthenticator, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.JWTAuthenticator].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.JWTAuthenticator]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def _delete_initial( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -9076,26 +16181,17 @@ def update_tags( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_snapshots_update_tags_request( + _request = build_jwt_authenticators_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -9105,19 +16201,18 @@ def update_tags( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -9125,90 +16220,122 @@ def update_tags( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> None: - """Deletes a snapshot. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "jwt_authenticator_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def begin_delete( + self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a JWT authenticator and updates the managed cluster to apply the settings. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: None - :rtype: None + :param jwt_authenticator_name: The name of the JWT authenticator. Required. + :type jwt_authenticator_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + jwt_authenticator_name=jwt_authenticator_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - _request = build_snapshots_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **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) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: - """Lists snapshots in the specified subscription and resource group. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.JWTAuthenticator"]: + """Gets a list of JWT authenticators in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of JWTAuthenticator + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.JWTAuthenticator]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9221,8 +16348,9 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - _request = build_snapshots_list_by_resource_group_request( + _request = build_jwt_authenticators_list_by_managed_cluster_request( resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9263,100 +16391,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Snapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: - """Gets a list of snapshots in the specified subscription. - - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_snapshots_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", - urllib.parse.urljoin(next_link, _parsed_next_link.path), - headers=_headers, - params=_next_request_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Snapshot], + List[_models.JWTAuthenticator], deserialized.get("value", []), ) if cls: @@ -9385,14 +16420,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class TrustedAccessRoleBindingsOperations: # pylint: disable=docstring-missing-param +class MeshMembershipsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`trusted_access_role_bindings` attribute. + :attr:`mesh_memberships` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -9403,21 +16438,34 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) def get( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any - ) -> _models.TrustedAccessRoleBinding: - """Get a trusted access role binding. + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + ) -> _models.MeshMembership: + """Gets the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :return: MeshMembership. The MeshMembership is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshMembership :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -9431,12 +16479,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_get_request( + _request = build_mesh_memberships_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9471,21 +16519,34 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.MeshMembership, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[ - _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] - ], + mesh_membership_name: str, + parameters: Union[_models.MeshMembership, _types.MeshMembership, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -9504,15 +16565,15 @@ def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(trusted_access_role_binding, (IOBase, bytes)): - _content = trusted_access_role_binding + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_trusted_access_role_bindings_create_or_update_request( + _request = build_mesh_memberships_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -9564,30 +16625,29 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _models.TrustedAccessRoleBinding, + mesh_membership_name: str, + parameters: _models.MeshMembership, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MeshMembership :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -9596,30 +16656,29 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _types.TrustedAccessRoleBinding, + mesh_membership_name: str, + parameters: _types.MeshMembership, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.types.MeshMembership :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -9628,68 +16687,79 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: IO[bytes], + mesh_membership_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Required. - :type trusted_access_role_binding: IO[bytes] + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + "content_type", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[ - _models.TrustedAccessRoleBinding, _types.TrustedAccessRoleBinding, IO[bytes] - ], + mesh_membership_name: str, + parameters: Union[_models.MeshMembership, _types.MeshMembership, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.MeshMembership]: + """Creates or updates the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :param trusted_access_role_binding: A trusted access role binding. Is either a - TrustedAccessRoleBinding type or a IO[bytes] type. Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding - or ~azure.mgmt.containerservice.types.TrustedAccessRoleBinding or IO[bytes] - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str + :param parameters: The mesh membership to create or update. Is either a MeshMembership type or + a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or + ~azure.mgmt.containerservice.types.MeshMembership or IO[bytes] + :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -9697,8 +16767,8 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, - trusted_access_role_binding=trusted_access_role_binding, + mesh_membership_name=mesh_membership_name, + parameters=parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -9710,7 +16780,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.MeshMembership, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -9728,18 +16798,31 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( + return LROPoller[_models.MeshMembership].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.TrustedAccessRoleBinding]( + return LROPoller[_models.MeshMembership]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) def _delete_initial( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9754,10 +16837,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_delete_request( + _request = build_mesh_memberships_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9804,18 +16887,31 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "mesh_membership_name", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) def begin_delete( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any ) -> LROPoller[None]: - """Delete a trusted access role binding. + """Deletes the mesh membership of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str + :param mesh_membership_name: The name of the mesh membership. Required. + :type mesh_membership_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -9831,7 +16927,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + mesh_membership_name=mesh_membership_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -9840,51 +16936,170 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.MeshMembership"]: + """Lists mesh memberships in a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MeshMembership + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshMembership] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MeshMembership]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_mesh_memberships_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.MeshMembership], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + return ItemPaged(get_next, extract_data) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + +class Operations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.TrustedAccessRoleBinding"]: - """List trusted access role bindings. + def list(self, **kwargs: Any) -> ItemPaged["_models.OperationValue"]: + """Gets a list of operations. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of TrustedAccessRoleBinding - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An iterator like instance of OperationValue + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationValue] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationValue]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9897,10 +17112,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_trusted_access_role_bindings_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, + _request = build_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -9940,7 +17152,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.TrustedAccessRoleBinding], + List[_models.OperationValue], deserialized.get("value", []), ) if cls: @@ -9969,14 +17181,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class IdentityBindingsOperations: # pylint: disable=docstring-missing-param +class AlertConfigurationsOperations: # pylint: disable=docstring-missing-param """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`identity_bindings` attribute. + :attr:`alert_configurations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -9988,33 +17200,33 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) def get( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any + ) -> _models.AlertConfiguration: + """Gets the specified alert configuration of a managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :return: AlertConfiguration. The AlertConfiguration is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AlertConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -10028,12 +17240,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.AlertConfiguration] = kwargs.pop("cls", None) - _request = build_identity_bindings_get_request( + _request = build_alert_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -10068,7 +17280,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.AlertConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -10076,26 +17288,26 @@ def get( return deserialized # type: ignore @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "content_type", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + configuration_name: str, + resource: Union[_models.AlertConfiguration, _types.AlertConfiguration, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -10114,15 +17326,15 @@ def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(resource, (IOBase, bytes)): + _content = resource else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_identity_bindings_create_or_update_request( + _request = build_alert_configurations_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -10175,29 +17387,29 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _models.IdentityBinding, + configuration_name: str, + resource: _models.AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> LROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: ~azure.mgmt.containerservice.models.AlertConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + :return: An instance of LROPoller that returns AlertConfiguration. The AlertConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -10206,29 +17418,29 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _types.IdentityBinding, + configuration_name: str, + resource: _types.AlertConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> LROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.types.IdentityBinding + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: ~azure.mgmt.containerservice.types.AlertConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + :return: An instance of LROPoller that returns AlertConfiguration. The AlertConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -10237,79 +17449,79 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: IO[bytes], + configuration_name: str, + resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> LROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: IO[bytes] + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Required. + :type resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + :return: An instance of LROPoller that returns AlertConfiguration. The AlertConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", "content_type", "accept", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) def begin_create_or_update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, _types.IdentityBinding, IO[bytes]], + configuration_name: str, + resource: Union[_models.AlertConfiguration, _types.AlertConfiguration, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> LROPoller[_models.AlertConfiguration]: + """Creates or updates an alert configuration in the specified managed cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Is either a IdentityBinding type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or - ~azure.mgmt.containerservice.types.IdentityBinding or IO[bytes] - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str + :param resource: The alert configuration to create or update. Is either a AlertConfiguration + type or a IO[bytes] type. Required. + :type resource: ~azure.mgmt.containerservice.models.AlertConfiguration or + ~azure.mgmt.containerservice.types.AlertConfiguration or IO[bytes] + :return: An instance of LROPoller that returns AlertConfiguration. The AlertConfiguration is compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AlertConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.AlertConfiguration] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) @@ -10317,8 +17529,8 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, - parameters=parameters, + configuration_name=configuration_name, + resource=resource, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -10330,7 +17542,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.AlertConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -10348,31 +17560,31 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.IdentityBinding].from_continuation_token( + return LROPoller[_models.AlertConfiguration].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.IdentityBinding]( + return LROPoller[_models.AlertConfiguration]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10387,10 +17599,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_identity_bindings_delete_request( + _request = build_alert_configurations_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -10438,30 +17650,30 @@ def _delete_initial( @distributed_trace @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": [ + "2026-06-02-preview": [ "api_version", "subscription_id", "resource_group_name", "resource_name", - "identity_binding_name", + "configuration_name", ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) def begin_delete( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, configuration_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes an identity binding in the specified managed cluster. + """Deletes an alert configuration. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str + :param configuration_name: The name of the alert configuration. Required. + :type configuration_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -10477,7 +17689,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + configuration_name=configuration_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -10486,57 +17698,203 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.AlertConfiguration"]: + """Gets a list of alert configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of AlertConfiguration + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.AlertConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AlertConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_alert_configurations_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AlertConfiguration], + deserialized.get("value", []), + ) if cls: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } + def get_next(next_link=None): + _request = prepare_request(next_link) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class OperationStatusResultOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`operation_status_result` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace @api_version_validation( - method_added_on="2026-04-01", + method_added_on="2026-06-02-preview", params_added_on={ - "2026-04-01": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "active_only", + "accept", + ] }, - api_versions_list=["2026-04-01", "2026-05-01", "2026-06-01"], + api_versions_list=["2026-06-02-preview"], ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. + def list_by_agent_pool( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + active_only: Optional[bool] = None, + **kwargs: Any + ) -> ItemPaged["_models.OperationStatusResult"]: + """Gets a list of operations in the specified agent pool. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of IdentityBinding - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :keyword active_only: If true, only return operations that are currently active (not terminal). + Default value is None. + :paramtype active_only: bool + :return: An iterator like instance of OperationStatusResult + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10549,10 +17907,12 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_identity_bindings_list_by_managed_cluster_request( + _request = build_operation_status_result_list_by_agent_pool_request( resource_group_name=resource_group_name, resource_name=resource_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, + active_only=active_only, api_version=self._config.api_version, headers=_headers, params=_params, @@ -10592,7 +17952,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.IdentityBinding], + List[_models.OperationStatusResult], deserialized.get("value", []), ) if cls: @@ -10620,36 +17980,125 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "agent_pool_name", + "operation_id", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get_by_agent_pool( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a specific operation in the specified agent pool. -class Operations: # pylint: disable=docstring-missing-param - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`operations` attribute. - """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_result_get_by_agent_pool_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.OperationValue"]: - """Gets a list of operations. + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] + }, + api_versions_list=["2026-06-02-preview"], + ) + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.OperationStatusResult"]: + """Gets a list of operations in the specified managedCluster. - :return: An iterator like instance of OperationValue - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationValue] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of OperationStatusResult + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.OperationValue]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10662,7 +18111,10 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.OperationValue"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_operation_status_result_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, params=_params, @@ -10702,33 +18154,122 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.OperationValue], + List[_models.OperationStatusResult], deserialized.get("value", []), ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) - def get_next(next_link=None): - _request = prepare_request(next_link) + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + @api_version_validation( + method_added_on="2026-06-02-preview", + params_added_on={ + "2026-06-02-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "resource_name", + "operation_id", + "accept", + ] + }, + api_versions_list=["2026-06-02-preview"], + ) + def get( + self, resource_group_name: str, resource_name: str, operation_id: str, **kwargs: Any + ) -> _models.OperationStatusResult: + """Get the status of a specific operation in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) + + _request = build_operation_status_result_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationStatusResult, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore class PrivateLinkResourcesOperations: # pylint: disable=docstring-missing-param @@ -11127,3 +18668,245 @@ def get_next(next_link=None): return pipeline_response return ItemPaged(get_next, extract_data) + + +class ContainerServiceOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`container_service` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_node_image_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.NodeImageVersion"]: + """Gets a list of supported NodeImage versions in the specified subscription. + + Only returns the latest version of each node image. For example there may be an + AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is + visible in this list. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of NodeImageVersion + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NodeImageVersion]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_container_service_list_node_image_versions_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.NodeImageVersion], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class VmSkusOperations: # pylint: disable=docstring-missing-param + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`vm_skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, location: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any + ) -> ItemPaged["_models.ResourceSku"]: + """Gets the list of VM SKUs accepted by AKS. + + Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS + will perform a best effort approach to provision the requested VM SKUs, but availability is not + guaranteed. + + :param location: The name of the Azure region. Required. + :type location: str + :keyword include_extended_locations: To Include Extended Locations information or not in the + response. Default value is None. + :paramtype include_extended_locations: bool + :return: An iterator like instance of ResourceSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ResourceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_vm_skus_list_request( + location=location, + subscription_id=self._config.subscription_id, + include_extended_locations=include_extended_locations, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ResourceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/types.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/types.py index ae9d3534fb09..2c960d91e92c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/types.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/types.py @@ -13,19 +13,29 @@ if TYPE_CHECKING: from .models import ( AccelerationMode, + AddonAutoscaling, AdoptionPolicy, AdvancedNetworkPolicies, AgentPoolMode, + AgentPoolNICPublicIPAddressVersion, + AgentPoolNetworkInterfaceType, AgentPoolSSHAccess, AgentPoolType, + AlertConfigurationMode, + AlertConfigurationProvisioningState, ArtifactSource, BackendPoolType, + BastionSku, + ClusterServiceLoadBalancerHealthProbeMode, Code, ConnectionStatus, ContainerNetworkLogs, + ControlPlaneScalingSize, CreatedByType, DRANETMode, DeletePolicy, + DriftAction, + DriverType, Expander, ExtendedLocationTypes, GPUDriver, @@ -33,7 +43,10 @@ GatewayAPIIstioEnabled, IPFamily, IdentityBindingProvisioningState, + InfrastructureEncryption, + IpvsScheduler, IstioIngressGatewayMode, + JWTAuthenticatorProvisioningState, KeyVaultNetworkAccessTypes, KubeletDiskType, KubernetesSupportPlan, @@ -51,6 +64,10 @@ ManagedClusterSKUName, ManagedClusterSKUTier, ManagedGatewayType, + ManagementMode, + MeshMembershipProvisioningState, + MigStrategy, + Mode, NamespaceProvisioningState, NetworkDataplane, NetworkMode, @@ -58,25 +75,31 @@ NetworkPluginMode, NetworkPolicy, NginxIngressControllerType, + NodeDisruptionPolicy, NodeOSUpgradeChannel, NodeProvisioningDefaultNodePools, NodeProvisioningMode, + NvidiaDriverMode, OSDiskType, OSSKU, OSType, + Operator, OutboundType, PodIPAllocationMode, + PodLinkLocalAccess, PolicyRule, PrivateEndpointConnectionProvisioningState, Protocol, ProxyRedirectionMechanism, PublicNetworkAccess, ResourceIdentityType, + ResourceProvisioningState, RestrictionLevel, ScaleDownMode, ScaleSetEvictionPolicy, ScaleSetPriority, SchedulerConfigMode, + SeccompDefault, ServiceMeshMode, SnapshotType, TransitEncryptionType, @@ -84,6 +107,8 @@ Type, UndrainableNodeBehavior, UpgradeChannel, + UpgradeStrategy, + VmState, WeekDay, WorkloadRuntime, ) @@ -209,14 +234,14 @@ class AdvancedNetworkingSecurityTransitEncryption(TypedDict, total=False): # py managed pods will be encrypted when it leaves the node boundary. :ivar type: Configures pod-to-pod encryption. This can be enabled only on Cilium-based - clusters. If not specified, the default value is None. Known values are: "WireGuard" and - "None". + clusters. If not specified, the default value is None. Known values are: "WireGuard", "mTLS", + and "None". :vartype type: Union[str, "TransitEncryptionType"] """ type: Union[str, "TransitEncryptionType"] """Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not - specified, the default value is None. Known values are: \"WireGuard\" and \"None\".""" + specified, the default value is None. Known values are: \"WireGuard\", \"mTLS\", and \"None\".""" class Resource(TypedDict, total=False): @@ -302,6 +327,55 @@ class AgentPoolArtifactStreamingProfile(TypedDict, total=False): not specified, the default is false.""" +class AgentPoolBlueGreenUpgradeSettings(TypedDict, total=False): + """Settings for blue-green upgrade on an agentpool. + + :ivar drainBatchSize: The number or percentage of nodes to drain in batch during blue-green + upgrade. Must be a non-zero number. This can either be set to an integer (e.g. '5') or a + percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total number + of blue nodes of the initial upgrade operation. For percentages, fractional nodes are rounded + up. If not specified, the default is 10%. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_. + :vartype drainBatchSize: str + :ivar drainTimeoutInMinutes: The drain timeout for a node, i.e., the amount of time (in + minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time + honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not + specified, the default is 30 minutes. + :vartype drainTimeoutInMinutes: int + :ivar batchSoakDurationInMinutes: The soak duration after draining a batch of nodes, i.e., the + amount of time (in minutes) to wait after draining a batch of nodes before moving on the next + batch. If not specified, the default is 15 minutes. + :vartype batchSoakDurationInMinutes: int + :ivar finalSoakDurationInMinutes: The soak duration for a node pool, i.e., the amount of time + (in minutes) to wait after all old nodes are drained before we remove the old nodes. If not + specified, the default is 60 minutes. Only applicable for blue-green upgrade strategy. + :vartype finalSoakDurationInMinutes: int + """ + + drainBatchSize: str + """The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a + non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total number of blue nodes of the + initial upgrade operation. For percentages, fractional nodes are rounded up. If not specified, + the default is 10%. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_.""" + drainTimeoutInMinutes: int + """The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods + and graceful termination per node. This eviction wait time honors waiting on pod disruption + budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 + minutes.""" + batchSoakDurationInMinutes: int + """The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to + wait after draining a batch of nodes before moving on the next batch. If not specified, the + default is 15 minutes.""" + finalSoakDurationInMinutes: int + """The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old + nodes are drained before we remove the old nodes. If not specified, the default is 60 minutes. + Only applicable for blue-green upgrade strategy.""" + + class AgentPoolDeleteMachinesParameter(TypedDict, total=False): """Specifies a list of machine names from the agent pool to be deleted. @@ -366,7 +440,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubeletDiskType: Union[str, "KubeletDiskType"] :ivar workloadRuntime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workloadRuntime: Union[str, "WorkloadRuntime"] :ivar messageOfTheDay: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -395,9 +469,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :vartype osType: Union[str, "OSType"] :ivar osSKU: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype osSKU: Union[str, "OSSKU"] :ivar maxCount: The maximum number of nodes for auto-scaling. :vartype maxCount: int @@ -410,13 +484,13 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): "Delete" and "Deallocate". :vartype scaleDownMode: Union[str, "ScaleDownMode"] :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", - "AvailabilitySet", and "VirtualMachines". + "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type: Union[str, "AgentPoolType"] :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: Union[str, "AgentPoolMode"] :ivar orchestratorVersion: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -437,8 +511,18 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :ivar nodeImageVersion: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype nodeImageVersion: str + :ivar upgradeStrategy: Defines the upgrade strategy for the agent pool. The default is Rolling. + Known values are: "Rolling" and "BlueGreen". + :vartype upgradeStrategy: Union[str, "UpgradeStrategy"] + :ivar enableOSDiskFullCaching: Whether to enable the full-cache ephemeral OS disk feature. When + this feature is enabled, the entire operating system will be locally cached on the ephemeral OS + disk, preventing E17 events caused by network failures. + :vartype enableOSDiskFullCaching: bool :ivar upgradeSettings: Settings for upgrading the agentpool. :vartype upgradeSettings: "AgentPoolUpgradeSettings" + :ivar upgradeSettingsBlueGreen: Settings for Blue-Green upgrade on the agentpool. Applies when + upgrade strategy is set to BlueGreen. + :vartype upgradeSettingsBlueGreen: "AgentPoolBlueGreenUpgradeSettings" :ivar provisioningState: The current deployment or provisioning state. :vartype provisioningState: str :ivar powerState: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -482,6 +566,14 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :ivar nodeTaints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype nodeTaints: list[str] + :ivar nodeInitializationTaints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype nodeInitializationTaints: list[str] :ivar proximityPlacementGroupID: The ID for Proximity Placement Group. :vartype proximityPlacementGroupID: str :ivar kubeletConfig: The Kubelet configuration on the agent pool nodes. @@ -543,6 +635,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype localDNSProfile: "LocalDNSProfile" + :ivar preparedImageSpecificationProfile: Settings to determine the prepared image specification + used to provision nodes in a pool. + :vartype preparedImageSpecificationProfile: "PreparedImageSpecificationProfile" """ eTag: str @@ -573,7 +668,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): ephemeral storage. Known values are: \"OS\" and \"Temporary\".""" workloadRuntime: Union[str, "WorkloadRuntime"] """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", and \"KataVmIsolation\".""" + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" messageOfTheDay: str """Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for @@ -599,9 +694,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): osSKU: Union[str, "OSSKU"] """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" maxCount: int """The maximum number of nodes for auto-scaling.""" minCount: int @@ -613,14 +708,14 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): autoscaler behavior. If not specified, it defaults to Delete. Known values are: \"Delete\" and \"Deallocate\".""" type: Union[str, "AgentPoolType"] - """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", and - \"VirtualMachines\".""" + """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", + \"VirtualMachines\", and \"FlexNodes\".""" mode: Union[str, "AgentPoolMode"] """The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", and \"Gateway\".""" + \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" orchestratorVersion: str """The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the @@ -640,8 +735,18 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): nodeImageVersion: str """The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed.""" + upgradeStrategy: Union[str, "UpgradeStrategy"] + """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: + \"Rolling\" and \"BlueGreen\".""" + enableOSDiskFullCaching: bool + """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the + entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events + caused by network failures.""" upgradeSettings: "AgentPoolUpgradeSettings" """Settings for upgrading the agentpool.""" + upgradeSettingsBlueGreen: "AgentPoolBlueGreenUpgradeSettings" + """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to + BlueGreen.""" provisioningState: str """The current deployment or provisioning state.""" powerState: "PowerState" @@ -682,6 +787,14 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): nodeTaints: list[str] """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" + nodeInitializationTaints: list[str] + """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + after node pool is created, but nodes will not be recreated with new taints until another + operation that requires recreation (e.g. node image upgrade) happens. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" proximityPlacementGroupID: str """The ID for Proximity Placement Group.""" kubeletConfig: "KubeletConfig" @@ -741,6 +854,50 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(TypedDict, total=False): """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" + preparedImageSpecificationProfile: "PreparedImageSpecificationProfile" + """Settings to determine the prepared image specification used to provision nodes in a pool.""" + + +class AgentPoolNetworkInterface(TypedDict, total=False): + """Configuration of a secondary network interface provisioned on each VM instance in the agent + pool. For more information, see `https://aka.ms/aks/multi-nic `_. + + :ivar type: Type of NIC to be provisioned on the VM. Known values are: "Standard" and + "Dynamic". + :vartype type: Union[str, "AgentPoolNetworkInterfaceType"] + :ivar vnetSubnetId: The resource ID of the subnet which will be attached to the secondary + network interface. Required when ``type`` is ``Standard``; must be an empty string (``""``) or + omitted when ``type`` is ``Dynamic``. + :vartype vnetSubnetId: str + :ivar enableAcceleratedNetworking: Whether accelerated networking is enabled on this secondary + NIC. If omitted, this defaults to true only when the agent pool VM SKU supports accelerated + networking. Validation will fail if it is enabled on an unsupported SKU or NIC configuration. + :vartype enableAcceleratedNetworking: bool + :ivar publicIPAddressConfiguration: Public IP configuration for this secondary NIC. Only valid + when ``type`` is ``Standard``. Set ``publicIPAddressVersion`` to provision a per-VM + instance-level public IP for the NIC, then optionally shape it with ``ipTags`` or + ``publicIPPrefixID``. If omitted, no public IP is provisioned. Idle timeout is not + configurable. For more information, see `https://aka.ms/aks/multi-nic + `_. + :vartype publicIPAddressConfiguration: "AgentPoolNICPublicIPAddressConfiguration" + """ + + type: Union[str, "AgentPoolNetworkInterfaceType"] + """Type of NIC to be provisioned on the VM. Known values are: \"Standard\" and \"Dynamic\".""" + vnetSubnetId: str + """The resource ID of the subnet which will be attached to the secondary network interface. + Required when ``type`` is ``Standard``; must be an empty string (``\"\"``) or omitted when + ``type`` is ``Dynamic``.""" + enableAcceleratedNetworking: bool + """Whether accelerated networking is enabled on this secondary NIC. If omitted, this defaults to + true only when the agent pool VM SKU supports accelerated networking. Validation will fail if + it is enabled on an unsupported SKU or NIC configuration.""" + publicIPAddressConfiguration: "AgentPoolNICPublicIPAddressConfiguration" + """Public IP configuration for this secondary NIC. Only valid when ``type`` is ``Standard``. Set + ``publicIPAddressVersion`` to provision a per-VM instance-level public IP for the NIC, then + optionally shape it with ``ipTags`` or ``publicIPPrefixID``. If omitted, no public IP is + provisioned. Idle timeout is not configurable. For more information, see + `https://aka.ms/aks/multi-nic `_.""" class AgentPoolNetworkProfile(TypedDict, total=False): @@ -748,26 +905,89 @@ class AgentPoolNetworkProfile(TypedDict, total=False): :ivar nodePublicIPTags: IPTags of instance-level public IPs. :vartype nodePublicIPTags: list["IPTag"] + :ivar nodePublicIPPrefixIDs: The resource IDs of public IP prefixes for node public IPs. At + most one IPv4 and one IPv6 prefix may be specified. Order does not matter; the RP determines IP + version from the referenced resource's publicIPAddressVersion. Requires enableNodePublicIP to + be true on the agent pool. Mutually exclusive with the top-level nodePublicIPPrefixID property. + Immutable after node pool creation. To change prefixes, delete and recreate the node pool. For + more information, see `https://aka.ms/aks/ipv6-ilpip `_. + :vartype nodePublicIPPrefixIDs: list[str] :ivar allowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap. :vartype allowedHostPorts: list["PortRange"] :ivar applicationSecurityGroups: The IDs of the application security groups which agent pool will associate when created. :vartype applicationSecurityGroups: list[str] + :ivar secondaryNetworkInterfaces: Secondary network interface configurations for each VM in the + agent pool. Each entry is a template: one physical NIC per entry is provisioned on every VM + instance. These interfaces are created at agent pool creation time and are immutable. The + length of the list must be less than the NIC capacity minus 1 for the VM size of the agent pool + (AKS manages the primary NIC). For example, a Standard_D8a_v4 VM supports up to 4 NICs, so the + maximum number of secondary interfaces allowed is 3. For mixed-SKU VM pools the effective + capacity is the minimum across all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). + For more information, see `https://aka.ms/aks/multi-nic `_. + :vartype secondaryNetworkInterfaces: list["AgentPoolNetworkInterface"] :ivar dranet: DRANET settings of an agent pool. :vartype dranet: "DRANETProfile" """ nodePublicIPTags: list["IPTag"] """IPTags of instance-level public IPs.""" + nodePublicIPPrefixIDs: list[str] + """The resource IDs of public IP prefixes for node public IPs. At most one IPv4 and one IPv6 + prefix may be specified. Order does not matter; the RP determines IP version from the + referenced resource's publicIPAddressVersion. Requires enableNodePublicIP to be true on the + agent pool. Mutually exclusive with the top-level nodePublicIPPrefixID property. Immutable + after node pool creation. To change prefixes, delete and recreate the node pool. For more + information, see `https://aka.ms/aks/ipv6-ilpip `_.""" allowedHostPorts: list["PortRange"] """The port ranges that are allowed to access. The specified ranges are allowed to overlap.""" applicationSecurityGroups: list[str] """The IDs of the application security groups which agent pool will associate when created.""" + secondaryNetworkInterfaces: list["AgentPoolNetworkInterface"] + """Secondary network interface configurations for each VM in the agent pool. Each entry is a + template: one physical NIC per entry is provisioned on every VM instance. These interfaces are + created at agent pool creation time and are immutable. The length of the list must be less than + the NIC capacity minus 1 for the VM size of the agent pool (AKS manages the primary NIC). For + example, a Standard_D8a_v4 VM supports up to 4 NICs, so the maximum number of secondary + interfaces allowed is 3. For mixed-SKU VM pools the effective capacity is the minimum across + all SKUs: count(secondaryNetworkInterfaces) + 1 <= min(maxNICs). For more information, see + `https://aka.ms/aks/multi-nic `_.""" dranet: "DRANETProfile" """DRANET settings of an agent pool.""" +class AgentPoolNICPublicIPAddressConfiguration(TypedDict, total=False): + """Public IP configuration applied to a secondary NIC on an agent pool. ``ipTags`` and + ``publicIPPrefixID`` are mutually exclusive, matching the primary NIC's behavior. For more + information, see `https://aka.ms/aks/multi-nic `_. + + :ivar publicIPAddressVersion: IP version of the public IP provisioned for this NIC. Required: + its presence is what enables public IP provisioning, so an empty configuration allocates + nothing. ``IPv4`` is the only accepted value. Required. "IPv4" + :vartype publicIPAddressVersion: Union[str, "AgentPoolNICPublicIPAddressVersion"] + :ivar ipTags: IP tags to attach to the public IP allocated for this NIC. Each tag's + ``ipTagType`` must be ``FirstPartyUsage``, ``NetworkDomain``, or ``RoutingPreference``. + Mutually exclusive with ``publicIPPrefixID``. + :vartype ipTags: list["IPTag"] + :ivar publicIPPrefixID: The resource ID of a public IP prefix to draw this NIC's public IP + from. Mutually exclusive with ``ipTags``. + :vartype publicIPPrefixID: str + """ + + publicIPAddressVersion: Required[Union[str, "AgentPoolNICPublicIPAddressVersion"]] + """IP version of the public IP provisioned for this NIC. Required: its presence is what enables + public IP provisioning, so an empty configuration allocates nothing. ``IPv4`` is the only + accepted value. Required. \"IPv4\"""" + ipTags: list["IPTag"] + """IP tags to attach to the public IP allocated for this NIC. Each tag's ``ipTagType`` must be + ``FirstPartyUsage``, ``NetworkDomain``, or ``RoutingPreference``. Mutually exclusive with + ``publicIPPrefixID``.""" + publicIPPrefixID: str + """The resource ID of a public IP prefix to draw this NIC's public IP from. Mutually exclusive + with ``ipTags``.""" + + class AgentPoolSecurityProfile(TypedDict, total=False): """The security settings of an agent pool. @@ -810,6 +1030,71 @@ class AgentPoolStatus(TypedDict, total=False): there was no error, this field is omitted.""" +class AgentPoolUpdate(TypedDict, total=False): + """Agent pool. + + :ivar properties: Properties for the agent pool. + :vartype properties: "AgentPoolUpdateProperties" + """ + + properties: "AgentPoolUpdateProperties" + """Properties for the agent pool.""" + + +class AgentPoolUpdateManualScaleProfile(TypedDict, total=False): + """Specifications on number of machines. + + :ivar size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + 'Standard_E16s_v3' or 'Standard_D16s_v5'. + :vartype size: str + :ivar count: Number of nodes. + :vartype count: int + """ + + size: str + """VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' + or 'Standard_D16s_v5'.""" + count: int + """Number of nodes.""" + + +class AgentPoolUpdateProperties(TypedDict, total=False): + """Properties for the agent pool. + + :ivar count: Number of agents (VMs) to host docker containers. + :vartype count: int + :ivar virtualMachinesProfile: Specifications on VirtualMachines agent pool. + :vartype virtualMachinesProfile: "AgentPoolUpdateVirtualMachinesProfile" + """ + + count: int + """Number of agents (VMs) to host docker containers.""" + virtualMachinesProfile: "AgentPoolUpdateVirtualMachinesProfile" + """Specifications on VirtualMachines agent pool.""" + + +class AgentPoolUpdateScaleProfile(TypedDict, total=False): + """Specifications on how to scale a VirtualMachines agent pool. + + :ivar manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. + :vartype manual: list["AgentPoolUpdateManualScaleProfile"] + """ + + manual: list["AgentPoolUpdateManualScaleProfile"] + """Specifications on how to scale the VirtualMachines agent pool to a fixed size.""" + + +class AgentPoolUpdateVirtualMachinesProfile(TypedDict, total=False): + """Specifications on VirtualMachines agent pool. + + :ivar scale: Specifications on how to scale a VirtualMachines agent pool. + :vartype scale: "AgentPoolUpdateScaleProfile" + """ + + scale: "AgentPoolUpdateScaleProfile" + """Specifications on how to scale a VirtualMachines agent pool.""" + + class AgentPoolUpgradeSettings(TypedDict, total=False): """Settings for upgrading an agentpool. @@ -829,6 +1114,15 @@ class AgentPoolUpgradeSettings(TypedDict, total=False): `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_. :vartype maxUnavailable: str + :ivar maxBlockedNodes: The maximum number or percentage of extra nodes that are allowed to be + blocked in the agent pool during an upgrade when undrainable node behavior is Cordon. This can + either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is + specified, it is the percentage of the total agent pool size at the time of the upgrade. For + percentages, fractional nodes are rounded up. If not specified, the default is maxSurge. This + must always be greater than or equal to maxSurge. For more information, including best + practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_. + :vartype maxBlockedNodes: str :ivar drainTimeoutInMinutes: The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not @@ -861,6 +1155,15 @@ class AgentPoolUpgradeSettings(TypedDict, total=False): For more information, including best practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_.""" + maxBlockedNodes: str + """The maximum number or percentage of extra nodes that are allowed to be blocked in the agent + pool during an upgrade when undrainable node behavior is Cordon. This can either be set to an + integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + percentage of the total agent pool size at the time of the upgrade. For percentages, fractional + nodes are rounded up. If not specified, the default is maxSurge. This must always be greater + than or equal to maxSurge. For more information, including best practices, see: + `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + `_.""" drainTimeoutInMinutes: int """The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption @@ -891,6 +1194,92 @@ class AgentPoolWindowsProfile(TypedDict, total=False): have node public IP enabled.""" +class AlertConfiguration(ProxyResource): + """Alert configuration for a managed cluster. Allows configuring AKS-managed alerts that notify + users of important cluster events and conditions. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar properties: The resource-specific properties for this resource. + :vartype properties: "AlertConfigurationProperties" + """ + + properties: "AlertConfigurationProperties" + """The resource-specific properties for this resource.""" + + +class AlertConfigurationProperties(TypedDict, total=False): + """Properties of the alert configuration. + + :ivar mode: The mode of the alert configuration. Specifies how AKS manages the alerts. + Required. Known values are: "Disabled" and "Managed". + :vartype mode: Union[str, "AlertConfigurationMode"] + :ivar notification: Notification settings for the alert configuration. Required. + :vartype notification: "AlertNotification" + :ivar provisioningState: The current provisioning state of the alert configuration. Known + values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioningState: Union[str, "AlertConfigurationProvisioningState"] + """ + + mode: Required[Union[str, "AlertConfigurationMode"]] + """The mode of the alert configuration. Specifies how AKS manages the alerts. Required. Known + values are: \"Disabled\" and \"Managed\".""" + notification: Required["AlertNotification"] + """Notification settings for the alert configuration. Required.""" + provisioningState: Union[str, "AlertConfigurationProvisioningState"] + """The current provisioning state of the alert configuration. Known values are: \"Succeeded\", + \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + + +class AlertNotification(TypedDict, total=False): + """Notification settings for the alert configuration. + + :ivar actionGroupId: The resource ID of the Azure Monitor action group to send notifications + to. Required. + :vartype actionGroupId: str + """ + + actionGroupId: Required[str] + """The resource ID of the Azure Monitor action group to send notifications to. Required.""" + + +class AllowedSubject(TypedDict, total=False): + """A subject authorized to use the identity binding for token exchange. The namespace selector is + required and must be non-empty. The service account selector is optional; when omitted, all + service accounts in matching namespaces are authorized. Selectors within a single + AllowedSubject are AND'd; multiple AllowedSubjects on an IdentityBinding are OR'd. + + :ivar namespaceSelector: Label selector matching the namespaces in which this identity may be + used. Must be non-empty: an empty selector would match every namespace and is rejected to + prevent overly permissive bindings. Use the built-in ``kubernetes.io/metadata.name`` label to + target specific namespaces by name. Required. + :vartype namespaceSelector: "LabelSelector" + :ivar serviceAccountSelector: Optional label selector matching the service accounts (within the + namespaces matched by ``namespaceSelector``) that may use this identity. When omitted, all + service accounts in matching namespaces are authorized. When provided, it must be non-empty. + :vartype serviceAccountSelector: "LabelSelector" + """ + + namespaceSelector: Required["LabelSelector"] + """Label selector matching the namespaces in which this identity may be used. Must be non-empty: + an empty selector would match every namespace and is rejected to prevent overly permissive + bindings. Use the built-in ``kubernetes.io/metadata.name`` label to target specific namespaces + by name. Required.""" + serviceAccountSelector: "LabelSelector" + """Optional label selector matching the service accounts (within the namespaces matched by + ``namespaceSelector``) that may use this identity. When omitted, all service accounts in + matching namespaces are authorized. When provided, it must be non-empty.""" + + class AutoScaleProfile(TypedDict, total=False): """Specifications on auto-scaling. @@ -952,6 +1341,101 @@ class AzureKeyVaultKms(TypedDict, total=False): must be a valid resource ID. When keyVaultNetworkAccess is ``Public``, leave the field empty.""" +class BastionProfile(TypedDict, total=False): + """Profile to enable managed Azure Bastion or reference to an existing Bastion for the managed + cluster. See `https://aka.ms/aks/BastionConnect `_ for more + details. + + :ivar enabled: Indicates whether managed bastion is enabled. + :vartype enabled: bool + :ivar bastionId: The resource ID of the managed bastion associated with the managed cluster. + :vartype bastionId: str + :ivar sku: The SKU of the managed bastion. + + Only Standard and Premium SKUs are supported. + SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed + bastion with new SKU. + + See `https://aka.ms/aks/BastionSKUs `_ for more details. Known + values are: "Standard" and "Premium". + :vartype sku: Union[str, "BastionSku"] + :ivar scaleUnits: The scale units of the managed bastion. Default value is 2. + :vartype scaleUnits: int + :ivar publicIpAddressId: The resource ID of the public IP address associated with the managed + bastion. + + When provided during creation, the managed bastion will reference this existing public IP + address instead of creating a new one. + The referenced public IP address must be in the same subscription and region as the managed + cluster. + + When not provided during creation, AKS will automatically create a new public IP address. + + This field cannot be updated. To change IP address after creation, please disable and re-enable + the managed bastion with the new public IP address. + :vartype publicIpAddressId: str + """ + + enabled: bool + """Indicates whether managed bastion is enabled.""" + bastionId: str + """The resource ID of the managed bastion associated with the managed cluster.""" + sku: Union[str, "BastionSku"] + """The SKU of the managed bastion. + + Only Standard and Premium SKUs are supported. + SKU downgrading is not allowed. To downgrade SKU, please disable then re-enable the managed + bastion with new SKU. + + See `https://aka.ms/aks/BastionSKUs `_ for more details. Known + values are: \"Standard\" and \"Premium\".""" + scaleUnits: int + """The scale units of the managed bastion. Default value is 2.""" + publicIpAddressId: str + """The resource ID of the public IP address associated with the managed bastion. + + When provided during creation, the managed bastion will reference this existing public IP + address instead of creating a new one. + The referenced public IP address must be in the same subscription and region as the managed + cluster. + + When not provided during creation, AKS will automatically create a new public IP address. + + This field cannot be updated. To change IP address after creation, please disable and re-enable + the managed bastion with the new public IP address.""" + + +class CapacityReservation(TypedDict, total=False): + """The Capacity Reservation to provide virtual machines from a reserved group of Machines. + + :ivar capacityReservationGroup: The Capacity Reservation Group to provide virtual machines from + a reserved group of Machines. + :vartype capacityReservationGroup: "CapacityReservationGroup" + """ + + capacityReservationGroup: "CapacityReservationGroup" + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines.""" + + +class CapacityReservationGroup(TypedDict, total=False): + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines. + + :ivar id: The fully qualified resource ID of the Capacity Reservation Group to provide virtual + machines from a reserved group of Machines. This is of the form: + '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + Customers use it to create a Machine with a specified CRG. For more information see `Capacity + Reservation `_. + :vartype id: str + """ + + id: str + """The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines + from a reserved group of Machines. This is of the form: + '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' + Customers use it to create a Machine with a specified CRG. For more information see `Capacity + Reservation `_.""" + + class ClusterUpgradeSettings(TypedDict, total=False): """Settings for upgrading a cluster. @@ -1014,12 +1498,22 @@ class ContainerServiceNetworkProfile(TypedDict, total=False): :ivar loadBalancerSku: The load balancer sku for the managed cluster. The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information about the - differences between load balancer SKUs. Known values are: "standard" and "basic". + differences between load balancer SKUs. Known values are: "service", "standard", and "basic". :vartype loadBalancerSku: Union[str, "LoadBalancerSku"] :ivar loadBalancerProfile: Profile of the cluster load balancer. :vartype loadBalancerProfile: "ManagedClusterLoadBalancerProfile" + :ivar bastionProfile: Profile of the Bastion Host associated with the managed cluster. See + `https://aka.ms/aks/BastionConnect `_ for more details. + :vartype bastionProfile: "BastionProfile" :ivar natGatewayProfile: Profile of the cluster NAT gateway. :vartype natGatewayProfile: "ManagedClusterNATGatewayProfile" + :ivar natGatewayId: The Azure resource ID of the NAT gateway to use for egress at cluster + startup when outboundType is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool + type is podIP, and load balancer type is service SKU. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + When using managed NATGateway this field is auto populated. For more information, see + `https://aka.ms/aks/container-native-slb `_. + :vartype natGatewayId: str :ivar staticEgressGatewayProfile: The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see `https://aka.ms/aks/static-egress-gateway `_. @@ -1037,6 +1531,16 @@ class ContainerServiceNetworkProfile(TypedDict, total=False): families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6. :vartype ipFamilies: list[Union[str, "IPFamily"]] + :ivar podLinkLocalAccess: Defines access to special link local addresses (Azure Instance + Metadata Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is + 'IMDS'. Known values are: "IMDS" and "None". + :vartype podLinkLocalAccess: Union[str, "PodLinkLocalAccess"] + :ivar kubeProxyConfig: Holds configuration customizations for kube-proxy. Any values not + defined will use the kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'. + :vartype kubeProxyConfig: "ContainerServiceNetworkProfileKubeProxyConfig" """ networkPlugin: Union[str, "NetworkPlugin"] @@ -1072,11 +1576,22 @@ class ContainerServiceNetworkProfile(TypedDict, total=False): loadBalancerSku: Union[str, "LoadBalancerSku"] """The load balancer sku for the managed cluster. The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information - about the differences between load balancer SKUs. Known values are: \"standard\" and \"basic\".""" + about the differences between load balancer SKUs. Known values are: \"service\", \"standard\", + and \"basic\".""" loadBalancerProfile: "ManagedClusterLoadBalancerProfile" """Profile of the cluster load balancer.""" + bastionProfile: "BastionProfile" + """Profile of the Bastion Host associated with the managed cluster. See + `https://aka.ms/aks/BastionConnect `_ for more details.""" natGatewayProfile: "ManagedClusterNATGatewayProfile" """Profile of the cluster NAT gateway.""" + natGatewayId: str + """The Azure resource ID of the NAT gateway to use for egress at cluster startup when outboundType + is 'userAssignedNATGateway' using StandardV2 Public IP, backend pool type is podIP, and load + balancer type is service SKU. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'. + When using managed NATGateway this field is auto populated. For more information, see + `https://aka.ms/aks/container-native-slb `_.""" staticEgressGatewayProfile: "ManagedClusterStaticEgressGatewayProfile" """The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see `https://aka.ms/aks/static-egress-gateway `_.""" @@ -1092,6 +1607,77 @@ class ContainerServiceNetworkProfile(TypedDict, total=False): """The IP families used to specify IP versions available to the cluster. IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.""" + podLinkLocalAccess: Union[str, "PodLinkLocalAccess"] + """Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for + pods with hostNetwork=false. if not specified, the default is 'IMDS'. Known values are: + \"IMDS\" and \"None\".""" + kubeProxyConfig: "ContainerServiceNetworkProfileKubeProxyConfig" + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'.""" + + +class ContainerServiceNetworkProfileKubeProxyConfig(TypedDict, total=False): # pylint: disable=name-too-long + """Holds configuration customizations for kube-proxy. Any values not defined will use the + kube-proxy defaulting behavior. See `https://v + `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + where is represented by a - string. Kubernetes version + 1.23 would be '1-23'. + + :ivar enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + kube-proxy is enabled in AKS by default without these customizations). + :vartype enabled: bool + :ivar mode: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values + are: "IPTABLES", "IPVS", and "NFTABLES". + :vartype mode: Union[str, "Mode"] + :ivar ipvsConfig: Holds configuration customizations for IPVS. May only be specified if 'mode' + is set to 'IPVS'. + :vartype ipvsConfig: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig" + """ + + enabled: bool + """Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is + enabled in AKS by default without these customizations).""" + mode: Union[str, "Mode"] + """Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values are: + \"IPTABLES\", \"IPVS\", and \"NFTABLES\".""" + ipvsConfig: "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig" + """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'.""" + + +class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(TypedDict, total=False): # pylint: disable=name-too-long + """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + + :ivar scheduler: IPVS scheduler, for more information please see + `http://www.linuxvirtualserver.org/docs/scheduling.html + `_. Known values are: "RoundRobin" and + "LeastConnection". + :vartype scheduler: Union[str, "IpvsScheduler"] + :ivar tcpTimeoutSeconds: The timeout value used for idle IPVS TCP sessions in seconds. Must be + a positive integer value. + :vartype tcpTimeoutSeconds: int + :ivar tcpFinTimeoutSeconds: The timeout value used for IPVS TCP sessions after receiving a FIN + in seconds. Must be a positive integer value. + :vartype tcpFinTimeoutSeconds: int + :ivar udpTimeoutSeconds: The timeout value used for IPVS UDP packets in seconds. Must be a + positive integer value. + :vartype udpTimeoutSeconds: int + """ + + scheduler: Union[str, "IpvsScheduler"] + """IPVS scheduler, for more information please see + `http://www.linuxvirtualserver.org/docs/scheduling.html + `_. Known values are: \"RoundRobin\" + and \"LeastConnection\".""" + tcpTimeoutSeconds: int + """The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value.""" + tcpFinTimeoutSeconds: int + """The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a + positive integer value.""" + udpTimeoutSeconds: int + """The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value.""" class ContainerServiceSshConfiguration(TypedDict, total=False): @@ -1256,11 +1842,60 @@ class GPUProfile(TypedDict, total=False): :ivar driver: Whether to install GPU drivers. When it's not specified, default is Install. Known values are: "Install" and "None". :vartype driver: Union[str, "GPUDriver"] + :ivar driverType: Specify the type of GPU driver to install when creating Windows agent pools. + If not provided, AKS selects the driver based on system compatibility. This cannot be changed + once the AgentPool has been created. This cannot be set on Linux AgentPools. For Linux + AgentPools, the driver is selected based on system compatibility. Known values are: "GRID" and + "CUDA". + :vartype driverType: Union[str, "DriverType"] + :ivar nvidia: NVIDIA-specific GPU settings. + :vartype nvidia: "NvidiaGPUProfile" """ driver: Union[str, "GPUDriver"] """Whether to install GPU drivers. When it's not specified, default is Install. Known values are: \"Install\" and \"None\".""" + driverType: Union[str, "DriverType"] + """Specify the type of GPU driver to install when creating Windows agent pools. If not provided, + AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool + has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is + selected based on system compatibility. Known values are: \"GRID\" and \"CUDA\".""" + nvidia: "NvidiaGPUProfile" + """NVIDIA-specific GPU settings.""" + + +class HardEvictionThreshold(TypedDict, total=False): + """Hard eviction thresholds for kubelet. These thresholds trigger pod eviction when node resources + drop below the specified values. Values must be greater than or equal to the documented + minimums for each signal. Supported formats are Ki, Mi, Gi, or percentages using %. + + :ivar memoryAvailable: The threshold for available memory below which pod eviction is + triggered. Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute + values must be greater than or equal to 100Mi. Percentage values must be greater than or equal + to 2%. + :vartype memoryAvailable: str + :ivar nodeFsAvailable: The threshold for available node filesystem space below which pod + eviction is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). + Must be greater than or equal to the system default of 10%. + :vartype nodeFsAvailable: str + :ivar nodeFsInodesFree: The threshold for available inodes on the node filesystem below which + pod eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage values + (e.g. '5%'). Percentage values must be greater than or equal to the system default of 5%. + :vartype nodeFsInodesFree: str + """ + + memoryAvailable: str + """The threshold for available memory below which pod eviction is triggered. Accepts absolute + values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute values must be greater than or + equal to 100Mi. Percentage values must be greater than or equal to 2%.""" + nodeFsAvailable: str + """The threshold for available node filesystem space below which pod eviction is triggered. + Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Must be greater than or + equal to the system default of 10%.""" + nodeFsInodesFree: str + """The threshold for available inodes on the node filesystem below which pod eviction is + triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). + Percentage values must be greater than or equal to the system default of 5%.""" class IdentityBinding(ProxyResource): @@ -1339,6 +1974,12 @@ class IdentityBindingProperties(TypedDict, total=False): :ivar provisioningState: The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". :vartype provisioningState: Union[str, "IdentityBindingProvisioningState"] + :ivar allowedSubjects: Optional list of subjects authorized to use this identity binding for + token exchange. Each entry pairs a required namespace label selector with an optional service + account label selector; selectors within an entry are AND'd, and multiple entries are OR'd. + When omitted or empty, authorization falls back exclusively to ClusterRole/ClusterRoleBinding + evaluation. Maximum 100 entries. + :vartype allowedSubjects: list["AllowedSubject"] """ managedIdentity: Required["IdentityBindingManagedIdentityProfile"] @@ -1348,6 +1989,12 @@ class IdentityBindingProperties(TypedDict, total=False): provisioningState: Union[str, "IdentityBindingProvisioningState"] """The status of the last operation. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + allowedSubjects: list["AllowedSubject"] + """Optional list of subjects authorized to use this identity binding for token exchange. Each + entry pairs a required namespace label selector with an optional service account label + selector; selectors within an entry are AND'd, and multiple entries are OR'd. When omitted or + empty, authorization falls back exclusively to ClusterRole/ClusterRoleBinding evaluation. + Maximum 100 entries.""" class IPTag(TypedDict, total=False): @@ -1499,6 +2146,200 @@ class IstioServiceMesh(TypedDict, total=False): `_.""" +class JWTAuthenticator(ProxyResource): + """Configuration for JWT authenticator in the managed cluster. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar properties: The properties of JWTAuthenticator. For details on how to configure the + properties of a JWT authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. Required. + :vartype properties: "JWTAuthenticatorProperties" + """ + + properties: Required["JWTAuthenticatorProperties"] + """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT + authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. Required.""" + + +class JWTAuthenticatorClaimMappingExpression(TypedDict, total=False): + """The claim mapping expression for JWTAuthenticator. + + :ivar expression: The CEL expression used to access token claims. Required. + :vartype expression: str + """ + + expression: Required[str] + """The CEL expression used to access token claims. Required.""" + + +class JWTAuthenticatorClaimMappings(TypedDict, total=False): + """The claim mappings for JWTAuthenticator. + + :ivar username: The expression to extract username attribute from the token claims. Required. + :vartype username: "JWTAuthenticatorClaimMappingExpression" + :ivar groups: The expression to extract groups attribute from the token claims. When not + provided, no groups are extracted from the token claims. + :vartype groups: "JWTAuthenticatorClaimMappingExpression" + :ivar uid: The expression to extract uid attribute from the token claims. When not provided, no + uid is extracted from the token claims. + :vartype uid: "JWTAuthenticatorClaimMappingExpression" + :ivar extra: The expression to extract extra attribute from the token claims. When not + provided, no extra attributes are extracted from the token claims. + :vartype extra: list["JWTAuthenticatorExtraClaimMappingExpression"] + """ + + username: Required["JWTAuthenticatorClaimMappingExpression"] + """The expression to extract username attribute from the token claims. Required.""" + groups: "JWTAuthenticatorClaimMappingExpression" + """The expression to extract groups attribute from the token claims. When not provided, no groups + are extracted from the token claims.""" + uid: "JWTAuthenticatorClaimMappingExpression" + """The expression to extract uid attribute from the token claims. When not provided, no uid is + extracted from the token claims.""" + extra: list["JWTAuthenticatorExtraClaimMappingExpression"] + """The expression to extract extra attribute from the token claims. When not provided, no extra + attributes are extracted from the token claims.""" + + +class JWTAuthenticatorExtraClaimMappingExpression(TypedDict, total=False): # pylint: disable=name-too-long + """The extra claim mapping expression for JWTAuthenticator. + + :ivar key: The key of the extra attribute. Required. + :vartype key: str + :ivar valueExpression: The CEL expression used to extract the value of the extra attribute. + Required. + :vartype valueExpression: str + """ + + key: Required[str] + """The key of the extra attribute. Required.""" + valueExpression: Required[str] + """The CEL expression used to extract the value of the extra attribute. Required.""" + + +class JWTAuthenticatorIssuer(TypedDict, total=False): + """The OIDC issuer details for JWTAuthenticator. + + :ivar url: The issuer URL. The URL must begin with the scheme https and cannot contain a query + string or fragment. This must match the "iss" claim in the presented JWT, and the issuer + returned from discovery. Required. + :vartype url: str + :ivar audiences: The set of acceptable audiences the JWT must be issued to. At least one is + required. When multiple is set, AudienceMatchPolicy is used in API Server configuration. + Required. + :vartype audiences: list[str] + """ + + url: Required[str] + """The issuer URL. The URL must begin with the scheme https and cannot contain a query string or + fragment. This must match the \"iss\" claim in the presented JWT, and the issuer returned from + discovery. Required.""" + audiences: Required[list[str]] + """The set of acceptable audiences the JWT must be issued to. At least one is required. When + multiple is set, AudienceMatchPolicy is used in API Server configuration. Required.""" + + +class JWTAuthenticatorProperties(TypedDict, total=False): + """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT + authenticator, please refer to the Kubernetes documentation: + `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration + `_. + Please note that not all fields available in the Kubernetes documentation are supported by AKS. + For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs + `_. + + :ivar provisioningState: The current provisioning state of the JWT authenticator. Known values + are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". + :vartype provisioningState: Union[str, "JWTAuthenticatorProvisioningState"] + :ivar issuer: The JWT OIDC issuer details. Required. + :vartype issuer: "JWTAuthenticatorIssuer" + :ivar claimValidationRules: The rules that are applied to validate token claims to authenticate + users. All the expressions must evaluate to true for validation to succeed. + :vartype claimValidationRules: list["JWTAuthenticatorValidationRule"] + :ivar claimMappings: The mappings that define how user attributes are extracted from the token + claims. Required. + :vartype claimMappings: "JWTAuthenticatorClaimMappings" + :ivar userValidationRules: The rules that are applied to the mapped user before completing + authentication. All the expressions must evaluate to true for validation to succeed. + :vartype userValidationRules: list["JWTAuthenticatorValidationRule"] + :ivar certificateAuthorityBundle: PEM-encoded CA certificate bundle used to validate the + connection when fetching discovery information. Use this for issuer endpoints that use private + certificate authorities + or environments where TLS inspection is performed. + + The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no + larger than 20 KB in total. Include all CA certificates needed to validate + the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + + If provided, only these CAs are trusted instead of the well-known root CAs. + If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates + is set, those certificates will be used instead. Otherwise, only the well-known + root CAs are trusted. + :vartype certificateAuthorityBundle: str + """ + + provisioningState: Union[str, "JWTAuthenticatorProvisioningState"] + """The current provisioning state of the JWT authenticator. Known values are: \"Succeeded\", + \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" + issuer: Required["JWTAuthenticatorIssuer"] + """The JWT OIDC issuer details. Required.""" + claimValidationRules: list["JWTAuthenticatorValidationRule"] + """The rules that are applied to validate token claims to authenticate users. All the expressions + must evaluate to true for validation to succeed.""" + claimMappings: Required["JWTAuthenticatorClaimMappings"] + """The mappings that define how user attributes are extracted from the token claims. Required.""" + userValidationRules: list["JWTAuthenticatorValidationRule"] + """The rules that are applied to the mapped user before completing authentication. All the + expressions must evaluate to true for validation to succeed.""" + certificateAuthorityBundle: str + """PEM-encoded CA certificate bundle used to validate the connection when fetching discovery + information. Use this for issuer endpoints that use private certificate authorities + or environments where TLS inspection is performed. + + The bundle must contain only CERTIFICATE PEM blocks, up to 10 CA certificates, and must be no + larger than 20 KB in total. Include all CA certificates needed to validate + the issuer endpoint's TLS certificate. Certificate revocation checking is not supported. + + If provided, only these CAs are trusted instead of the well-known root CAs. + If not provided and the managed cluster's properties.securityProfile.customCATrustCertificates + is set, those certificates will be used instead. Otherwise, only the well-known + root CAs are trusted.""" + + +class JWTAuthenticatorValidationRule(TypedDict, total=False): + """The validation rule for JWTAuthenticator. + + :ivar expression: The CEL expression used to validate the claim or attribute. Required. + :vartype expression: str + :ivar message: The validation error message. + :vartype message: str + """ + + expression: Required[str] + """The CEL expression used to validate the claim or attribute. Required.""" + message: str + """The validation error message.""" + + class KubeletConfig(TypedDict, total=False): """Kubelet configurations of agent nodes. See `AKS custom node configuration `_ for more details. @@ -1540,6 +2381,40 @@ class KubeletConfig(TypedDict, total=False): :vartype containerLogMaxFiles: int :ivar podMaxPids: The maximum number of processes per pod. :vartype podMaxPids: int + :ivar seccompDefault: Specifies the default seccomp profile applied to all workloads. If not + specified, 'Unconfined' will be used by default. Known values are: "Unconfined" and + "RuntimeDefault". + :vartype seccompDefault: Union[str, "SeccompDefault"] + :ivar kubeReserved: Kube-reserved values for kubelet. When a value is not set, the + system-computed default based on VM size is used. See `AKS node resource reservations + `_ for details on computed defaults. Only applicable for + Linux nodepools. + :vartype kubeReserved: "KubeReserved" + :ivar hardEvictionThreshold: Hard eviction thresholds for kubelet. When a threshold is not set, + the system default is used. See `AKS node resource reservations + `_ for details on computed defaults. Only applicable for + Linux nodepools. + :vartype hardEvictionThreshold: "HardEvictionThreshold" + :ivar softEvictionThreshold: Soft eviction thresholds for kubelet. When crossed, pods are + evicted after the paired softEvictionGracePeriod. System defaults apply when the cluster's + ``enableNodeHardening`` property is true; otherwise no soft eviction is configured. For each + signal (memoryAvailable, nodeFsAvailable, nodeFsInodesFree), the entries in + softEvictionThreshold and softEvictionGracePeriod must be in the same state: both omitted + (default), both non-empty (override), or both empty strings (opt that signal out). Only + applicable for Linux nodepools. See + `https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds + `_. + :vartype softEvictionThreshold: "SoftEvictionThreshold" + :ivar softEvictionGracePeriod: Grace periods for soft eviction signals — how long a threshold + must be held before pod eviction. Same defaulting and pairing rules as softEvictionThreshold. + Values are Go-style duration strings (e.g. '1m30s'); supported units are 'ns', 'us', 'ms', 's', + 'm', and 'h'. Only applicable for Linux nodepools. + :vartype softEvictionGracePeriod: "SoftEvictionGracePeriod" + :ivar evictionMaxPodGracePeriodInSeconds: Maximum grace period, in seconds, for pods to + terminate during a soft eviction; caps the pod's terminationGracePeriodSeconds. Default is 60, + applied when the cluster's ``enableNodeHardening`` property is true. Only applicable for Linux + nodepools. + :vartype evictionMaxPodGracePeriodInSeconds: int """ cpuManagerPolicy: str @@ -1574,6 +2449,123 @@ class KubeletConfig(TypedDict, total=False): be ≥ 2.""" podMaxPids: int """The maximum number of processes per pod.""" + seccompDefault: Union[str, "SeccompDefault"] + """Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' + will be used by default. Known values are: \"Unconfined\" and \"RuntimeDefault\".""" + kubeReserved: "KubeReserved" + """Kube-reserved values for kubelet. When a value is not set, the system-computed default based on + VM size is used. See `AKS node resource reservations `_ + for details on computed defaults. Only applicable for Linux nodepools.""" + hardEvictionThreshold: "HardEvictionThreshold" + """Hard eviction thresholds for kubelet. When a threshold is not set, the system default is used. + See `AKS node resource reservations `_ for details on + computed defaults. Only applicable for Linux nodepools.""" + softEvictionThreshold: "SoftEvictionThreshold" + """Soft eviction thresholds for kubelet. When crossed, pods are evicted after the paired + softEvictionGracePeriod. System defaults apply when the cluster's ``enableNodeHardening`` + property is true; otherwise no soft eviction is configured. For each signal (memoryAvailable, + nodeFsAvailable, nodeFsInodesFree), the entries in softEvictionThreshold and + softEvictionGracePeriod must be in the same state: both omitted (default), both non-empty + (override), or both empty strings (opt that signal out). Only applicable for Linux nodepools. + See + `https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#soft-eviction-thresholds + `_.""" + softEvictionGracePeriod: "SoftEvictionGracePeriod" + """Grace periods for soft eviction signals — how long a threshold must be held before pod + eviction. Same defaulting and pairing rules as softEvictionThreshold. Values are Go-style + duration strings (e.g. '1m30s'); supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Only + applicable for Linux nodepools.""" + evictionMaxPodGracePeriodInSeconds: int + """Maximum grace period, in seconds, for pods to terminate during a soft eviction; caps the pod's + terminationGracePeriodSeconds. Default is 60, applied when the cluster's + ``enableNodeHardening`` property is true. Only applicable for Linux nodepools.""" + + +class KubeReserved(TypedDict, total=False): + """Kube-reserved values for kubelet. When a value is not set, the system-computed default based on + VM size is used. See `AKS node resource reservations `_ + for details on computed defaults. Only applicable for Linux nodepools. + + :ivar cpuMillicores: The amount of CPU reserved for Kubernetes system daemons, in millicores. + Must be greater than or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores). + :vartype cpuMillicores: int + :ivar memoryMB: The amount of memory reserved for Kubernetes system daemons, in MiB. Must be + greater than or equal to 750. + :vartype memoryMB: int + """ + + cpuMillicores: int + """The amount of CPU reserved for Kubernetes system daemons, in millicores. Must be greater than + or equal to 140. For example, a value of 200 means 200m (0.2 CPU cores).""" + memoryMB: int + """The amount of memory reserved for Kubernetes system daemons, in MiB. Must be greater than or + equal to 750.""" + + +class KubernetesResourceObjectEncryptionProfile(TypedDict, total=False): # pylint: disable=name-too-long + """Encryption at rest of Kubernetes resource objects using service-managed keys. More information + on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. + + :ivar infrastructureEncryption: Whether to enable encryption at rest of Kubernetes resource + objects using service-managed keys. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. Known values are: "Enabled" and + "Disabled". + :vartype infrastructureEncryption: Union[str, "InfrastructureEncryption"] + """ + + infrastructureEncryption: Union[str, "InfrastructureEncryption"] + """Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. + More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. Known values are: \"Enabled\" and + \"Disabled\".""" + + +class LabelSelector(TypedDict, total=False): + """A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null label selector + matches no objects. + + :ivar matchLabels: matchLabels is an array of {key=value} pairs. A single {key=value} in the + matchLabels map is equivalent to an element of matchExpressions, whose key field is ``key``, + the operator is ``In``, and the values array contains only ``value``. The requirements are + ANDed. + :vartype matchLabels: list[str] + :ivar matchExpressions: matchExpressions is a list of label selector requirements. The + requirements are ANDed. + :vartype matchExpressions: list["LabelSelectorRequirement"] + """ + + matchLabels: list[str] + """matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is + equivalent to an element of matchExpressions, whose key field is ``key``, the operator is + ``In``, and the values array contains only ``value``. The requirements are ANDed.""" + matchExpressions: list["LabelSelectorRequirement"] + """matchExpressions is a list of label selector requirements. The requirements are ANDed.""" + + +class LabelSelectorRequirement(TypedDict, total=False): + """A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + + :ivar key: key is the label key that the selector applies to. + :vartype key: str + :ivar operator: operator represents a key's relationship to a set of values. Valid operators + are In and NotIn. Known values are: "In", "NotIn", "Exists", and "DoesNotExist". + :vartype operator: Union[str, "Operator"] + :ivar values: values is an array of string values, the values array must be non-empty. + :vartype values: list[str] + """ + + key: str + """key is the label key that the selector applies to.""" + operator: Union[str, "Operator"] + """operator represents a key's relationship to a set of values. Valid operators are In and NotIn. + Known values are: \"In\", \"NotIn\", \"Exists\", and \"DoesNotExist\".""" + values: list[str] + """values is an array of string values, the values array must be non-empty.""" class LinuxOSConfig(TypedDict, total=False): @@ -1612,6 +2604,82 @@ class LinuxOSConfig(TypedDict, total=False): """The size in MB of a swap file that will be created on each node.""" +class ListBootstrapDataRequest(TypedDict, total=False): + """Empty request body for listing FlexNode bootstrap data.""" + + +class LoadBalancer(ProxyResource): + """The configurations regarding multiple standard load balancers. If not supplied, single load + balancer mode will be used. Multiple standard load balancers mode will be used if at lease one + configuration is supplied. There has to be a configuration named ``kubernetes``. The name field + will be the name of the corresponding public load balancer. There will be an internal load + balancer created if needed, and the name will be ``-internal``. The internal lb shares + the same configurations as the external one. The internal lbs are not needed to be included in + LoadBalancer list. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar properties: The properties of the load balancer. + :vartype properties: "LoadBalancerProperties" + """ + + properties: "LoadBalancerProperties" + """The properties of the load balancer.""" + + +class LoadBalancerProperties(TypedDict, total=False): + """Properties for a load balancer resource. + + :ivar primaryAgentPoolName: Required field. A string value that must specify the ID of an + existing agent pool. All nodes in the given pool will always be added to this load balancer. + This agent pool must have at least one node and minCount>=1 for autoscaling operations. An + agent pool can only be the primary pool for a single load balancer. Required. + :vartype primaryAgentPoolName: str + :ivar allowServicePlacement: Whether to automatically place services on the load balancer. If + not supplied, the default value is true. If set to false manually, both of the external and the + internal load balancer will not be selected for services unless they explicitly target it. + :vartype allowServicePlacement: bool + :ivar serviceLabelSelector: Only services that must match this selector can be placed on this + load balancer. + :vartype serviceLabelSelector: "LabelSelector" + :ivar serviceNamespaceSelector: Services created in namespaces that match the selector can be + placed on this load balancer. + :vartype serviceNamespaceSelector: "LabelSelector" + :ivar nodeSelector: Nodes that match this selector will be possible members of this load + balancer. + :vartype nodeSelector: "LabelSelector" + :ivar provisioningState: The current provisioning state. + :vartype provisioningState: str + """ + + primaryAgentPoolName: Required[str] + """Required field. A string value that must specify the ID of an existing agent pool. All nodes in + the given pool will always be added to this load balancer. This agent pool must have at least + one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool + for a single load balancer. Required.""" + allowServicePlacement: bool + """Whether to automatically place services on the load balancer. If not supplied, the default + value is true. If set to false manually, both of the external and the internal load balancer + will not be selected for services unless they explicitly target it.""" + serviceLabelSelector: "LabelSelector" + """Only services that must match this selector can be placed on this load balancer.""" + serviceNamespaceSelector: "LabelSelector" + """Services created in namespaces that match the selector can be placed on this load balancer.""" + nodeSelector: "LabelSelector" + """Nodes that match this selector will be possible members of this load balancer.""" + provisioningState: str + """The current provisioning state.""" + + class LocalDNSOverride(TypedDict, total=False): """Overrides for localDNS profile. @@ -1668,35 +2736,500 @@ class LocalDNSOverride(TypedDict, total=False): information. Known values are: \"Verify\", \"Immediate\", and \"Disable\".""" -class LocalDNSProfile(TypedDict, total=False): - """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve - performance and reliability of DNS resolution in an AKS cluster. For more details see - aka.ms/aks/localdns. +class LocalDNSProfile(TypedDict, total=False): + """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve + performance and reliability of DNS resolution in an AKS cluster. For more details see + aka.ms/aks/localdns. + + :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and + "Disabled". + :vartype mode: Union[str, "LocalDNSMode"] + :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". + :vartype state: Union[str, "LocalDNSState"] + :ivar vnetDNSOverrides: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default + or kubelet (referred to as VnetDNS traffic). + :vartype vnetDNSOverrides: dict[str, "LocalDNSOverride"] + :ivar kubeDNSOverrides: KubeDNS overrides apply to DNS traffic from pods with + dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). + :vartype kubeDNSOverrides: dict[str, "LocalDNSOverride"] + """ + + mode: Union[str, "LocalDNSMode"] + """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and + \"Disabled\".""" + state: Union[str, "LocalDNSState"] + """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" + vnetDNSOverrides: dict[str, "LocalDNSOverride"] + """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to + as VnetDNS traffic).""" + kubeDNSOverrides: dict[str, "LocalDNSOverride"] + """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as + KubeDNS traffic).""" + + +class Machine(ProxyResource): + """A machine. Contains details about the underlying virtual machine. A machine may be visible here + but not in kubectl get nodes; if so it may be because the machine has not been registered with + the Kubernetes API Server yet. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar properties: The properties of the machine. + :vartype properties: "MachineProperties" + :ivar zones: The Availability zone in which machine is located. + :vartype zones: list[str] + """ + + properties: "MachineProperties" + """The properties of the machine.""" + zones: list[str] + """The Availability zone in which machine is located.""" + + +class MachineBillingProfile(TypedDict, total=False): + """The properties having to do with machine billing. + + :ivar spotMaxPrice: The max price (in US Dollars) you are willing to pay for spot instances. + Possible values are any decimal value greater than zero or -1 which indicates default price to + be up-to on-demand. For more details on spot pricing, see `spot VMs pricing + `_. + :vartype spotMaxPrice: float + """ + + spotMaxPrice: float + """The max price (in US Dollars) you are willing to pay for spot instances. Possible values are + any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + For more details on spot pricing, see `spot VMs pricing + `_.""" + + +class MachineHardwareProfile(TypedDict, total=False): + """The hardware and GPU settings of the machine. + + :ivar vmSize: The size of the VM. VM size availability varies by region. If a node contains + insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more + details on restricted VM sizes, see: `https://docs.microsoft.com/azure/aks/quotas-skus-regions + `_. + :vartype vmSize: str + :ivar gpuInstanceProfile: GPUInstanceProfile to be used to specify GPU MIG instance profile for + supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". + :vartype gpuInstanceProfile: Union[str, "GPUInstanceProfile"] + :ivar gpuProfile: The GPU settings of the machine. + :vartype gpuProfile: "GPUProfile" + :ivar ultraSsdEnabled: Whether to enable UltraSSD. + :vartype ultraSsdEnabled: bool + """ + + vmSize: str + """The size of the VM. VM size availability varies by region. If a node contains insufficient + compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + restricted VM sizes, see: `https://docs.microsoft.com/azure/aks/quotas-skus-regions + `_.""" + gpuInstanceProfile: Union[str, "GPUInstanceProfile"] + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + Known values are: \"MIG1g\", \"MIG2g\", \"MIG3g\", \"MIG4g\", and \"MIG7g\".""" + gpuProfile: "GPUProfile" + """The GPU settings of the machine.""" + ultraSsdEnabled: bool + """Whether to enable UltraSSD.""" + + +class MachineIpAddress(TypedDict, total=False): + """The machine IP address details. + + :ivar family: To determine if address belongs IPv4 or IPv6 family. Known values are: "IPv4" and + "IPv6". + :vartype family: Union[str, "IPFamily"] + :ivar ip: IPv4 or IPv6 address of the machine. + :vartype ip: str + """ + + family: Union[str, "IPFamily"] + """To determine if address belongs IPv4 or IPv6 family. Known values are: \"IPv4\" and \"IPv6\".""" + ip: str + """IPv4 or IPv6 address of the machine.""" + + +class MachineKubernetesProfile(TypedDict, total=False): + """The Kubernetes configurations used by the machine. + + :ivar nodeLabels: The node labels on the machine. + :vartype nodeLabels: dict[str, str] + :ivar orchestratorVersion: The version of Kubernetes specified by the user. Both patch version + and are supported. When is specified, the + latest supported patch version is chosen automatically. + :vartype orchestratorVersion: str + :ivar currentOrchestratorVersion: The version of Kubernetes running on the machine. If + orchestratorVersion was a fully specified version , this field will be + exactly equal to it. If orchestratorVersion was , this field will contain the full + version being used. + :vartype currentOrchestratorVersion: str + :ivar kubeletDiskType: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". + :vartype kubeletDiskType: Union[str, "KubeletDiskType"] + :ivar kubeletConfig: The Kubelet configuration on the machine. + :vartype kubeletConfig: "KubeletConfig" + :ivar nodeInitializationTaints: Taints added on the node during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. These taints allow for required configuration to run before the node is ready to accept + workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint + nodes node1 key1=value1:NoSchedule-``. + :vartype nodeInitializationTaints: list[str] + :ivar nodeTaints: The taints added to new node during machine create. For example, + key=value:NoSchedule. + :vartype nodeTaints: list[str] + :ivar maxPods: The maximum number of pods that can run on a node. + :vartype maxPods: int + :ivar nodeName: The node name in the Kubernetes cluster. + :vartype nodeName: str + :ivar workloadRuntime: Determines the type of workload a node can run. Known values are: + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + :vartype workloadRuntime: Union[str, "WorkloadRuntime"] + :ivar artifactStreamingProfile: Configuration for using artifact streaming on AKS. + :vartype artifactStreamingProfile: "AgentPoolArtifactStreamingProfile" + """ + + nodeLabels: dict[str, str] + """The node labels on the machine.""" + orchestratorVersion: str + """The version of Kubernetes specified by the user. Both patch version and + are supported. When is specified, the latest supported patch + version is chosen automatically.""" + currentOrchestratorVersion: str + """The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified + version , this field will be exactly equal to it. If orchestratorVersion was + , this field will contain the full version being used.""" + kubeletDiskType: Union[str, "KubeletDiskType"] + """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet + ephemeral storage. Known values are: \"OS\" and \"Temporary\".""" + kubeletConfig: "KubeletConfig" + """The Kubelet configuration on the machine.""" + nodeInitializationTaints: list[str] + """Taints added on the node during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" + nodeTaints: list[str] + """The taints added to new node during machine create. For example, key=value:NoSchedule.""" + maxPods: int + """The maximum number of pods that can run on a node.""" + nodeName: str + """The node name in the Kubernetes cluster.""" + workloadRuntime: Union[str, "WorkloadRuntime"] + """Determines the type of workload a node can run. Known values are: \"OCIContainer\", + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" + artifactStreamingProfile: "AgentPoolArtifactStreamingProfile" + """Configuration for using artifact streaming on AKS.""" + + +class MachineNetworkProperties(TypedDict, total=False): + """network properties of the machine. + + :ivar ipAddresses: IPv4, IPv6 addresses of the machine. + :vartype ipAddresses: list["MachineIpAddress"] + :ivar vnetSubnetID: The ID of the subnet which node and optionally pods will join on startup. + If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is + specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the + form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype vnetSubnetID: str + :ivar podSubnetID: The ID of the subnet which pods will join when launched. If omitted, pod IPs + are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the + form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :vartype podSubnetID: str + :ivar enableNodePublicIP: Whether the machine is allocated its own public IP. Some scenarios + may require the machine to receive their own dedicated public IP addresses. A common scenario + is for gaming workloads, where a console needs to make a direct connection to a cloud virtual + machine to minimize hops. The default is false. + :vartype enableNodePublicIP: bool + :ivar nodePublicIPPrefixID: The public IP prefix ID which VM node should use IPs from. This is + of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :vartype nodePublicIPPrefixID: str + :ivar nodePublicIPTags: IPTags of instance-level public IPs. + :vartype nodePublicIPTags: list["IPTag"] + """ + + ipAddresses: list["MachineIpAddress"] + """IPv4, IPv6 addresses of the machine.""" + vnetSubnetID: str + """The ID of the subnet which node and optionally pods will join on startup. If this is not + specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this + applies to nodes and pods, otherwise it applies to just nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.""" + podSubnetID: str + """The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically + assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.""" + enableNodePublicIP: bool + """Whether the machine is allocated its own public IP. Some scenarios may require the machine to + receive their own dedicated public IP addresses. A common scenario is for gaming workloads, + where a console needs to make a direct connection to a cloud virtual machine to minimize hops. + The default is false.""" + nodePublicIPPrefixID: str + """The public IP prefix ID which VM node should use IPs from. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.""" + nodePublicIPTags: list["IPTag"] + """IPTags of instance-level public IPs.""" + + +class MachineOSProfile(TypedDict, total=False): + """The operating system and disk used by the machine. + + :ivar osType: The operating system type. The default is Linux. Known values are: "Linux" and + "Windows". + :vartype osType: Union[str, "OSType"] + :ivar osSKU: Specifies the OS SKU used by the agent pool. If not specified, the default is + Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be + changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", + "AzureLinux", "AzureLinux3", "Mariner", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", + "Ubuntu2204", "Windows2025", "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and + "Ubuntu2604". + :vartype osSKU: Union[str, "OSSKU"] + :ivar osDiskSizeGB: OS Disk Size in GB to be used to specify the disk size for every machine in + the master/agent pool. If you specify 0, it will apply the default osDisk size according to the + vmSize specified. + :vartype osDiskSizeGB: int + :ivar osDiskType: The OS disk type to be used for machines in the agent pool. The default is + 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. + Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see + `Ephemeral OS `_. + Known values are: "Managed" and "Ephemeral". + :vartype osDiskType: Union[str, "OSDiskType"] + :ivar enableFIPS: Whether to use a FIPS-enabled OS. + :vartype enableFIPS: bool + :ivar linuxProfile: The Linux machine's specific profile. + :vartype linuxProfile: "MachineOSProfileLinuxProfile" + :ivar windowsProfile: The Windows machine's specific profile. + :vartype windowsProfile: "AgentPoolWindowsProfile" + """ + + osType: Union[str, "OSType"] + """The operating system type. The default is Linux. Known values are: \"Linux\" and \"Windows\".""" + osSKU: Union[str, "OSSKU"] + """Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if + OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to + Windows2022 after Windows2019 is deprecated. Known values are: \"Ubuntu\", \"AzureLinux\", + \"AzureLinux3\", \"Mariner\", \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", + \"Ubuntu2204\", \"Windows2025\", \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", + and \"Ubuntu2604\".""" + osDiskSizeGB: int + """OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent + pool. If you specify 0, it will apply the default osDisk size according to the vmSize + specified.""" + osDiskType: Union[str, "OSDiskType"] + """The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the + VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. For more information see `Ephemeral OS + `_. Known values are: + \"Managed\" and \"Ephemeral\".""" + enableFIPS: bool + """Whether to use a FIPS-enabled OS.""" + linuxProfile: "MachineOSProfileLinuxProfile" + """The Linux machine's specific profile.""" + windowsProfile: "AgentPoolWindowsProfile" + """The Windows machine's specific profile.""" + + +class MachineOSProfileLinuxProfile(TypedDict, total=False): + """The Linux machine's specific profile. + + :ivar linuxOSConfig: The OS configuration of Linux machine. + :vartype linuxOSConfig: "LinuxOSConfig" + :ivar messageOfTheDay: Message of the day for Linux nodes, base64-encoded. A base64-encoded + string which will be written to /etc/motd after decoding. This allows customization of the + message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a + static string (i.e., will be printed raw and not be executed as a script). + :vartype messageOfTheDay: str + """ + + linuxOSConfig: "LinuxOSConfig" + """The OS configuration of Linux machine.""" + messageOfTheDay: str + """Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be + written to /etc/motd after decoding. This allows customization of the message of the day for + Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will + be printed raw and not be executed as a script).""" + + +class MachineProperties(TypedDict, total=False): + """The properties of the machine. + + :ivar network: network properties of the machine. + :vartype network: "MachineNetworkProperties" + :ivar resourceId: Azure resource id of the machine. It can be used to GET underlying VM + Instance. + :vartype resourceId: str + :ivar hardware: The hardware and GPU settings of the machine. + :vartype hardware: "MachineHardwareProfile" + :ivar operatingSystem: The operating system and disk used by the machine. + :vartype operatingSystem: "MachineOSProfile" + :ivar kubernetes: The Kubernetes configurations used by the machine. + :vartype kubernetes: "MachineKubernetesProfile" + :ivar mode: Machine only allows 'System' and 'User' mode. Known values are: "System", "User", + "Gateway", "ManagedSystem", and "Machines". + :vartype mode: Union[str, "AgentPoolMode"] + :ivar security: The security settings of the machine. + :vartype security: "MachineSecurityProfile" + :ivar priority: The priority for the machine. If not specified, the default is 'Regular'. Known + values are: "Spot" and "Regular". + :vartype priority: Union[str, "ScaleSetPriority"] + :ivar evictionPolicy: The eviction policy for machine. This cannot be specified unless the + priority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and + "Deallocate". + :vartype evictionPolicy: Union[str, "ScaleSetEvictionPolicy"] + :ivar billing: The properties having to do with machine billing. + :vartype billing: "MachineBillingProfile" + :ivar nodeImageVersion: The version of node image. + :vartype nodeImageVersion: str + :ivar provisioningState: The current deployment or provisioning state. + :vartype provisioningState: str + :ivar tags: The tags to be persisted on the machine. + :vartype tags: dict[str, str] + :ivar eTag: Unique read-only string used to implement optimistic concurrency. The eTag value + will change when the resource is updated. Specify an if-match or if-none-match header with the + eTag value for a subsequent request to enable optimistic concurrency per the normal eTag + convention. + :vartype eTag: str + :ivar status: Contains read-only information about the machine. + :vartype status: "MachineStatus" + :ivar localDNSProfile: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. + LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For + more details see aka.ms/aks/localdns. + :vartype localDNSProfile: "LocalDNSProfile" + :ivar capacityReservation: The Capacity Reservation Group to provide virtual machines from a + reserved group of Machines. + :vartype capacityReservation: "CapacityReservation" + """ + + network: "MachineNetworkProperties" + """network properties of the machine.""" + resourceId: str + """Azure resource id of the machine. It can be used to GET underlying VM Instance.""" + hardware: "MachineHardwareProfile" + """The hardware and GPU settings of the machine.""" + operatingSystem: "MachineOSProfile" + """The operating system and disk used by the machine.""" + kubernetes: "MachineKubernetesProfile" + """The Kubernetes configurations used by the machine.""" + mode: Union[str, "AgentPoolMode"] + """Machine only allows 'System' and 'User' mode. Known values are: \"System\", \"User\", + \"Gateway\", \"ManagedSystem\", and \"Machines\".""" + security: "MachineSecurityProfile" + """The security settings of the machine.""" + priority: Union[str, "ScaleSetPriority"] + """The priority for the machine. If not specified, the default is 'Regular'. Known values are: + \"Spot\" and \"Regular\".""" + evictionPolicy: Union[str, "ScaleSetEvictionPolicy"] + """The eviction policy for machine. This cannot be specified unless the priority is 'Spot'. If not + specified, the default is 'Delete'. Known values are: \"Delete\" and \"Deallocate\".""" + billing: "MachineBillingProfile" + """The properties having to do with machine billing.""" + nodeImageVersion: str + """The version of node image.""" + provisioningState: str + """The current deployment or provisioning state.""" + tags: dict[str, str] + """The tags to be persisted on the machine.""" + eTag: str + """Unique read-only string used to implement optimistic concurrency. The eTag value will change + when the resource is updated. Specify an if-match or if-none-match header with the eTag value + for a subsequent request to enable optimistic concurrency per the normal eTag convention.""" + status: "MachineStatus" + """Contains read-only information about the machine.""" + localDNSProfile: "LocalDNSProfile" + """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve + performance and reliability of DNS resolution in an AKS cluster. For more details see + aka.ms/aks/localdns.""" + capacityReservation: "CapacityReservation" + """The Capacity Reservation Group to provide virtual machines from a reserved group of Machines.""" + + +class MachineSecurityProfile(TypedDict, total=False): + """The security settings of the machine. + + :ivar enableVTPM: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for + keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. + If not specified, the default is false. + :vartype enableVTPM: bool + :ivar enableSecureBoot: Secure Boot is a feature of Trusted Launch which ensures that only + signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. + If not specified, the default is false. + :vartype enableSecureBoot: bool + :ivar sshAccess: SSH access method of an agent pool. Known values are: "LocalUser", "Disabled", + and "EntraId". + :vartype sshAccess: Union[str, "AgentPoolSSHAccess"] + :ivar enableEncryptionAtHost: Whether to enable host based OS and data drive encryption. This + is only supported on certain VM sizes and in certain Azure regions. For more information, see: + `https://docs.microsoft.com/azure/aks/enable-host-encryption + `_. + :vartype enableEncryptionAtHost: bool + """ + + enableVTPM: bool + """vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and + measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not + specified, the default is false.""" + enableSecureBoot: bool + """Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and + drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + default is false.""" + sshAccess: Union[str, "AgentPoolSSHAccess"] + """SSH access method of an agent pool. Known values are: \"LocalUser\", \"Disabled\", and + \"EntraId\".""" + enableEncryptionAtHost: bool + """Whether to enable host based OS and data drive encryption. This is only supported on certain VM + sizes and in certain Azure regions. For more information, see: + `https://docs.microsoft.com/azure/aks/enable-host-encryption + `_.""" + + +class MachineStatus(TypedDict, total=False): + """Contains read-only information about the machine. - :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and - "Disabled". - :vartype mode: Union[str, "LocalDNSMode"] - :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". - :vartype state: Union[str, "LocalDNSState"] - :ivar vnetDNSOverrides: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default - or kubelet (referred to as VnetDNS traffic). - :vartype vnetDNSOverrides: dict[str, "LocalDNSOverride"] - :ivar kubeDNSOverrides: KubeDNS overrides apply to DNS traffic from pods with - dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). - :vartype kubeDNSOverrides: dict[str, "LocalDNSOverride"] + :ivar provisioningError: The error details information of the machine. Preserves the detailed + info of failure. If there was no error, this field is omitted. + :vartype provisioningError: "ErrorDetail" + :ivar creationTimestamp: Specifies the time at which the machine was created. + :vartype creationTimestamp: str + :ivar driftAction: The drift action of the machine. Indicates whether a machine has deviated + from its expected state due to changes in managed cluster properties, requiring corrective + action. Known values are: "Synced" and "Recreate". + :vartype driftAction: Union[str, "DriftAction"] + :ivar driftReason: Reason for machine drift. Provides detailed information on why the machine + has drifted. This field is omitted if the machine is up to date. + :vartype driftReason: str + :ivar vmState: Virtual machine state. Indicates the current state of the underlying virtual + machine. Known values are: "Running" and "Deleted". + :vartype vmState: Union[str, "VmState"] """ - mode: Union[str, "LocalDNSMode"] - """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and - \"Disabled\".""" - state: Union[str, "LocalDNSState"] - """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" - vnetDNSOverrides: dict[str, "LocalDNSOverride"] - """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to - as VnetDNS traffic).""" - kubeDNSOverrides: dict[str, "LocalDNSOverride"] - """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as - KubeDNS traffic).""" + provisioningError: "ErrorDetail" + """The error details information of the machine. Preserves the detailed info of failure. If there + was no error, this field is omitted.""" + creationTimestamp: str + """Specifies the time at which the machine was created.""" + driftAction: Union[str, "DriftAction"] + """The drift action of the machine. Indicates whether a machine has deviated from its expected + state due to changes in managed cluster properties, requiring corrective action. Known values + are: \"Synced\" and \"Recreate\".""" + driftReason: str + """Reason for machine drift. Provides detailed information on why the machine has drifted. This + field is omitted if the machine is up to date.""" + vmState: Union[str, "VmState"] + """Virtual machine state. Indicates the current state of the underlying virtual machine. Known + values are: \"Running\" and \"Deleted\".""" class MaintenanceConfiguration(ProxyResource): @@ -1732,6 +3265,12 @@ class MaintenanceConfigurationProperties(TypedDict, total=False): :vartype timeInWeek: list["TimeInWeek"] :ivar notAllowedTime: Time slots on which upgrade is not allowed. :vartype notAllowedTime: list["TimeSpan"] + :ivar maintenanceWindowId: The fully qualified resource ID of the maintenance window that this + maintenance configuration is linked to. When set, the schedule is derived read-only from the + linked maintenance window — maintenanceWindow becomes a computed field. When absent (the + default), the schedule is defined inline via the maintenanceWindow property. The caller must + have read access to the target maintenance window. + :vartype maintenanceWindowId: str :ivar maintenanceWindow: Maintenance window for the maintenance configuration. :vartype maintenanceWindow: "MaintenanceWindow" """ @@ -1742,6 +3281,12 @@ class MaintenanceConfigurationProperties(TypedDict, total=False): entries.""" notAllowedTime: list["TimeSpan"] """Time slots on which upgrade is not allowed.""" + maintenanceWindowId: str + """The fully qualified resource ID of the maintenance window that this maintenance configuration + is linked to. When set, the schedule is derived read-only from the linked maintenance window — + maintenanceWindow becomes a computed field. When absent (the default), the schedule is defined + inline via the maintenanceWindow property. The caller must have read access to the target + maintenance window.""" maintenanceWindow: "MaintenanceWindow" """Maintenance window for the maintenance configuration.""" @@ -1817,6 +3362,97 @@ class TrackedResource(Resource): """The geo-location where the resource lives. Required.""" +class MaintenanceWindowResource(TrackedResource): + """A maintenance window is a resource-group-scoped resource that defines a reusable maintenance + schedule which can be linked to maintenance configurations on one or more managed clusters. For + more information, see `https://aka.ms/aks/maintenance-windows + `_. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of a maintenance window. + :vartype properties: "MaintenanceWindowResourceProperties" + """ + + properties: "MaintenanceWindowResourceProperties" + """Properties of a maintenance window.""" + + +class MaintenanceWindowResourceProperties(TypedDict, total=False): + """Properties of a maintenance window. For more information, see + `https://aka.ms/aks/maintenance-windows `_. + + :ivar provisioningState: The provisioning state of the maintenance window. Known values are: + "Succeeded", "Failed", and "Canceled". + :vartype provisioningState: Union[str, "ResourceProvisioningState"] + :ivar schedule: Recurrence schedule for the maintenance window. One and only one of the + schedule types should be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. + Required. + :vartype schedule: "Schedule" + :ivar startDate: The date the maintenance window activates. If the current date is before this + date, the maintenance window is inactive and will not be used. If not specified, the + maintenance window will be active right away. + :vartype startDate: str + :ivar startTime: The start time of the maintenance window. Accepted values are from '00:00' to + '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means + UTC time '00:00'. Required. + :vartype startTime: str + :ivar durationHours: Length of the maintenance window in hours. Required. + :vartype durationHours: int + :ivar utcOffset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' + for PST. If not specified, the default is '+00:00'. Note: this is a static offset and does not + adjust for Daylight Saving Time. Customers in DST-observing regions should pick the offset that + matches their preferred wall-clock time year-round; the maintenance window will shift by one + hour relative to local time when DST starts or ends. + :vartype utcOffset: str + :ivar notAllowedDates: Date ranges during which maintenance is not allowed. 'utcOffset' applies + to these dates. For example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to + '2027-01-03', maintenance will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC + time. + :vartype notAllowedDates: list["DateSpan"] + """ + + provisioningState: Union[str, "ResourceProvisioningState"] + """The provisioning state of the maintenance window. Known values are: \"Succeeded\", \"Failed\", + and \"Canceled\".""" + schedule: Required["Schedule"] + """Recurrence schedule for the maintenance window. One and only one of the schedule types should + be specified: 'daily', 'weekly', 'absoluteMonthly', or 'relativeMonthly'. Required.""" + startDate: str + """The date the maintenance window activates. If the current date is before this date, the + maintenance window is inactive and will not be used. If not specified, the maintenance window + will be active right away.""" + startTime: Required[str] + """The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. + 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time + '00:00'. Required.""" + durationHours: Required[int] + """Length of the maintenance window in hours. Required.""" + utcOffset: str + """The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not + specified, the default is '+00:00'. Note: this is a static offset and does not adjust for + Daylight Saving Time. Customers in DST-observing regions should pick the offset that matches + their preferred wall-clock time year-round; the maintenance window will shift by one hour + relative to local time when DST starts or ends.""" + notAllowedDates: list["DateSpan"] + """Date ranges during which maintenance is not allowed. 'utcOffset' applies to these dates. For + example, with 'utcOffset: +02:00' and a date span of '2026-12-23' to '2027-01-03', maintenance + will be blocked from '2026-12-22 22:00' to '2027-01-03 22:00' in UTC time.""" + + class ManagedCluster(TrackedResource): """Managed cluster. @@ -1997,7 +3633,7 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubeletDiskType: Union[str, "KubeletDiskType"] :ivar workloadRuntime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workloadRuntime: Union[str, "WorkloadRuntime"] :ivar messageOfTheDay: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -2026,9 +3662,9 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :vartype osType: Union[str, "OSType"] :ivar osSKU: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype osSKU: Union[str, "OSSKU"] :ivar maxCount: The maximum number of nodes for auto-scaling. :vartype maxCount: int @@ -2041,13 +3677,13 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): "Delete" and "Deallocate". :vartype scaleDownMode: Union[str, "ScaleDownMode"] :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", - "AvailabilitySet", and "VirtualMachines". + "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type: Union[str, "AgentPoolType"] :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: Union[str, "AgentPoolMode"] :ivar orchestratorVersion: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -2068,8 +3704,18 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :ivar nodeImageVersion: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype nodeImageVersion: str + :ivar upgradeStrategy: Defines the upgrade strategy for the agent pool. The default is Rolling. + Known values are: "Rolling" and "BlueGreen". + :vartype upgradeStrategy: Union[str, "UpgradeStrategy"] + :ivar enableOSDiskFullCaching: Whether to enable the full-cache ephemeral OS disk feature. When + this feature is enabled, the entire operating system will be locally cached on the ephemeral OS + disk, preventing E17 events caused by network failures. + :vartype enableOSDiskFullCaching: bool :ivar upgradeSettings: Settings for upgrading the agentpool. :vartype upgradeSettings: "AgentPoolUpgradeSettings" + :ivar upgradeSettingsBlueGreen: Settings for Blue-Green upgrade on the agentpool. Applies when + upgrade strategy is set to BlueGreen. + :vartype upgradeSettingsBlueGreen: "AgentPoolBlueGreenUpgradeSettings" :ivar provisioningState: The current deployment or provisioning state. :vartype provisioningState: str :ivar powerState: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -2113,6 +3759,14 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): :ivar nodeTaints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype nodeTaints: list[str] + :ivar nodeInitializationTaints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype nodeInitializationTaints: list[str] :ivar proximityPlacementGroupID: The ID for Proximity Placement Group. :vartype proximityPlacementGroupID: str :ivar kubeletConfig: The Kubelet configuration on the agent pool nodes. @@ -2174,6 +3828,9 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype localDNSProfile: "LocalDNSProfile" + :ivar preparedImageSpecificationProfile: Settings to determine the prepared image specification + used to provision nodes in a pool. + :vartype preparedImageSpecificationProfile: "PreparedImageSpecificationProfile" """ eTag: str @@ -2204,7 +3861,7 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): ephemeral storage. Known values are: \"OS\" and \"Temporary\".""" workloadRuntime: Union[str, "WorkloadRuntime"] """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", and \"KataVmIsolation\".""" + \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" messageOfTheDay: str """Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for @@ -2230,9 +3887,9 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): osSKU: Union[str, "OSSKU"] """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" maxCount: int """The maximum number of nodes for auto-scaling.""" minCount: int @@ -2244,14 +3901,14 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): autoscaler behavior. If not specified, it defaults to Delete. Known values are: \"Delete\" and \"Deallocate\".""" type: Union[str, "AgentPoolType"] - """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", and - \"VirtualMachines\".""" + """The type of Agent Pool. Known values are: \"VirtualMachineScaleSets\", \"AvailabilitySet\", + \"VirtualMachines\", and \"FlexNodes\".""" mode: Union[str, "AgentPoolMode"] """The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", and \"Gateway\".""" + \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" orchestratorVersion: str """The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the @@ -2271,8 +3928,18 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): nodeImageVersion: str """The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed.""" + upgradeStrategy: Union[str, "UpgradeStrategy"] + """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: + \"Rolling\" and \"BlueGreen\".""" + enableOSDiskFullCaching: bool + """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the + entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events + caused by network failures.""" upgradeSettings: "AgentPoolUpgradeSettings" """Settings for upgrading the agentpool.""" + upgradeSettingsBlueGreen: "AgentPoolBlueGreenUpgradeSettings" + """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to + BlueGreen.""" provisioningState: str """The current deployment or provisioning state.""" powerState: "PowerState" @@ -2313,6 +3980,14 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): nodeTaints: list[str] """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" + nodeInitializationTaints: list[str] + """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will + not be reconciled by AKS and can be removed with a kubectl call. This field can be modified + after node pool is created, but nodes will not be recreated with new taints until another + operation that requires recreation (e.g. node image upgrade) happens. These taints allow for + required configuration to run before the node is ready to accept workloads, for example + 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 + key1=value1:NoSchedule-``.""" proximityPlacementGroupID: str """The ID for Proximity Placement Group.""" kubeletConfig: "KubeletConfig" @@ -2372,6 +4047,8 @@ class ManagedClusterAgentPoolProfileProperties(TypedDict, total=False): """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" + preparedImageSpecificationProfile: "PreparedImageSpecificationProfile" + """Settings to determine the prepared image specification used to provision nodes in a pool.""" class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): @@ -2406,7 +4083,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubeletDiskType: Union[str, "KubeletDiskType"] :ivar workloadRuntime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", and "KataVmIsolation". + "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". :vartype workloadRuntime: Union[str, "WorkloadRuntime"] :ivar messageOfTheDay: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -2435,9 +4112,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :vartype osType: Union[str, "OSType"] :ivar osSKU: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype osSKU: Union[str, "OSSKU"] :ivar maxCount: The maximum number of nodes for auto-scaling. :vartype maxCount: int @@ -2450,13 +4127,13 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "Delete" and "Deallocate". :vartype scaleDownMode: Union[str, "ScaleDownMode"] :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", - "AvailabilitySet", and "VirtualMachines". + "AvailabilitySet", "VirtualMachines", and "FlexNodes". :vartype type: Union[str, "AgentPoolType"] :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: "System", "User", - and "Gateway". + "Gateway", "ManagedSystem", and "Machines". :vartype mode: Union[str, "AgentPoolMode"] :ivar orchestratorVersion: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -2477,8 +4154,18 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar nodeImageVersion: The version of the node image. Setting this value triggers an agentPool rollback. Only values from ``recentlyUsedVersions`` are allowed. :vartype nodeImageVersion: str + :ivar upgradeStrategy: Defines the upgrade strategy for the agent pool. The default is Rolling. + Known values are: "Rolling" and "BlueGreen". + :vartype upgradeStrategy: Union[str, "UpgradeStrategy"] + :ivar enableOSDiskFullCaching: Whether to enable the full-cache ephemeral OS disk feature. When + this feature is enabled, the entire operating system will be locally cached on the ephemeral OS + disk, preventing E17 events caused by network failures. + :vartype enableOSDiskFullCaching: bool :ivar upgradeSettings: Settings for upgrading the agentpool. :vartype upgradeSettings: "AgentPoolUpgradeSettings" + :ivar upgradeSettingsBlueGreen: Settings for Blue-Green upgrade on the agentpool. Applies when + upgrade strategy is set to BlueGreen. + :vartype upgradeSettingsBlueGreen: "AgentPoolBlueGreenUpgradeSettings" :ivar provisioningState: The current deployment or provisioning state. :vartype provisioningState: str :ivar powerState: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -2522,6 +4209,14 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar nodeTaints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :vartype nodeTaints: list[str] + :ivar nodeInitializationTaints: Taints added on the nodes during creation that will not be + reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl + call. This field can be modified after node pool is created, but nodes will not be recreated + with new taints until another operation that requires recreation (e.g. node image upgrade) + happens. These taints allow for required configuration to run before the node is ready to + accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl + taint nodes node1 key1=value1:NoSchedule-``. + :vartype nodeInitializationTaints: list[str] :ivar proximityPlacementGroupID: The ID for Proximity Placement Group. :vartype proximityPlacementGroupID: str :ivar kubeletConfig: The Kubelet configuration on the agent pool nodes. @@ -2583,6 +4278,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype localDNSProfile: "LocalDNSProfile" + :ivar preparedImageSpecificationProfile: Settings to determine the prepared image specification + used to provision nodes in a pool. + :vartype preparedImageSpecificationProfile: "PreparedImageSpecificationProfile" :ivar name: Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less. Required. :vartype name: str @@ -2997,6 +4695,26 @@ class ManagedClusterBootstrapProfile(TypedDict, total=False): premium SKU and zone redundancy.""" +class ManagedClusterControlPlaneScalingProfile(TypedDict, total=False): + """Profile for providing scaled and performance guaranteed control plane capacity to deliver + consistent performance under high workload. Requires Kubernetes version 1.33.0 or later. + + :ivar scalingSize: The scaling size of the control plane. Scaling sizes offer guaranteed + capacity and predictable Kubernetes performance beyond standard tier defaults. Higher H sizes + provide increased performance guarantees. See `https://aka.ms/aks/hyperscale + `_ for performance metrics details for each size. Required. + Known values are: "H2", "H4", and "H8". + :vartype scalingSize: Union[str, "ControlPlaneScalingSize"] + """ + + scalingSize: Required[Union[str, "ControlPlaneScalingSize"]] + """The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable + Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased + performance guarantees. See `https://aka.ms/aks/hyperscale `_ + for performance metrics details for each size. Required. Known values are: \"H2\", \"H4\", and + \"H8\".""" + + class ManagedClusterCostAnalysis(TypedDict, total=False): """The cost analysis configuration for the cluster. @@ -3014,6 +4732,22 @@ class ManagedClusterCostAnalysis(TypedDict, total=False): For more information see aka.ms/aks/docs/cost-analysis.""" +class ManagedClusterHealthMonitorProfile(TypedDict, total=False): + """Health monitor profile for the managed cluster. + + :ivar enableContinuousControlPlaneAndAddonMonitor: Whether to enable continuous control plane + and addon monitor. + :vartype enableContinuousControlPlaneAndAddonMonitor: bool + :ivar enableOnDemandMonitor: Whether to enable on-demand monitor. + :vartype enableOnDemandMonitor: bool + """ + + enableContinuousControlPlaneAndAddonMonitor: bool + """Whether to enable continuous control plane and addon monitor.""" + enableOnDemandMonitor: bool + """Whether to enable on-demand monitor.""" + + class ManagedClusterHostedSystemProfile(TypedDict, total=False): """Settings for hosted system addons. @@ -3058,6 +4792,9 @@ class ManagedClusterHTTPProxyConfig(TypedDict, total=False): :vartype httpsProxy: str :ivar noProxy: The endpoints that should not go through proxy. :vartype noProxy: list[str] + :ivar effectiveNoProxy: A read-only list of all endpoints for which traffic should not be sent + to the proxy. This list is a superset of noProxy and values injected by AKS. + :vartype effectiveNoProxy: list[str] :ivar trustedCa: Alternative CA cert to use for connecting to proxy servers. :vartype trustedCa: str :ivar enabled: Whether to enable HTTP proxy. If disabled, the specified proxy configuration @@ -3071,6 +4808,9 @@ class ManagedClusterHTTPProxyConfig(TypedDict, total=False): """The HTTPS proxy server endpoint to use.""" noProxy: list[str] """The endpoints that should not go through proxy.""" + effectiveNoProxy: list[str] + """A read-only list of all endpoints for which traffic should not be sent to the proxy. This list + is a superset of noProxy and values injected by AKS.""" trustedCa: str """Alternative CA cert to use for connecting to proxy servers.""" enabled: bool @@ -3121,6 +4861,23 @@ class ManagedClusterIdentity(TypedDict, total=False): '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.""" +class ManagedClusterIngressDefaultDomainProfile(TypedDict, total=False): # pylint: disable=name-too-long + """Default domain profile for the managed cluster ingress profile. + + :ivar enabled: Whether to enable Default Domain. + :vartype enabled: bool + :ivar domainName: The unique fully qualified domain name assigned to the cluster. This will not + change even if disabled then reenabled. + :vartype domainName: str + """ + + enabled: bool + """Whether to enable Default Domain.""" + domainName: str + """The unique fully qualified domain name assigned to the cluster. This will not change even if + disabled then reenabled.""" + + class ManagedClusterIngressProfile(TypedDict, total=False): """Ingress profile for the container service cluster. @@ -3131,6 +4888,8 @@ class ManagedClusterIngressProfile(TypedDict, total=False): :vartype webAppRouting: "ManagedClusterIngressProfileWebAppRouting" :ivar gatewayAPI: Settings for the managed Gateway API installation. :vartype gatewayAPI: "ManagedClusterIngressProfileGatewayConfiguration" + :ivar applicationLoadBalancer: Settings for the managed Application Load Balancer installation. + :vartype applicationLoadBalancer: "ManagedClusterIngressProfileApplicationLoadBalancer" """ webAppRouting: "ManagedClusterIngressProfileWebAppRouting" @@ -3140,6 +4899,26 @@ class ManagedClusterIngressProfile(TypedDict, total=False): `_.""" gatewayAPI: "ManagedClusterIngressProfileGatewayConfiguration" """Settings for the managed Gateway API installation.""" + applicationLoadBalancer: "ManagedClusterIngressProfileApplicationLoadBalancer" + """Settings for the managed Application Load Balancer installation.""" + + +class ManagedClusterIngressProfileApplicationLoadBalancer(TypedDict, total=False): # pylint: disable=name-too-long + """Application Load Balancer settings for the ingress profile. + + :ivar enabled: Whether to enable Application Load Balancer. + :vartype enabled: bool + :ivar identity: Managed identity of the Application Load Balancer add-on. This is the identity + that should be granted permissions to manage the associated Application Gateway for Containers + resource. + :vartype identity: "UserAssignedIdentity" + """ + + enabled: bool + """Whether to enable Application Load Balancer.""" + identity: "UserAssignedIdentity" + """Managed identity of the Application Load Balancer add-on. This is the identity that should be + granted permissions to manage the associated Application Gateway for Containers resource.""" class ManagedClusterIngressProfileGatewayConfiguration(TypedDict, total=False): # pylint: disable=name-too-long @@ -3196,6 +4975,10 @@ class ManagedClusterIngressProfileWebAppRouting(TypedDict, total=False): # pyli `_ for more instructions. :vartype identity: "UserAssignedIdentity" + :ivar defaultDomain: Configuration for the Default Domain. This is a unique, autogenerated + domain that comes with a signed TLS Certificate allowing for secure HTTPS. See `the Default + Domain documentation `_ for more instructions. + :vartype defaultDomain: "ManagedClusterIngressDefaultDomainProfile" """ enabled: bool @@ -3219,6 +5002,10 @@ class ManagedClusterIngressProfileWebAppRouting(TypedDict, total=False): # pyli Azure Key Vault. See `this overview of the add-on `_ for more instructions.""" + defaultDomain: "ManagedClusterIngressDefaultDomainProfile" + """Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a + signed TLS Certificate allowing for secure HTTPS. See `the Default Domain documentation + `_ for more instructions.""" class ManagedClusterLoadBalancerProfile(TypedDict, total=False): @@ -3243,8 +5030,12 @@ class ManagedClusterLoadBalancerProfile(TypedDict, total=False): cluster or not. :vartype enableMultipleStandardLoadBalancers: bool :ivar backendPoolType: The type of the managed inbound Load Balancer BackendPool. Known values - are: "NodeIPConfiguration" and "NodeIP". + are: "NodeIPConfiguration", "NodeIP", and "PodIP". :vartype backendPoolType: Union[str, "BackendPoolType"] + :ivar clusterServiceLoadBalancerHealthProbeMode: The health probing behavior for External + Traffic Policy Cluster services. Known values are: "ServiceNodePort" and "Shared". + :vartype clusterServiceLoadBalancerHealthProbeMode: Union[str, + "ClusterServiceLoadBalancerHealthProbeMode"] """ managedOutboundIPs: "ManagedClusterLoadBalancerProfileManagedOutboundIPs" @@ -3265,7 +5056,10 @@ class ManagedClusterLoadBalancerProfile(TypedDict, total=False): """Enable multiple standard load balancers per AKS cluster or not.""" backendPoolType: Union[str, "BackendPoolType"] """The type of the managed inbound Load Balancer BackendPool. Known values are: - \"NodeIPConfiguration\" and \"NodeIP\".""" + \"NodeIPConfiguration\", \"NodeIP\", and \"PodIP\".""" + clusterServiceLoadBalancerHealthProbeMode: Union[str, "ClusterServiceLoadBalancerHealthProbeMode"] + """The health probing behavior for External Traffic Policy Cluster services. Known values are: + \"ServiceNodePort\" and \"Shared\".""" class ManagedClusterLoadBalancerProfileManagedOutboundIPs(TypedDict, total=False): # pylint: disable=name-too-long @@ -3605,6 +5399,9 @@ class ManagedClusterProperties(TypedDict, total=False): :vartype provisioningState: str :ivar powerState: The Power State of the cluster. :vartype powerState: "PowerState" + :ivar creationData: CreationData to be used to specify the source Snapshot ID if the cluster + will be created/upgraded using a snapshot. + :vartype creationData: "CreationData" :ivar maxAgentPools: The max number of agent pools for the managed cluster. :vartype maxAgentPools: int :ivar kubernetesVersion: The version of Kubernetes specified by the user. Both patch version @@ -3664,6 +5461,24 @@ class ManagedClusterProperties(TypedDict, total=False): :ivar supportPlan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: "KubernetesOfficial" and "AKSLongTermSupport". :vartype supportPlan: Union[str, "KubernetesSupportPlan"] + :ivar enableFIPS: Whether to enable FIPS mode at the cluster level. When enabled, this setting + enforces FIPS compliance for all AKS-managed components, such as the node operating system, + addons, and `managed containerized components `_. See + `Enable cluster-wide FIPS `_ for more details. When this property is + enabled, all node pools in the cluster must also be FIPS-enabled. + :vartype enableFIPS: bool + :ivar enableNodeHardening: Whether to enable node hardening at the cluster level. When enabled, + AKS applies hardened defaults for soft eviction thresholds, kube-reserved, and system-reserved + on all Linux node pools in the cluster. Per-node-pool kubeletConfig settings take precedence + over hardening defaults. On agent pools running Kubernetes 1.37 or later, node hardening is + enabled by default and cannot be disabled; setting this field to false has no effect on those + pools. + :vartype enableNodeHardening: bool + :ivar enableNamespaceResources: Enable namespace as Azure resource. The default value is false. + It can be enabled/disabled on creation and updating of the managed cluster. See + `https://aka.ms/NamespaceARMResource `_ for more details + on Namespace as a ARM Resource. + :vartype enableNamespaceResources: bool :ivar networkProfile: The network configuration profile. :vartype networkProfile: "ContainerServiceNetworkProfile" :ivar aadProfile: The Azure Active Directory configuration. @@ -3701,7 +5516,7 @@ class ManagedClusterProperties(TypedDict, total=False): :ivar ingressProfile: Ingress profile for the managed cluster. :vartype ingressProfile: "ManagedClusterIngressProfile" :ivar publicNetworkAccess: PublicNetworkAccess of the managedCluster. Allow or deny public - network access for AKS. Known values are: "Enabled" and "Disabled". + network access for AKS. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype publicNetworkAccess: Union[str, "PublicNetworkAccess"] :ivar workloadAutoScalerProfile: Workload Auto-scaler profile for the managed cluster. :vartype workloadAutoScalerProfile: "ManagedClusterWorkloadAutoScalerProfile" @@ -3729,6 +5544,14 @@ class ManagedClusterProperties(TypedDict, total=False): `https://aka.ms/aks/automatic/systemcomponents `_. :vartype hostedSystemProfile: "ManagedClusterHostedSystemProfile" + :ivar healthMonitorProfile: Health monitor profile for the managed cluster. + :vartype healthMonitorProfile: "ManagedClusterHealthMonitorProfile" + :ivar controlPlaneScalingProfile: Profile for providing scaled and performance guaranteed + control plane capacity to deliver consistent performance under high workload. Requires + Kubernetes version 1.33.0 or later. + :vartype controlPlaneScalingProfile: "ManagedClusterControlPlaneScalingProfile" + :ivar nodeDisruptionProfile: Node disruption profile for a managed cluster. + :vartype nodeDisruptionProfile: "NodeDisruptionProfile" :ivar status: Contains read-only information about the Managed Cluster. :vartype status: "ManagedClusterStatus" """ @@ -3737,6 +5560,9 @@ class ManagedClusterProperties(TypedDict, total=False): """The current provisioning state.""" powerState: "PowerState" """The Power State of the cluster.""" + creationData: "CreationData" + """CreationData to be used to specify the source Snapshot ID if the cluster will be + created/upgraded using a snapshot.""" maxAgentPools: int """The max number of agent pools for the managed cluster.""" kubernetesVersion: str @@ -3796,6 +5622,22 @@ class ManagedClusterProperties(TypedDict, total=False): supportPlan: Union[str, "KubernetesSupportPlan"] """The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: \"KubernetesOfficial\" and \"AKSLongTermSupport\".""" + enableFIPS: bool + """Whether to enable FIPS mode at the cluster level. When enabled, this setting enforces FIPS + compliance for all AKS-managed components, such as the node operating system, addons, and + `managed containerized components `_. See `Enable + cluster-wide FIPS `_ for more details. When this property is enabled, + all node pools in the cluster must also be FIPS-enabled.""" + enableNodeHardening: bool + """Whether to enable node hardening at the cluster level. When enabled, AKS applies hardened + defaults for soft eviction thresholds, kube-reserved, and system-reserved on all Linux node + pools in the cluster. Per-node-pool kubeletConfig settings take precedence over hardening + defaults. On agent pools running Kubernetes 1.37 or later, node hardening is enabled by default + and cannot be disabled; setting this field to false has no effect on those pools.""" + enableNamespaceResources: bool + """Enable namespace as Azure resource. The default value is false. It can be enabled/disabled on + creation and updating of the managed cluster. See `https://aka.ms/NamespaceARMResource + `_ for more details on Namespace as a ARM Resource.""" networkProfile: "ContainerServiceNetworkProfile" """The network configuration profile.""" aadProfile: "ManagedClusterAADProfile" @@ -3834,7 +5676,7 @@ class ManagedClusterProperties(TypedDict, total=False): """Ingress profile for the managed cluster.""" publicNetworkAccess: Union[str, "PublicNetworkAccess"] """PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS. Known - values are: \"Enabled\" and \"Disabled\".""" + values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\".""" workloadAutoScalerProfile: "ManagedClusterWorkloadAutoScalerProfile" """Workload Auto-scaler profile for the managed cluster.""" azureMonitorProfile: "ManagedClusterAzureMonitorProfile" @@ -3859,6 +5701,13 @@ class ManagedClusterProperties(TypedDict, total=False): """Settings for hosted system addons. For more information, see `https://aka.ms/aks/automatic/systemcomponents `_.""" + healthMonitorProfile: "ManagedClusterHealthMonitorProfile" + """Health monitor profile for the managed cluster.""" + controlPlaneScalingProfile: "ManagedClusterControlPlaneScalingProfile" + """Profile for providing scaled and performance guaranteed control plane capacity to deliver + consistent performance under high workload. Requires Kubernetes version 1.33.0 or later.""" + nodeDisruptionProfile: "NodeDisruptionProfile" + """Node disruption profile for a managed cluster.""" status: "ManagedClusterStatus" """Contains read-only information about the Managed Cluster.""" @@ -3974,6 +5823,29 @@ class ManagedClusterProperties(TypedDict, total=False): """ +class ManagedClusterPropertiesForSnapshot(TypedDict, total=False): + """managed cluster properties for snapshot, these properties are read only. + + :ivar kubernetesVersion: The current kubernetes version. + :vartype kubernetesVersion: str + :ivar sku: The current managed cluster sku. + :vartype sku: "ManagedClusterSKU" + :ivar enableRbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + :vartype enableRbac: bool + :ivar networkProfile: The current network profile. + :vartype networkProfile: "NetworkProfileForSnapshot" + """ + + kubernetesVersion: str + """The current kubernetes version.""" + sku: "ManagedClusterSKU" + """The current managed cluster sku.""" + enableRbac: bool + """Whether the cluster has enabled Kubernetes Role-Based Access Control or not.""" + networkProfile: "NetworkProfileForSnapshot" + """The current network profile.""" + + class ManagedClusterSecurityProfile(TypedDict, total=False): """Security profile for the container service cluster. @@ -3983,16 +5855,32 @@ class ManagedClusterSecurityProfile(TypedDict, total=False): `_ settings for the security profile. :vartype azureKeyVaultKms: "AzureKeyVaultKms" + :ivar kubernetesResourceObjectEncryptionProfile: Encryption at rest of Kubernetes resource + objects. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_. + :vartype kubernetesResourceObjectEncryptionProfile: "KubernetesResourceObjectEncryptionProfile" :ivar workloadIdentity: Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure cloud resources securely with Azure AD. See `https://aka.ms/aks/wi `_ for more details. :vartype workloadIdentity: "ManagedClusterSecurityProfileWorkloadIdentity" :ivar imageCleaner: Image Cleaner settings for the security profile. :vartype imageCleaner: "ManagedClusterSecurityProfileImageCleaner" + :ivar imageIntegrity: Image integrity is a feature that works with Azure Policy to verify image + integrity by signature. This will not have any effect unless Azure Policy is applied to enforce + image signatures. See `https://aka.ms/aks/image-integrity + `_ for how to use this feature via policy. + :vartype imageIntegrity: "ManagedClusterSecurityProfileImageIntegrity" + :ivar nodeRestriction: `Node Restriction + `_ + settings for the security profile. + :vartype nodeRestriction: "ManagedClusterSecurityProfileNodeRestriction" :ivar customCATrustCertificates: A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. :vartype customCATrustCertificates: list[str] + :ivar serviceAccountImagePullProfile: Defines service account based image pull settings. + :vartype serviceAccountImagePullProfile: "ServiceAccountImagePullProfile" """ defender: "ManagedClusterSecurityProfileDefender" @@ -4001,16 +5889,31 @@ class ManagedClusterSecurityProfile(TypedDict, total=False): """Azure Key Vault `key management service `_ settings for the security profile.""" + kubernetesResourceObjectEncryptionProfile: "KubernetesResourceObjectEncryptionProfile" + """Encryption at rest of Kubernetes resource objects. More information on this can be found under + `https://aka.ms/aks/kubernetesResourceObjectEncryption + `_.""" workloadIdentity: "ManagedClusterSecurityProfileWorkloadIdentity" """Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure cloud resources securely with Azure AD. See `https://aka.ms/aks/wi `_ for more details.""" imageCleaner: "ManagedClusterSecurityProfileImageCleaner" """Image Cleaner settings for the security profile.""" + imageIntegrity: "ManagedClusterSecurityProfileImageIntegrity" + """Image integrity is a feature that works with Azure Policy to verify image integrity by + signature. This will not have any effect unless Azure Policy is applied to enforce image + signatures. See `https://aka.ms/aks/image-integrity `_ for + how to use this feature via policy.""" + nodeRestriction: "ManagedClusterSecurityProfileNodeRestriction" + """`Node Restriction + `_ + settings for the security profile.""" customCATrustCertificates: list[str] """A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_.""" + serviceAccountImagePullProfile: "ServiceAccountImagePullProfile" + """Defines service account based image pull settings.""" class ManagedClusterSecurityProfileDefender(TypedDict, total=False): @@ -4133,6 +6036,28 @@ class ManagedClusterSecurityProfileImageCleaner(TypedDict, total=False): # pyli """Image Cleaner scanning interval in hours.""" +class ManagedClusterSecurityProfileImageIntegrity(TypedDict, total=False): # pylint: disable=name-too-long + """Image integrity related settings for the security profile. + + :ivar enabled: Whether to enable image integrity. The default value is false. + :vartype enabled: bool + """ + + enabled: bool + """Whether to enable image integrity. The default value is false.""" + + +class ManagedClusterSecurityProfileNodeRestriction(TypedDict, total=False): # pylint: disable=name-too-long + """Node Restriction settings for the security profile. + + :ivar enabled: Whether to enable Node Restriction. + :vartype enabled: bool + """ + + enabled: bool + """Whether to enable Node Restriction.""" + + class ManagedClusterSecurityProfileWorkloadIdentity(TypedDict, total=False): # pylint: disable=name-too-long """Workload identity settings for the security profile. @@ -4179,6 +6104,56 @@ class ManagedClusterSKU(TypedDict, total=False): Known values are: \"Premium\", \"Standard\", and \"Free\".""" +class ManagedClusterSnapshot(TrackedResource): + """A managed cluster snapshot resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: Properties of a managed cluster snapshot. + :vartype properties: "ManagedClusterSnapshotProperties" + """ + + properties: "ManagedClusterSnapshotProperties" + """Properties of a managed cluster snapshot.""" + + +class ManagedClusterSnapshotProperties(TypedDict, total=False): + """Properties for a managed cluster snapshot. + + :ivar creationData: CreationData to be used to specify the source resource ID to create this + snapshot. + :vartype creationData: "CreationData" + :ivar snapshotType: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". + :vartype snapshotType: Union[str, "SnapshotType"] + :ivar managedClusterPropertiesReadOnly: What the properties will be showed when getting managed + cluster snapshot. Those properties are read-only. + :vartype managedClusterPropertiesReadOnly: "ManagedClusterPropertiesForSnapshot" + """ + + creationData: "CreationData" + """CreationData to be used to specify the source resource ID to create this snapshot.""" + snapshotType: Union[str, "SnapshotType"] + """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and + \"ManagedCluster\".""" + managedClusterPropertiesReadOnly: "ManagedClusterPropertiesForSnapshot" + """What the properties will be showed when getting managed cluster snapshot. Those properties are + read-only.""" + + class ManagedClusterStaticEgressGatewayProfile(TypedDict, total=False): """The Static Egress Gateway addon configuration for the cluster. @@ -4376,10 +6351,16 @@ class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( :ivar enabled: Whether to enable VPA. Default value is false. Required. :vartype enabled: bool + :ivar addonAutoscaling: Whether VPA add-on is enabled and configured to scale AKS-managed + add-ons. Known values are: "Enabled" and "Disabled". + :vartype addonAutoscaling: Union[str, "AddonAutoscaling"] """ enabled: Required[bool] """Whether to enable VPA. Default value is false. Required.""" + addonAutoscaling: Union[str, "AddonAutoscaling"] + """Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. Known values are: + \"Enabled\" and \"Disabled\".""" class ManagedNamespace(TrackedResource): @@ -4450,6 +6431,99 @@ class ManualScaleProfile(TypedDict, total=False): """Number of nodes.""" +class MeshMembership(ProxyResource): + """Mesh membership of a managed cluster. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar systemData: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype systemData: "SystemData" + :ivar properties: Mesh membership properties of a managed cluster. + :vartype properties: "MeshMembershipProperties" + :ivar managedBy: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :vartype managedBy: str + :ivar eTag: If eTag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + :vartype eTag: str + """ + + properties: "MeshMembershipProperties" + """Mesh membership properties of a managed cluster.""" + managedBy: str + """The fully qualified resource ID of the resource that manages this resource. Indicates if this + resource is managed by another Azure resource. If this is present, complete mode deployment + will not delete the resource if it is removed from the template since it is managed by another + resource.""" + eTag: str + """If eTag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" + + +class MeshMembershipPrivateConnectProfile(TypedDict, total=False): + """Private connect profile for mesh membership. + + :ivar privateIpAddress: The private IP address of the member cluster private FQDN. This is a + read-only property populated by the service. + :vartype privateIpAddress: str + :ivar subnetResourceId: The delegated subnet resource ID. Customer can provide their own + subnet, or AKS will allocate one if not specified. When providing your own subnet, the minimum + required size is /28. + :vartype subnetResourceId: str + """ + + privateIpAddress: str + """The private IP address of the member cluster private FQDN. This is a read-only property + populated by the service.""" + subnetResourceId: str + """The delegated subnet resource ID. Customer can provide their own subnet, or AKS will allocate + one if not specified. When providing your own subnet, the minimum required size is /28.""" + + +class MeshMembershipProperties(TypedDict, total=False): + """Mesh membership properties of a managed cluster. + + :ivar provisioningState: The current provisioning state of the Mesh Membership. Known values + are: "Canceled", "Creating", "Deleting", "Failed", "Succeeded", and "Updating". + :vartype provisioningState: Union[str, "MeshMembershipProvisioningState"] + :ivar privateConnectProfile: Profile for configuring private connectivity between the mesh + control plane and member clusters. When configured, communication between the mesh control + plane and this member cluster occurs over private network instead of public networks. Visit + `https://aka.ms/applink `_ for more information. + :vartype privateConnectProfile: "MeshMembershipPrivateConnectProfile" + :ivar managedMeshID: The ARM resource id for the managed mesh member. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + Visit `https://aka.ms/applink `_ for more information. Required. + :vartype managedMeshID: str + """ + + provisioningState: Union[str, "MeshMembershipProvisioningState"] + """The current provisioning state of the Mesh Membership. Known values are: \"Canceled\", + \"Creating\", \"Deleting\", \"Failed\", \"Succeeded\", and \"Updating\".""" + privateConnectProfile: "MeshMembershipPrivateConnectProfile" + """Profile for configuring private connectivity between the mesh control plane and member + clusters. When configured, communication between the mesh control plane and this member cluster + occurs over private network instead of public networks. Visit `https://aka.ms/applink + `_ for more information.""" + managedMeshID: Required[str] + """The ARM resource id for the managed mesh member. This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + Visit `https://aka.ms/applink `_ for more information. Required.""" + + class NamespaceProperties(TypedDict, total=False): """Properties of a namespace managed by ARM. @@ -4532,6 +6606,94 @@ class NetworkPolicies(TypedDict, total=False): and \"AllowSameNamespace\".""" +class NetworkProfileForSnapshot(TypedDict, total=False): + """network profile for managed cluster snapshot, these properties are read only. + + :ivar networkPlugin: networkPlugin for managed cluster snapshot. Known values are: "azure", + "kubenet", and "none". + :vartype networkPlugin: Union[str, "NetworkPlugin"] + :ivar networkPluginMode: NetworkPluginMode for managed cluster snapshot. "overlay" + :vartype networkPluginMode: Union[str, "NetworkPluginMode"] + :ivar networkPolicy: networkPolicy for managed cluster snapshot. Known values are: "none", + "calico", "azure", and "cilium". + :vartype networkPolicy: Union[str, "NetworkPolicy"] + :ivar networkMode: networkMode for managed cluster snapshot. Known values are: "transparent" + and "bridge". + :vartype networkMode: Union[str, "NetworkMode"] + :ivar loadBalancerSku: loadBalancerSku for managed cluster snapshot. Known values are: + "service", "standard", and "basic". + :vartype loadBalancerSku: Union[str, "LoadBalancerSku"] + """ + + networkPlugin: Union[str, "NetworkPlugin"] + """networkPlugin for managed cluster snapshot. Known values are: \"azure\", \"kubenet\", and + \"none\".""" + networkPluginMode: Union[str, "NetworkPluginMode"] + """NetworkPluginMode for managed cluster snapshot. \"overlay\"""" + networkPolicy: Union[str, "NetworkPolicy"] + """networkPolicy for managed cluster snapshot. Known values are: \"none\", \"calico\", \"azure\", + and \"cilium\".""" + networkMode: Union[str, "NetworkMode"] + """networkMode for managed cluster snapshot. Known values are: \"transparent\" and \"bridge\".""" + loadBalancerSku: Union[str, "LoadBalancerSku"] + """loadBalancerSku for managed cluster snapshot. Known values are: \"service\", \"standard\", and + \"basic\".""" + + +class NodeDisruptionProfile(TypedDict, total=False): + """Node disruption profile for a managed cluster. + + :ivar nodeDisruptionPolicy: The policy configuration for when to allow certain operations which + require node re-image and trigger redeployment. For example, some operations, such as updating + the .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing + managed cluster, trigger rolling updates of the nodes. This setting allows control over when + such updates are accepted. The default is 'Allow'. For a full list of covered operations see + aka.ms/aks/nodedisruptionpolicy". Known values are: "Allow", "AllowDuringMaintenanceWindow", + and "Block". + :vartype nodeDisruptionPolicy: Union[str, "NodeDisruptionPolicy"] + """ + + nodeDisruptionPolicy: Union[str, "NodeDisruptionPolicy"] + """The policy configuration for when to allow certain operations which require node re-image and + trigger redeployment. For example, some operations, such as updating the + .properties.ManagedClusterSecurityProfile.customCATrustCertificates field on an existing + managed cluster, trigger rolling updates of the nodes. This setting allows control over when + such updates are accepted. The default is 'Allow'. For a full list of covered operations see + aka.ms/aks/nodedisruptionpolicy\". Known values are: \"Allow\", + \"AllowDuringMaintenanceWindow\", and \"Block\".""" + + +class NvidiaGPUProfile(TypedDict, total=False): + """NVIDIA-specific GPU settings. + + :ivar managementMode: The Managed GPU experience installs additional components, such as the + Data Center GPU Manager (DCGM) metrics for monitoring, on top of the GPU driver for you. For + more details of what is installed, check out aka.ms/aks/managed-gpu. Known values are: + "Unmanaged" and "Managed". + :vartype managementMode: Union[str, "ManagementMode"] + :ivar driverMode: NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA + Kubernetes device plugin. DRA installs the NVIDIA DRA driver. Known values are: "DevicePlugin" + and "DRA". + :vartype driverMode: Union[str, "NvidiaDriverMode"] + :ivar migStrategy: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG + support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. + When not specified, the default is None. Known values are: "None", "Single", and "Mixed". + :vartype migStrategy: Union[str, "MigStrategy"] + """ + + managementMode: Union[str, "ManagementMode"] + """The Managed GPU experience installs additional components, such as the Data Center GPU Manager + (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is + installed, check out aka.ms/aks/managed-gpu. Known values are: \"Unmanaged\" and \"Managed\".""" + driverMode: Union[str, "NvidiaDriverMode"] + """NVIDIA GPU resource allocation mode. DevicePlugin installs the NVIDIA Kubernetes device plugin. + DRA installs the NVIDIA DRA driver. Known values are: \"DevicePlugin\" and \"DRA\".""" + migStrategy: Union[str, "MigStrategy"] + """Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more + information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + the default is None. Known values are: \"None\", \"Single\", and \"Mixed\".""" + + class PortRange(TypedDict, total=False): """The port range. @@ -4567,6 +6729,20 @@ class PowerState(TypedDict, total=False): """Tells whether the cluster is Running or Stopped. Known values are: \"Running\" and \"Stopped\".""" +class PreparedImageSpecificationProfile(TypedDict, total=False): + """Settings to determine the prepared image specification used to provision nodes in a pool. + + :ivar preparedImageSpecificationId: The resource ID of the prepared image specification + resource to use. This can include a version. Omitting the version will use the latest version + of the prepared image specification. + :vartype preparedImageSpecificationId: str + """ + + preparedImageSpecificationId: str + """The resource ID of the prepared image specification resource to use. This can include a + version. Omitting the version will use the latest version of the prepared image specification.""" + + class PrivateEndpoint(TypedDict, total=False): """Private endpoint which a connection belongs to. @@ -4674,6 +6850,18 @@ class PrivateLinkServiceConnectionState(TypedDict, total=False): """The private link service connection description.""" +class RebalanceLoadBalancersRequestBody(TypedDict, total=False): + """The names of the load balancers to rebalance. If set to empty, all load balancers will be + rebalanced. + + :ivar loadBalancerNames: The load balancer names list. + :vartype loadBalancerNames: list[str] + """ + + loadBalancerNames: list[str] + """The load balancer names list.""" + + class RelativeMonthlySchedule(TypedDict, total=False): """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. @@ -4849,6 +7037,37 @@ class SchedulerProfile(TypedDict, total=False): `_).""" +class ServiceAccountImagePullProfile(TypedDict, total=False): + """Profile for configuring image pull authentication to use service account scoped managed + identities for authentication instead of node scoped managed identity (kubelet identity) for + authentication to Azure Container Registry. For more information, refer to + `https://aka.ms/aks/identity-binding/acr-image-pull/docs + `_. + + :ivar enabled: Indicates whether service account based image pull is enabled, for which + identity bindings are required for the managed identity to be used for authentication. For more + information, refer to `https://aka.ms/aks/identity-binding-docs + `_. + :vartype enabled: bool + :ivar defaultManagedIdentityId: Optional. The default managed identity resource ID used for + image pulls at the cluster level. When configured, this identity is used if a Pod’s service + account does not explicitly specify an identity for pulling images. If not configured and no + identity is specified at service account level, image will be pulled via anonymous + authentication. + :vartype defaultManagedIdentityId: str + """ + + enabled: bool + """Indicates whether service account based image pull is enabled, for which identity bindings are + required for the managed identity to be used for authentication. For more information, refer to + `https://aka.ms/aks/identity-binding-docs `_.""" + defaultManagedIdentityId: str + """Optional. The default managed identity resource ID used for image pulls at the cluster level. + When configured, this identity is used if a Pod’s service account does not explicitly specify + an identity for pulling images. If not configured and no identity is specified at service + account level, image will be pulled via anonymous authentication.""" + + class ServiceMeshProfile(TypedDict, total=False): """Service mesh profile for a managed cluster. @@ -4896,7 +7115,8 @@ class SnapshotProperties(TypedDict, total=False): :ivar creationData: CreationData to be used to specify the source agent pool resource ID to create this snapshot. :vartype creationData: "CreationData" - :ivar snapshotType: The type of a snapshot. The default is NodePool. "NodePool" + :ivar snapshotType: The type of a snapshot. The default is NodePool. Known values are: + "NodePool" and "ManagedCluster". :vartype snapshotType: Union[str, "SnapshotType"] :ivar kubernetesVersion: The version of Kubernetes. :vartype kubernetesVersion: str @@ -4907,9 +7127,9 @@ class SnapshotProperties(TypedDict, total=False): :vartype osType: Union[str, "OSType"] :ivar osSku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= - 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", - "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and - "AzureContainerLinux". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", "Mariner", + "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", + "WindowsAnnual", "Ubuntu2404", "AzureContainerLinux", and "Ubuntu2604". :vartype osSku: Union[str, "OSSKU"] :ivar vmSize: The size of the VM. :vartype vmSize: str @@ -4920,7 +7140,8 @@ class SnapshotProperties(TypedDict, total=False): creationData: "CreationData" """CreationData to be used to specify the source agent pool resource ID to create this snapshot.""" snapshotType: Union[str, "SnapshotType"] - """The type of a snapshot. The default is NodePool. \"NodePool\"""" + """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and + \"ManagedCluster\".""" kubernetesVersion: str """The version of Kubernetes.""" nodeImageVersion: str @@ -4930,15 +7151,90 @@ class SnapshotProperties(TypedDict, total=False): osSku: Union[str, "OSSKU"] """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType - is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", - \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and - \"AzureContainerLinux\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", + \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", + \"WindowsAnnual\", \"Ubuntu2404\", \"AzureContainerLinux\", and \"Ubuntu2604\".""" vmSize: str """The size of the VM.""" enableFIPS: bool """Whether to use a FIPS-enabled OS.""" +class SoftEvictionGracePeriod(TypedDict, total=False): + """Grace periods for kubelet soft eviction thresholds. Each field is a Go-style duration string + (e.g. '1m30s') that specifies how long the corresponding soft eviction signal must be crossed + before pod eviction is triggered. A grace period only applies when the matching soft eviction + threshold is set. + + :ivar memoryAvailable: The grace period for the memoryAvailable soft eviction signal, expressed + as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', + 'm', and 'h'. Must be greater than or equal to '30s'. Default is '30s'. + :vartype memoryAvailable: str + :ivar nodeFsAvailable: The grace period for the nodeFsAvailable soft eviction signal, expressed + as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', + 'm', and 'h'. Must be greater than or equal to '30s'. Default is '2m'. + :vartype nodeFsAvailable: str + :ivar nodeFsInodesFree: The grace period for the nodeFsInodesFree soft eviction signal, + expressed as a Go-style duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', + 'ms', 's', 'm', and 'h'. Must be greater than or equal to '30s'. Default is '2m'. + :vartype nodeFsInodesFree: str + """ + + memoryAvailable: str + """The grace period for the memoryAvailable soft eviction signal, expressed as a Go-style duration + string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + greater than or equal to '30s'. Default is '30s'.""" + nodeFsAvailable: str + """The grace period for the nodeFsAvailable soft eviction signal, expressed as a Go-style duration + string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. Must be + greater than or equal to '30s'. Default is '2m'.""" + nodeFsInodesFree: str + """The grace period for the nodeFsInodesFree soft eviction signal, expressed as a Go-style + duration string (e.g. '30s', '1m30s'). Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + Must be greater than or equal to '30s'. Default is '2m'.""" + + +class SoftEvictionThreshold(TypedDict, total=False): + """Soft eviction thresholds for kubelet. These thresholds trigger graceful pod eviction when node + resources drop below the specified values for at least the corresponding grace period defined + in softEvictionGracePeriod. Supported formats are Ki, Mi, Gi, or percentages using %. + + :ivar memoryAvailable: The threshold for available memory below which soft pod eviction is + triggered. Accepts absolute values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute + minimum is 100Mi; percentage minimum is 2%. Default uses a capacity-based step ladder: 500Mi + for nodes with <=8GiB, 750Mi for 16GiB, and 1024Mi (1Gi) for >=32GiB. Must also be greater than + the effective hardEvictionThreshold.memoryAvailable. + :vartype memoryAvailable: str + :ivar nodeFsAvailable: The threshold for available node filesystem space below which soft pod + eviction is triggered. Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). + Default is '12%'. Must be greater than or equal to 10% and greater than the effective + hardEvictionThreshold.nodeFsAvailable. + :vartype nodeFsAvailable: str + :ivar nodeFsInodesFree: The threshold for available inodes on the node filesystem below which + soft pod eviction is triggered. Accepts absolute inode counts (e.g. '100000') or percentage + values (e.g. '5%'). Default is '7%'. Percentage values must be greater than or equal to 5% and + greater than the effective hardEvictionThreshold.nodeFsInodesFree. + :vartype nodeFsInodesFree: str + """ + + memoryAvailable: str + """The threshold for available memory below which soft pod eviction is triggered. Accepts absolute + values (e.g. '500Mi') or percentage values (e.g. '5%'). Absolute minimum is 100Mi; percentage + minimum is 2%. Default uses a capacity-based step ladder: 500Mi for nodes with <=8GiB, 750Mi + for 16GiB, and 1024Mi (1Gi) for >=32GiB. Must also be greater than the effective + hardEvictionThreshold.memoryAvailable.""" + nodeFsAvailable: str + """The threshold for available node filesystem space below which soft pod eviction is triggered. + Accepts absolute values (e.g. '1Gi') or percentage values (e.g. '10%'). Default is '12%'. Must + be greater than or equal to 10% and greater than the effective + hardEvictionThreshold.nodeFsAvailable.""" + nodeFsInodesFree: str + """The threshold for available inodes on the node filesystem below which soft pod eviction is + triggered. Accepts absolute inode counts (e.g. '100000') or percentage values (e.g. '5%'). + Default is '7%'. Percentage values must be greater than or equal to 5% and greater than the + effective hardEvictionThreshold.nodeFsInodesFree.""" + + class SysctlConfig(TypedDict, total=False): """Sysctl settings for Linux agent nodes. diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py index 171bf64086c1..c36913ca6598 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py @@ -78,6 +78,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AdvancedNetworkingTransitEncryption.json +# x-ms-original-file: 2026-06-02-preview/AdvancedNetworkingTransitEncryption.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py index 14d829ce8cc4..21f7b579247e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/AgentPoolsAbortOperation.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsAbortOperation.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py index 879dc3451d27..91fb3ff7b250 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python agent_pools_create_crg.py + python agent_pools_associate_crg.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_CRG.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsAssociate_CRG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py new file mode 100644 index 000000000000..f496e5bbbc9e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_complete_upgrade.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.agent_pools.begin_complete_upgrade( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCompleteUpgrade.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py index 4d04a7dd0db1..690f5f09dc80 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py @@ -42,9 +42,26 @@ def main(): "cpuCfsQuota": True, "cpuCfsQuotaPeriod": "200ms", "cpuManagerPolicy": "static", + "evictionMaxPodGracePeriodInSeconds": 60, "failSwapOn": False, + "hardEvictionThreshold": { + "memoryAvailable": "500Mi", + "nodeFsAvailable": "15%", + "nodeFsInodesFree": "10%", + }, "imageGcHighThreshold": 90, "imageGcLowThreshold": 70, + "kubeReserved": {"cpuMillicores": 200, "memoryMB": 1024}, + "softEvictionGracePeriod": { + "memoryAvailable": "1m30s", + "nodeFsAvailable": "2m", + "nodeFsInodesFree": "2m", + }, + "softEvictionThreshold": { + "memoryAvailable": "750Mi", + "nodeFsAvailable": "20%", + "nodeFsInodesFree": "15%", + }, "topologyManagerPolicy": "best-effort", }, "linuxOSConfig": { @@ -67,6 +84,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_CustomNodeConfig.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_CustomNodeConfig.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py index f0b10ff7ee34..72fb7aff9a19 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_DedicatedHostGroup.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_DedicatedHostGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py index d16b19fb90e6..8f99a14e474f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_EnableEncryptionAtHost.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_EnableEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py index 863f91e8df6d..34bdcf331da6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_EnableFIPS.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_EnableFIPS.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py index 5664f6087d6b..ee01d1d1ba84 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_EnableUltraSSD.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_EnableUltraSSD.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py index 0da4cdc093fa..d705c7a1851b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_Ephemeral.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_Ephemeral.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_flex_node.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_flex_node.py new file mode 100644 index 000000000000..45aac07c9c10 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_flex_node.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_create_flex_node.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agent_pools.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="flexnode1", + parameters={"properties": {"mode": "User", "orchestratorVersion": "1.32", "type": "FlexNodes"}}, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_FlexNode.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py index 2c5363fcad2f..65f59a7f7682 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_GPUMIG.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_GPUMIG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py index c13f1b15883e..276ba49e0712 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_MessageOfTheDay.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_MessageOfTheDay.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py index 8a49337298c7..cc68b9e12653 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_OSSKU.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_OSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_per_nic_public_ip.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_per_nic_public_ip.py new file mode 100644 index 000000000000..79120df07e1c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_per_nic_public_ip.py @@ -0,0 +1,74 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_create_per_nic_public_ip.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agent_pools.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + parameters={ + "properties": { + "count": 3, + "networkProfile": { + "secondaryNetworkInterfaces": [ + { + "enableAcceleratedNetworking": True, + "publicIPAddressConfiguration": { + "ipTags": [{"ipTagType": "FirstPartyUsage", "tag": "teams"}], + "publicIPAddressVersion": "IPv4", + }, + "type": "Standard", + "vnetSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/secondary-subnet-1", + }, + { + "enableAcceleratedNetworking": True, + "publicIPAddressConfiguration": { + "publicIPAddressVersion": "IPv4", + "publicIPPrefixID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/myPrefix", + }, + "type": "Standard", + "vnetSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/secondary-subnet-2", + }, + ] + }, + "orchestratorVersion": "", + "osType": "Linux", + "vmSize": "Standard_D8s_v3", + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_PerNICPublicIP.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py index d313d6321526..cca5a0e3e33c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_PPG.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_PPG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py index 7a265bbe417a..d86f1d82503f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_Snapshot.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_Snapshot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py index ae60a14f5a6f..3fa17a4b2088 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_Spot.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_Spot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py index b7a692692e75..29b8914b4b13 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_TypeVirtualMachines.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_TypeVirtualMachines.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py index b3c6b4b8b4d1..c020060db76c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py index 58397a734d7d..d91448c09eac 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_Update.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py index 7cc46d483dc9..b0c4fbfaf931 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_WasmWasi.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_WasmWasi.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py index cd328ee23697..5b49404087a4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_WindowsDisableOutboundNAT.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py index 97ffad73071c..50a123f86ad9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsCreate_WindowsOSSKU.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsCreate_WindowsOSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py index c7ef9f27da3f..e557ce8456a9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/AgentPoolsDelete.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py new file mode 100644 index 000000000000..79c59de8636e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_delete_ignore_pod_disruption_budget.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.agent_pools.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsDelete_IgnorePodDisruptionBudget.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py index 1593b4285187..58f6cc7d5c3d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/AgentPoolsDeleteMachines.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsDeleteMachines.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py index 3ae44436f09a..80c75208ed25 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsGet.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py index 267d94bd1d0b..503d79832b83 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsGetAgentPoolAvailableVersions.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsGetAgentPoolAvailableVersions.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py index d990080892f3..5383aa7222a1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPoolsGetUpgradeProfile.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsGetUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py index bf5bed8e8282..9436d735f1b6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/AgentPoolsList.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list_bootstrap_data.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list_bootstrap_data.py new file mode 100644 index 000000000000..8ba5ab1b9d8b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list_bootstrap_data.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_list_bootstrap_data.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agent_pools.list_bootstrap_data( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="flexnode1", + body={}, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsListBootstrapData.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py index a3a47cad3f1d..ed40c27fa06c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPools_Start.json +# x-ms-original-file: 2026-06-02-preview/AgentPools_Start.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py index 504bd4d7b0c7..7dc74f129209 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPools_Stop.json +# x-ms-original-file: 2026-06-02-preview/AgentPools_Stop.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py index 54e25bfd4f04..71837dddad02 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/AgentPools_Update.json +# x-ms-original-file: 2026-06-02-preview/AgentPools_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale.py new file mode 100644 index 000000000000..89d6f964bb23 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_update_scale.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agent_pools.begin_update( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + parameters={"properties": {"count": 5}}, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsUpdate_Scale.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale_vms.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale_vms.py new file mode 100644 index 000000000000..4331ae84893e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update_scale_vms.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python agent_pools_update_scale_vms.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.agent_pools.begin_update( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + parameters={ + "properties": { + "virtualMachinesProfile": { + "scale": { + "manual": [{"count": 5, "size": "Standard_D2_v2"}, {"count": 3, "size": "Standard_D2_v3"}] + } + } + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AgentPoolsUpdate_ScaleVMs.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py index 034e9f680443..3500e5bcc073 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/AgentPoolsUpgradeNodeImageVersion.json +# x-ms-original-file: 2026-06-02-preview/AgentPoolsUpgradeNodeImageVersion.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_create_or_update.py new file mode 100644 index 000000000000..3a0d36ee50b3 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_create_or_update.py @@ -0,0 +1,52 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python alert_configurations_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.alert_configurations.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + configuration_name="alertconfig1", + resource={ + "properties": { + "mode": "Managed", + "notification": { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/actiongroup1" + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AlertConfigurations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_delete.py new file mode 100644 index 000000000000..abbb8d44329c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python alert_configurations_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.alert_configurations.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + configuration_name="alertconfig1", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/AlertConfigurations_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_get.py new file mode 100644 index 000000000000..739a93e054bc --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python alert_configurations_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.alert_configurations.get( + resource_group_name="rg1", + resource_name="clustername1", + configuration_name="alertconfig1", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/AlertConfigurations_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_list_by_managed_cluster.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_list_by_managed_cluster.py new file mode 100644 index 000000000000..9f5e99f64fab --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/alert_configurations_list_by_managed_cluster.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python alert_configurations_list_by_managed_cluster.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.alert_configurations.list_by_managed_cluster( + resource_group_name="rg1", + resource_name="clustername1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/AlertConfigurations_ListByManagedCluster.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py new file mode 100644 index 000000000000..4c3c54161756 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python get_guardrails_versions.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.get_guardrails_versions( + location="location1", + version="v1.0.0", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/GetGuardrailsVersions.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py new file mode 100644 index 000000000000..e82590a5ab85 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python get_safeguards_versions.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.get_safeguards_versions( + location="location1", + version="v1.0.0", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/GetSafeguardsVersions.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py index 84fedce64cc1..a3724705227a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/IdentityBindings_Create_Or_Update.json +# x-ms-original-file: 2026-06-02-preview/IdentityBindings_Create_Or_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update_with_allowed_subjects.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update_with_allowed_subjects.py new file mode 100644 index 000000000000..d7f9730fb95d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update_with_allowed_subjects.py @@ -0,0 +1,62 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python identity_bindings_create_or_update_with_allowed_subjects.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.identity_bindings.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + identity_binding_name="identitybinding1", + parameters={ + "properties": { + "allowedSubjects": [ + {"namespaceSelector": {"matchLabels": ["kubernetes.io/metadata.name=team-a"]}}, + { + "namespaceSelector": { + "matchExpressions": [ + {"key": "kubernetes.io/metadata.name", "operator": "In", "values": ["team-a", "team-b"]} + ] + }, + "serviceAccountSelector": {"matchLabels": ["app=my-workload"]}, + }, + ], + "managedIdentity": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/IdentityBindings_Create_Or_UpdateWithAllowedSubjects.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py index e0b6274df0a5..b793a3e3b6ff 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/IdentityBindings_Delete.json +# x-ms-original-file: 2026-06-02-preview/IdentityBindings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py index bc87e0d592bb..113ff50cc29b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/IdentityBindings_Get.json +# x-ms-original-file: 2026-06-02-preview/IdentityBindings_Get.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py index 402d61d9c6cd..c1a89007b89d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/IdentityBindings_List.json +# x-ms-original-file: 2026-06-02-preview/IdentityBindings_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py new file mode 100644 index 000000000000..aa5f410bf4f1 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python jwt_authenticators_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.jwt_authenticators.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + jwt_authenticator_name="jwt1", + parameters={ + "properties": { + "claimMappings": { + "extra": [{"key": "example.com/extrakey", "valueExpression": "claims.customfield"}], + "groups": {"expression": "claims.groups.split(',').map(group, 'aks:jwt:' + group)"}, + "username": {"expression": "'aks:jwt:' + claims.sub"}, + }, + "claimValidationRules": [ + {"expression": "has(claims.sub)", "message": "Sub is required"}, + {"expression": "claims.sub != ''", "message": "Sub cannot be empty"}, + ], + "issuer": { + "audiences": ["https://example.com/audience1", "https://example.com/audience2"], + "url": "https://example.com", + }, + "userValidationRules": [ + { + "expression": "user.groups.all(group, group.startsWith('aks:jwt:admin:'))", + "message": "Must be in admin user group", + } + ], + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/JWTAuthenticators_Create_Or_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update_custom_ca_bundle.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update_custom_ca_bundle.py new file mode 100644 index 000000000000..670af0e5b581 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update_custom_ca_bundle.py @@ -0,0 +1,68 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python jwt_authenticators_create_or_update_custom_ca_bundle.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.jwt_authenticators.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + jwt_authenticator_name="jwt1", + parameters={ + "properties": { + "certificateAuthorityBundle": "-----BEGIN CERTIFICATE-----\nMII...rest of the certificate1...\n-----END CERTIFICATE-----", + "claimMappings": { + "extra": [{"key": "example.com/extrakey", "valueExpression": "claims.customfield"}], + "groups": {"expression": "claims.groups.split(',').map(group, 'aks:jwt:' + group)"}, + "username": {"expression": "'aks:jwt:' + claims.sub"}, + }, + "claimValidationRules": [ + {"expression": "has(claims.sub)", "message": "Sub is required"}, + {"expression": "claims.sub != ''", "message": "Sub cannot be empty"}, + ], + "issuer": { + "audiences": ["https://example.com/audience1", "https://example.com/audience2"], + "url": "https://example.com", + }, + "userValidationRules": [ + { + "expression": "user.groups.all(group, group.startsWith('aks:jwt:admin:'))", + "message": "Must be in admin user group", + } + ], + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/JWTAuthenticators_Create_Or_Update_CustomCABundle.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py new file mode 100644 index 000000000000..5d1d1f86e52e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python jwt_authenticators_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.jwt_authenticators.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + jwt_authenticator_name="jwt1", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/JWTAuthenticators_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py new file mode 100644 index 000000000000..1a9974904e80 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python jwt_authenticators_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.jwt_authenticators.get( + resource_group_name="rg1", + resource_name="clustername1", + jwt_authenticator_name="jwt1", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/JWTAuthenticators_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py new file mode 100644 index 000000000000..7bec3ffc98cf --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python jwt_authenticators_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.jwt_authenticators.list_by_managed_cluster( + resource_group_name="rg1", + resource_name="clustername1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/JWTAuthenticators_List.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py index 5403d04afac7..ed6c5d48e563 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/KubernetesVersions_List.json +# x-ms-original-file: 2026-06-02-preview/KubernetesVersions_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py new file mode 100644 index 000000000000..baaffc730a6b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python list_available_container_service_vm_skus.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.vm_skus.list( + location="westus", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ListAvailableContainerServiceVmSkus.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py new file mode 100644 index 000000000000..15d8be141c0a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python list_available_container_service_vm_skus_with_extended_locations.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.vm_skus.list( + location="westus", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ListAvailableContainerServiceVmSkusWithExtendedLocations.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py new file mode 100644 index 000000000000..0d855dc26f06 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python list_guardrails_versions.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.list_guardrails_versions( + location="location1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ListGuardrailsVersions.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py new file mode 100644 index 000000000000..48a329eab10f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python list_safeguards_versions.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.list_safeguards_versions( + location="location1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ListSafeguardsVersions.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py new file mode 100644 index 000000000000..e7f3bd7e4e5b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python load_balancers_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.load_balancers.create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + load_balancer_name="kubernetes", + parameters={"properties": {"allowServicePlacement": True, "primaryAgentPoolName": "agentpool1"}}, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/LoadBalancers_Create_Or_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py new file mode 100644 index 000000000000..854b54bf50b8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python load_balancers_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.load_balancers.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + load_balancer_name="kubernetes", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/LoadBalancers_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py new file mode 100644 index 000000000000..2a258d2ef14b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python load_balancers_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.load_balancers.get( + resource_group_name="rg1", + resource_name="clustername1", + load_balancer_name="kubernetes", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/LoadBalancers_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py new file mode 100644 index 000000000000..1ecb40e32373 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python load_balancers_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.load_balancers.list_by_managed_cluster( + resource_group_name="rg1", + resource_name="clustername1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/LoadBalancers_List.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py new file mode 100644 index 000000000000..b0159c56b138 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python load_balancers_rebalance.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.managed_clusters.begin_rebalance_load_balancers( + resource_group_name="rg1", + resource_name="clustername1", + parameters={"loadBalancerNames": ["kubernetes"]}, + ).result() + + +# x-ms-original-file: 2026-06-02-preview/LoadBalancers_Rebalance.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py new file mode 100644 index 000000000000..fb7d5dbb1b00 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python machine_create_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.machines.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + machine_name="machine1", + parameters={ + "properties": { + "hardware": {"vmSize": "Standard_DS1_v2"}, + "kubernetes": { + "kubeletDiskType": "OS", + "maxPods": 110, + "nodeLabels": {"key1": "val1"}, + "nodeTaints": ["Key1=Value1:NoSchedule"], + "orchestratorVersion": "1.30", + }, + "mode": "User", + "operatingSystem": {"enableFIPS": False, "osSKU": "Ubuntu", "osType": "Linux"}, + "priority": "Spot", + "tags": {"name1": "val1"}, + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MachineCreate_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py index 844c89307ccb..6c30059655c7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/MachineGet.json +# x-ms-original-file: 2026-06-02-preview/MachineGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py index 64abdfe26dbb..331ad76b0d17 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/MachineList.json +# x-ms-original-file: 2026-06-02-preview/MachineList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_linked_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_linked_maintenance_window.py new file mode 100644 index 000000000000..5b058b00a6f5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_linked_maintenance_window.py @@ -0,0 +1,49 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_configurations_create_linked_maintenance_window.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_configurations.create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + config_name="aksManagedAutoUpgradeSchedule", + parameters={ + "properties": { + "maintenanceWindowId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/maintenanceWindows/myMaintenanceWindow" + } + }, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsCreate_LinkedMaintenanceWindow.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py index d01d57135697..cf4e6df536b0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py index b40e82c06f9a..aeb44a404aa2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py @@ -37,6 +37,6 @@ def main(): ) -# x-ms-original-file: 2026-06-01/MaintenanceConfigurationsDelete_MaintenanceWindow.json +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsDelete_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_linked_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_linked_maintenance_window.py new file mode 100644 index 000000000000..d7bfb610adb4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_linked_maintenance_window.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_configurations_get_linked_maintenance_window.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_configurations.get( + resource_group_name="rg1", + resource_name="clustername1", + config_name="aksManagedAutoUpgradeSchedule", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsGet_LinkedMaintenanceWindow.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py index 1c12a0d2d058..936cf3277037 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/MaintenanceConfigurationsGet_MaintenanceWindow.json +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsGet_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py index 4dda3a270fdf..3c0c434efa94 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/MaintenanceConfigurationsList_MaintenanceWindow.json +# x-ms-original-file: 2026-06-02-preview/MaintenanceConfigurationsList_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_create_or_update.py new file mode 100644 index 000000000000..4be6dc79ac1f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_create_or_update.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_windows.begin_create_or_update( + resource_group_name="rg-maintenance", + maintenance_window_name="production-weekends", + resource={ + "location": "eastus", + "properties": { + "durationHours": 8, + "notAllowedDates": [{"end": "2027-01-03", "start": "2026-12-23"}], + "schedule": {"weekly": {"dayOfWeek": "Saturday", "intervalWeeks": 1}}, + "startDate": "2026-04-05", + "startTime": "02:00", + "utcOffset": "-07:00", + }, + "tags": {"environment": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsCreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_delete.py new file mode 100644 index 000000000000..4b54e20b2211 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_delete.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.maintenance_windows.begin_delete( + resource_group_name="rg-maintenance", + maintenance_window_name="production-weekends", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_get.py new file mode 100644 index 000000000000..b1719259b465 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_windows.get( + resource_group_name="rg-maintenance", + maintenance_window_name="production-weekends", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsGet.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list.py new file mode 100644 index 000000000000..b095517048e8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_windows.list( + resource_group_name="rg-maintenance", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsList.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list_by_subscription.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list_by_subscription.py new file mode 100644 index 000000000000..4ded823f6f21 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_list_by_subscription.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_list_by_subscription.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_windows.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsListBySubscription.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_update_tags.py new file mode 100644 index 000000000000..be3bac922e82 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_windows_update_tags.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python maintenance_windows_update_tags.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.maintenance_windows.update_tags( + resource_group_name="rg-maintenance", + maintenance_window_name="production-weekends", + properties={"tags": {"environment": "production", "team": "aks-platform"}}, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MaintenanceWindowsUpdateTags.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py new file mode 100644 index 000000000000..db717e88946e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py @@ -0,0 +1,52 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_create.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_cluster_snapshots.create_or_update( + resource_group_name="rg1", + resource_name="snapshot1", + parameters={ + "location": "westus", + "properties": { + "creationData": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1" + } + }, + "tags": {"key1": "val1", "key2": "val2"}, + }, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsCreate.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py new file mode 100644 index 000000000000..bcb7cf0393f7 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.managed_cluster_snapshots.delete( + resource_group_name="rg1", + resource_name="snapshot1", + ) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py new file mode 100644 index 000000000000..af0570eef7e2 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_cluster_snapshots.get( + resource_group_name="rg1", + resource_name="snapshot1", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsGet.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py new file mode 100644 index 000000000000..ea4b3fc9567a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_cluster_snapshots.list() + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsList.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py new file mode 100644 index 000000000000..f22faba08a63 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_list_by_resource_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_cluster_snapshots.list_by_resource_group( + resource_group_name="rg1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsListByResourceGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py new file mode 100644 index 000000000000..1bc6ce606ca1 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_cluster_snapshots_update_tags.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_cluster_snapshots.update_tags( + resource_group_name="rg1", + resource_name="snapshot1", + parameters={"tags": {"key2": "new-val2", "key3": "val3"}}, + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClusterSnapshotsUpdateTags.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py index 806f92b107b3..c353f2c394b6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersAbortOperation.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersAbortOperation.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py index 2ea518b2325a..8238b6ed431e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python managed_clusters_create_crg.py + python managed_clusters_associate_crg.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_CRG.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersAssociate_CRG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py index 275165dca9a7..2f56e3dbd335 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py @@ -75,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py index 947d2622e992..a71b307e3e9b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py @@ -77,13 +77,7 @@ def main(): } }, "components": { - "egressGateways": [ - { - "enabled": True, - "gatewayConfigurationName": "test-gateway-configuration", - "name": "test-istio-egress", - } - ], + "egressGateways": [{"enabled": True, "name": "istioegress1"}], "ingressGateways": [{"enabled": True, "mode": "Internal"}], }, }, @@ -99,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_AzureServiceMesh.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_AzureServiceMesh.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py new file mode 100644 index 000000000000..58a9a4643858 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_control_plane_scaling_profile.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "agentPoolProfiles": [ + { + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "controlPlaneScalingProfile": {"scalingSize": "H4"}, + "dnsPrefix": "dnsprefix1", + "kubernetesVersion": "1.33.0", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "networkPlugin": "azure", + "networkPluginMode": "overlay", + "outboundType": "loadBalancer", + }, + }, + "sku": {"name": "Base", "tier": "Standard"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_ControlPlaneScalingProfile.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py index 978d1b63073d..2702d0984a5a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_CustomCATrustCertificates.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_CustomCATrustCertificates.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py index 57d2a7cbb1af..a852a072b087 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_DedicatedHostGroup.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_DedicatedHostGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py index 40f1beccf870..6c426ff26b99 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_DisableRunCommand.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_DisableRunCommand.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py index 2dcc69eeb381..6837a2ac871e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py @@ -87,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_DualStackNetworking.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_DualStackNetworking.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py new file mode 100644 index 000000000000..d29839076b0d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_enable_ai_toolchain_operator.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "addonProfiles": {}, + "agentPoolProfiles": [ + { + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "aiToolchainOperatorProfile": {"enabled": True}, + "dnsPrefix": "dnsprefix1", + "enableRBAC": True, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "networkDataplane": "cilium", + "networkPlugin": "azure", + "networkPluginMode": "overlay", + "outboundType": "loadBalancer", + }, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_EnableAIToolchainOperator.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py index 59dbc420e67a..6f68902c9198 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_EnableEncryptionAtHost.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_EnableEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_managed_bastion.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_managed_bastion.py new file mode 100644 index 000000000000..9d64b1c971d7 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_managed_bastion.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_enable_managed_bastion.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "addonProfiles": {}, + "agentPoolProfiles": [ + { + "count": 3, + "enableEncryptionAtHost": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "apiServerAccessProfile": {"enablePrivateCluster": True}, + "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, + "dnsPrefix": "dnsprefix1", + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": {"bastionProfile": {"enabled": True, "scaleUnits": 3, "sku": "Premium"}}, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_EnableManagedBastion.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py index fac4a5cbf3e1..1e191f4acd42 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_EnableUltraSSD.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_EnableUltraSSD.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py index a40f99112494..062cb3177c4a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_EnabledFIPS.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_EnabledFIPS.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py index 36e66f7d33fc..1be08f75212b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_GPUMIG.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_GPUMIG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py index c8ce96ece44c..6db9767a277a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_HTTPProxy.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_HTTPProxy.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py new file mode 100644 index 000000000000..28d912839489 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_ingress_profile_application_load_balancer.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "agentPoolProfiles": [ + { + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "dnsPrefix": "dnsprefix1", + "ingressProfile": {"applicationLoadBalancer": {"enabled": True}}, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + }, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_IngressProfile_ApplicationLoadBalancer.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py index 041fec85ad1b..b4ecc09e9044 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_IngressProfile_WebAppRouting.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_IngressProfile_WebAppRouting.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py index ca13b01b4b67..0850f022eaf3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_ManagedNATGateway.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_ManagedNATGateway.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py new file mode 100644 index 000000000000..210f0c24467d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py @@ -0,0 +1,69 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_mcsnapshot.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "agentPoolProfiles": [ + { + "count": 3, + "enableFIPS": True, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "creationData": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1" + }, + "dnsPrefix": "dnsprefix1", + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_MCSnapshot.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py new file mode 100644 index 000000000000..6cb9ca59b3f5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_node_auto_provisioning.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "addonProfiles": {}, + "agentPoolProfiles": [ + { + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_v2", + } + ], + "dnsPrefix": "dnsprefix1", + "enableRBAC": True, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "networkDataplane": "cilium", + "networkPlugin": "azure", + "networkPluginMode": "overlay", + "outboundType": "loadBalancer", + }, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_NodeAutoProvisioning.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py index 5e79d2d74813..1a8382d64260 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_NodePublicIPPrefix.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_NodePublicIPPrefix.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py index 04ff1bbc385d..ab0098779f4d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_OSSKU.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_OSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py index d36ed2271e72..a367eb4b43a0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_PodIdentity.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_PodIdentity.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py index 6f697f4b133f..3d1c863660db 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_PPG.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_PPG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py index 32605c14b4ae..97a8fac8e9c7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_Premium.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_Premium.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py index d7c0592333ba..db78847c2dc8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py index 884006419e6c..5a0878c7c7d3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_PrivateClusterPublicFQDN.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_PrivateClusterPublicFQDN.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py index 847b0646e9db..e0e8653cde4e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py @@ -59,9 +59,21 @@ def main(): "securityProfile": { "defender": { "logAnalyticsWorkspaceResourceId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", + "securityGating": { + "allowSecretAccess": True, + "enabled": True, + "identities": [ + { + "azureContainerRegistry": "registry1", + "identity": { + "clientId": "client1", + "resourceId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME", + }, + } + ], + }, "securityMonitoring": {"enabled": True}, - }, - "workloadIdentity": {"enabled": True}, + } }, }, "sku": {"name": "Basic", "tier": "Free"}, @@ -71,6 +83,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_SecurityProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_SecurityProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py index e35ad135b2ea..7b30dbf2e415 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_Snapshot.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_Snapshot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py index a3aa51ad30c5..e4cc0109a8d3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py @@ -77,7 +77,7 @@ def main(): "outboundType": "loadBalancer", }, "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "upgradeSettings": {"overrideSettings": {"forceUpgrade": False, "until": "2022-11-01T13:00:00Z"}}, + "upgradeSettings": {"overrideSettings": {"forceUpgrade": True, "until": "2022-11-01T13:00:00Z"}}, "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, }, "sku": {"name": "Basic", "tier": "Free"}, @@ -87,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_Update.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py index 07bd4e1e0c27..2108073ea912 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_UpdateWindowsGmsa.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_UpdateWindowsGmsa.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py index 7445f46f2ef7..48e418409417 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_UpdateWithAHUB.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_UpdateWithAHUB.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py index 35859f7b4bce..f6ad9d74e823 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py new file mode 100644 index 000000000000..3f1845ab2fe4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py @@ -0,0 +1,77 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_update_with_enable_namespace_resources.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "addonProfiles": {}, + "agentPoolProfiles": [ + { + "availabilityZones": ["1", "2", "3"], + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS1_v2", + } + ], + "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "dnsPrefix": "dnsprefix1", + "enableNamespaceResources": True, + "enableRBAC": True, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + }, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py index 01d77d4b258f..635e32b8d53d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersCreate_UserAssignedNATGateway.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_UserAssignedNATGateway.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py new file mode 100644 index 000000000000..21ceaa20948e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py @@ -0,0 +1,73 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python managed_clusters_create_virtual_machines.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.managed_clusters.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + parameters={ + "location": "location1", + "properties": { + "addonProfiles": {}, + "agentPoolProfiles": [ + { + "count": 3, + "enableFIPS": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachines", + "vmSize": "Standard_DS2_v2", + } + ], + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "dnsPrefix": "dnsprefix1", + "enableRBAC": True, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + }, + "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, + }, + "sku": {"name": "Basic", "tier": "Free"}, + "tags": {"archv2": "", "tier": "production"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/ManagedClustersCreate_VirtualMachines.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py index 5aa9303331dc..d4a4bc473196 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersDelete.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py index bc5ef2ea411e..d27ab3b050bc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersGet.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py index ba71ae31f268..90bce27f97a6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersGetAccessProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersGetAccessProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py index e62a8ef1ed37..f8a27add5659 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersGet_MeshRevisionProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersGet_MeshRevisionProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py index ff57a5e27153..101844f2e0c8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersGet_MeshUpgradeProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersGet_MeshUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py index 2e7dbdbe8167..a0e09c7764c0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersGetUpgradeProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersGetUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py index 09df1e63b836..48a7cd43be6d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/ManagedClustersList.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py index f1c34385cf8f..9c3e689e325c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/ManagedClustersListByResourceGroup.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py index faec63100538..873704872e70 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersListClusterAdminCredentials.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersListClusterAdminCredentials.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py similarity index 89% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py index 36238ff1b4ed..35abe36271d1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python managed_clusters_list_cluster_monitoring_user_credentials.py + python managed_clusters_list_cluster_credential_result.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersListClusterMonitoringUserCredentials.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersListClusterCredentialResult.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py index ad7b8df5cc69..600dae1f28cf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersListClusterUserCredentials.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersListClusterUserCredentials.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py index 4f679f8b63cd..478b0b54df88 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/ManagedClustersList_MeshRevisionProfiles.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersList_MeshRevisionProfiles.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py index 1ac8e9191a7a..390758bdda31 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/ManagedClustersList_MeshUpgradeProfiles.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersList_MeshUpgradeProfiles.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py index 503ca4694498..37c290e373da 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersResetAADProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersResetAADProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py index 86022a4f46f2..212b90e787ef 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersResetServicePrincipalProfile.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersResetServicePrincipalProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py index 08a2895fde2a..07b745a63f34 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersRotateClusterCertificates.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersRotateClusterCertificates.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py index c41eb853a157..35b11541275f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersRotateServiceAccountSigningKeys.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersRotateServiceAccountSigningKeys.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py index c942a0d5b3b1..689971e5140d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersStart.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersStart.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py index 3ff7f6cf8986..5e81e92f30e1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedClustersStop.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersStop.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py index e987d5516d1f..f913ab58846c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedClustersUpdateTags.json +# x-ms-original-file: 2026-06-02-preview/ManagedClustersUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py index c2b276c2d618..68b151c7289b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedNamespacesCreate_Update.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py index 03b494cfd627..98d003d3bcb3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/ManagedNamespacesDelete.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py index 725ede5afd8c..3d5360a4ecc2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedNamespacesGet.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py index 758bdeac0b79..26d5ed59ead8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/ManagedNamespacesList.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py index 69a3e410b0a5..bfefab261bc7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedNamespacesListCredentialResult.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesListCredentialResult.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py index 839805ac7772..27c08993b04b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ManagedNamespacesUpdateTags.json +# x-ms-original-file: 2026-06-02-preview/ManagedNamespacesUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py new file mode 100644 index 000000000000..a96bec2b648f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py @@ -0,0 +1,49 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python mesh_memberships_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.mesh_memberships.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + mesh_membership_name="meshmembership1", + parameters={ + "properties": { + "managedMeshID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1" + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MeshMemberships_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py new file mode 100644 index 000000000000..c14997bf5ec3 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python mesh_memberships_delete.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.mesh_memberships.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + mesh_membership_name="meshmembership1", + ).result() + + +# x-ms-original-file: 2026-06-02-preview/MeshMemberships_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py new file mode 100644 index 000000000000..bf8bfb08157a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python mesh_memberships_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.mesh_memberships.get( + resource_group_name="rg1", + resource_name="clustername1", + mesh_membership_name="meshmembership1", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/MeshMemberships_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py new file mode 100644 index 000000000000..c386cca16457 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python mesh_memberships_list_by_managed_cluster.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.mesh_memberships.list_by_managed_cluster( + resource_group_name="rg1", + resource_name="clustername1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/MeshMemberships_ListByManagedCluster.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py new file mode 100644 index 000000000000..b2580bf40de3 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python node_image_versions_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.container_service.list_node_image_versions( + location="location1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/NodeImageVersions_List.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py index 9c46ba3ba356..d2a402ce2597 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/Operation_List.json +# x-ms-original-file: 2026-06-02-preview/Operation_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py new file mode 100644 index 000000000000..930645866551 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python operation_status_result_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operation_status_result.get( + resource_group_name="rg1", + resource_name="clustername1", + operation_id="00000000-0000-0000-0000-000000000001", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/OperationStatusResultGet.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py new file mode 100644 index 000000000000..43bb7b19583a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python operation_status_result_get_by_agent_pool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operation_status_result.get_by_agent_pool( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + operation_id="00000000-0000-0000-0000-000000000001", + ) + print(response) + + +# x-ms-original-file: 2026-06-02-preview/OperationStatusResultGetByAgentPool.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py new file mode 100644 index 000000000000..c2e7398ec9a6 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python operation_status_result_list.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operation_status_result.list( + resource_group_name="rg1", + resource_name="clustername1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/OperationStatusResultList.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool.py new file mode 100644 index 000000000000..6fdf22c3f06c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python operation_status_result_list_by_agent_pool.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operation_status_result.list_by_agent_pool( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/OperationStatusResultListByAgentPool.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool_active.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool_active.py new file mode 100644 index 000000000000..2cc9b24cd34f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list_by_agent_pool_active.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.containerservice import ContainerServiceClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-containerservice +# USAGE + python operation_status_result_list_by_agent_pool_active.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ContainerServiceClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operation_status_result.list_by_agent_pool( + resource_group_name="rg1", + resource_name="clustername1", + agent_pool_name="agentpool1", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-06-02-preview/OperationStatusResultListByAgentPool_Active.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py index 3c0c61f48754..d6f59dc76213 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/OutboundNetworkDependenciesEndpointsList.json +# x-ms-original-file: 2026-06-02-preview/OutboundNetworkDependenciesEndpointsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py index 6070346b488d..d9eeeaf3ee9c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/PrivateEndpointConnectionsDelete.json +# x-ms-original-file: 2026-06-02-preview/PrivateEndpointConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py index bc682e6e53de..ebaa8de87532 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/PrivateEndpointConnectionsGet.json +# x-ms-original-file: 2026-06-02-preview/PrivateEndpointConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py index 3a6227d03a8c..2c57e54307af 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/PrivateEndpointConnectionsList.json +# x-ms-original-file: 2026-06-02-preview/PrivateEndpointConnectionsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py index 4089eff571fb..2ce6ca2b617a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/PrivateEndpointConnectionsUpdate.json +# x-ms-original-file: 2026-06-02-preview/PrivateEndpointConnectionsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py index 3000ca42f822..3241fb25afed 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/PrivateLinkResourcesList.json +# x-ms-original-file: 2026-06-02-preview/PrivateLinkResourcesList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py index 8768aa88006f..59ee256c608d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/ResolvePrivateLinkServiceId.json +# x-ms-original-file: 2026-06-02-preview/ResolvePrivateLinkServiceId.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py index 49e73bd22de5..d72bbd57151d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/RunCommandRequest.json +# x-ms-original-file: 2026-06-02-preview/RunCommandRequest.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py index 6a22653cc858..de317b927f13 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/RunCommandResultFailed.json +# x-ms-original-file: 2026-06-02-preview/RunCommandResultFailed.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py index 0f9273f29927..4dd62f24bfec 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/RunCommandResultSucceed.json +# x-ms-original-file: 2026-06-02-preview/RunCommandResultSucceed.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py index 55d200839fc1..f1e725faff44 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/SnapshotsCreate.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsCreate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py index b0b38de35bed..e16ffd3d62c8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: 2026-06-01/SnapshotsDelete.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py index 172ed8d5ce68..3eab56f9b89b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/SnapshotsGet.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py index 66f18675902a..893fcc55e488 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/SnapshotsList.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py index eee58bcff714..2f7aa0c79b0a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/SnapshotsListByResourceGroup.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py index c58bac8a3167..64b4e97b3605 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/SnapshotsUpdateTags.json +# x-ms-original-file: 2026-06-02-preview/SnapshotsUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py index 99c68db08bbf..43b394069723 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/TrustedAccessRoleBindings_CreateOrUpdate.json +# x-ms-original-file: 2026-06-02-preview/TrustedAccessRoleBindings_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py index 08895cdc44ed..72bd9b1bcb3e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-06-01/TrustedAccessRoleBindings_Delete.json +# x-ms-original-file: 2026-06-02-preview/TrustedAccessRoleBindings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py index 6b3f50fb4f51..9c7a5a8f1d34 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-06-01/TrustedAccessRoleBindings_Get.json +# x-ms-original-file: 2026-06-02-preview/TrustedAccessRoleBindings_Get.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py index fd531d11b5a2..9974b2d64b8d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/TrustedAccessRoleBindings_List.json +# x-ms-original-file: 2026-06-02-preview/TrustedAccessRoleBindings_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py index 56b6791082b7..83cc6060d98e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-06-01/TrustedAccessRoles_List.json +# x-ms-original-file: 2026-06-02-preview/TrustedAccessRoles_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py index dd231e55f851..86bf31f90422 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py @@ -52,10 +52,15 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, + "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -64,10 +69,28 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "cpuCfsQuota": bool, "cpuCfsQuotaPeriod": "str", "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -143,9 +166,23 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "allowedHostPorts": [{"portEnd": 0, "portStart": 0, "protocol": "str"}], "applicationSecurityGroups": ["str"], "dranet": {"mode": "str"}, + "nodePublicIPPrefixIDs": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "secondaryNetworkInterfaces": [ + { + "enableAcceleratedNetworking": bool, + "publicIPAddressConfiguration": { + "publicIPAddressVersion": "str", + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPPrefixID": "str", + }, + "type": "str", + "vnetSubnetId": "str", + } + ], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -157,6 +194,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, + "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -177,11 +215,19 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, + "upgradeSettingsBlueGreen": { + "batchSoakDurationInMinutes": 0, + "drainBatchSize": "str", + "drainTimeoutInMinutes": 0, + "finalSoakDurationInMinutes": 0, + }, + "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], "virtualMachinesProfile": { "scale": { @@ -244,6 +290,18 @@ def test_agent_pools_begin_abort_latest_operation(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_agent_pools_begin_complete_upgrade(self, resource_group): + response = self.client.agent_pools.begin_complete_upgrade( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_agent_pools_begin_delete_machines(self, resource_group): @@ -269,6 +327,37 @@ def test_agent_pools_begin_upgrade_node_image_version(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_agent_pools_list_bootstrap_data(self, resource_group): + response = self.client.agent_pools.list_bootstrap_data( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + body={}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_agent_pools_begin_update(self, resource_group): + response = self.client.agent_pools.begin_update( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + parameters={ + "properties": { + "count": 0, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, + } + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_agent_pools_get_available_agent_pool_versions(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py index b2d1521dcc76..532d24bcb951 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py @@ -54,10 +54,15 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, + "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -66,10 +71,28 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "cpuCfsQuota": bool, "cpuCfsQuotaPeriod": "str", "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -145,9 +168,23 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "allowedHostPorts": [{"portEnd": 0, "portStart": 0, "protocol": "str"}], "applicationSecurityGroups": ["str"], "dranet": {"mode": "str"}, + "nodePublicIPPrefixIDs": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "secondaryNetworkInterfaces": [ + { + "enableAcceleratedNetworking": bool, + "publicIPAddressConfiguration": { + "publicIPAddressVersion": "str", + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPPrefixID": "str", + }, + "type": "str", + "vnetSubnetId": "str", + } + ], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -159,6 +196,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, + "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -179,11 +217,19 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, + "upgradeSettingsBlueGreen": { + "batchSoakDurationInMinutes": 0, + "drainBatchSize": "str", + "drainTimeoutInMinutes": 0, + "finalSoakDurationInMinutes": 0, + }, + "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], "virtualMachinesProfile": { "scale": { @@ -251,6 +297,20 @@ async def test_agent_pools_begin_abort_latest_operation(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_agent_pools_begin_complete_upgrade(self, resource_group): + response = await ( + await self.client.agent_pools.begin_complete_upgrade( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_agent_pools_begin_delete_machines(self, resource_group): @@ -280,6 +340,39 @@ async def test_agent_pools_begin_upgrade_node_image_version(self, resource_group # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_agent_pools_list_bootstrap_data(self, resource_group): + response = await self.client.agent_pools.list_bootstrap_data( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + body={}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_agent_pools_begin_update(self, resource_group): + response = await ( + await self.client.agent_pools.begin_update( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + parameters={ + "properties": { + "count": 0, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, + } + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_agent_pools_get_available_agent_pool_versions(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations.py new file mode 100644 index 000000000000..cb1124c7dafb --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceAlertConfigurationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alert_configurations_get(self, resource_group): + response = self.client.alert_configurations.get( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alert_configurations_begin_create_or_update(self, resource_group): + response = self.client.alert_configurations.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"mode": "str", "notification": {"actionGroupId": "str"}, "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alert_configurations_begin_delete(self, resource_group): + response = self.client.alert_configurations.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_alert_configurations_list_by_managed_cluster(self, resource_group): + response = self.client.alert_configurations.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations_async.py new file mode 100644 index 000000000000..3315736c2d63 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_alert_configurations_operations_async.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceAlertConfigurationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alert_configurations_get(self, resource_group): + response = await self.client.alert_configurations.get( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alert_configurations_begin_create_or_update(self, resource_group): + response = await ( + await self.client.alert_configurations.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"mode": "str", "notification": {"actionGroupId": "str"}, "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alert_configurations_begin_delete(self, resource_group): + response = await ( + await self.client.alert_configurations.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + configuration_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_alert_configurations_list_by_managed_cluster(self, resource_group): + response = self.client.alert_configurations.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py new file mode 100644 index 000000000000..3f92bd83cc82 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceContainerServiceOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_container_service_list_node_image_versions(self, resource_group): + response = self.client.container_service.list_node_image_versions( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py new file mode 100644 index 000000000000..69d36ecabe6d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py @@ -0,0 +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. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceContainerServiceOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_container_service_list_node_image_versions(self, resource_group): + response = self.client.container_service.list_node_image_versions( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py index 2464229a3578..cb722dc0019e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py @@ -43,6 +43,18 @@ def test_identity_bindings_begin_create_or_update(self, resource_group): "name": "str", "properties": { "managedIdentity": {"resourceId": "str", "clientId": "str", "objectId": "str", "tenantId": "str"}, + "allowedSubjects": [ + { + "namespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceAccountSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + } + ], "oidcIssuer": {"oidcIssuerUrl": "str"}, "provisioningState": "str", }, diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py index 79a1b1bf1a08..de88913d834b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py @@ -50,6 +50,18 @@ async def test_identity_bindings_begin_create_or_update(self, resource_group): "objectId": "str", "tenantId": "str", }, + "allowedSubjects": [ + { + "namespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceAccountSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + } + ], "oidcIssuer": {"oidcIssuerUrl": "str"}, "provisioningState": "str", }, diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py new file mode 100644 index 000000000000..5c0e470d3556 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceJWTAuthenticatorsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_jwt_authenticators_get(self, resource_group): + response = self.client.jwt_authenticators.get( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_jwt_authenticators_begin_create_or_update(self, resource_group): + response = self.client.jwt_authenticators.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + parameters={ + "properties": { + "claimMappings": { + "username": {"expression": "str"}, + "extra": [{"key": "str", "valueExpression": "str"}], + "groups": {"expression": "str"}, + "uid": {"expression": "str"}, + }, + "issuer": {"audiences": ["str"], "url": "str"}, + "certificateAuthorityBundle": "str", + "claimValidationRules": [{"expression": "str", "message": "str"}], + "provisioningState": "str", + "userValidationRules": [{"expression": "str", "message": "str"}], + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_jwt_authenticators_begin_delete(self, resource_group): + response = self.client.jwt_authenticators.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_jwt_authenticators_list_by_managed_cluster(self, resource_group): + response = self.client.jwt_authenticators.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py new file mode 100644 index 000000000000..202003074dde --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceJWTAuthenticatorsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_jwt_authenticators_get(self, resource_group): + response = await self.client.jwt_authenticators.get( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_jwt_authenticators_begin_create_or_update(self, resource_group): + response = await ( + await self.client.jwt_authenticators.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + parameters={ + "properties": { + "claimMappings": { + "username": {"expression": "str"}, + "extra": [{"key": "str", "valueExpression": "str"}], + "groups": {"expression": "str"}, + "uid": {"expression": "str"}, + }, + "issuer": {"audiences": ["str"], "url": "str"}, + "certificateAuthorityBundle": "str", + "claimValidationRules": [{"expression": "str", "message": "str"}], + "provisioningState": "str", + "userValidationRules": [{"expression": "str", "message": "str"}], + }, + "id": "str", + "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_jwt_authenticators_begin_delete(self, resource_group): + response = await ( + await self.client.jwt_authenticators.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + jwt_authenticator_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_jwt_authenticators_list_by_managed_cluster(self, resource_group): + response = self.client.jwt_authenticators.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py new file mode 100644 index 000000000000..6beca80132b4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceLoadBalancersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_load_balancers_get(self, resource_group): + response = self.client.load_balancers.get( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_load_balancers_create_or_update(self, resource_group): + response = self.client.load_balancers.create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + parameters={ + "id": "str", + "name": "str", + "properties": { + "primaryAgentPoolName": "str", + "allowServicePlacement": bool, + "nodeSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "provisioningState": "str", + "serviceLabelSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceNamespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_load_balancers_begin_delete(self, resource_group): + response = self.client.load_balancers.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_load_balancers_list_by_managed_cluster(self, resource_group): + response = self.client.load_balancers.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py new file mode 100644 index 000000000000..83971f7d7920 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceLoadBalancersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_load_balancers_get(self, resource_group): + response = await self.client.load_balancers.get( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_load_balancers_create_or_update(self, resource_group): + response = await self.client.load_balancers.create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + parameters={ + "id": "str", + "name": "str", + "properties": { + "primaryAgentPoolName": "str", + "allowServicePlacement": bool, + "nodeSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "provisioningState": "str", + "serviceLabelSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceNamespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_load_balancers_begin_delete(self, resource_group): + response = await ( + await self.client.load_balancers.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + load_balancer_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_load_balancers_list_by_managed_cluster(self, resource_group): + response = self.client.load_balancers.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py index be1358fed58c..b8e4103fb870 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py @@ -31,6 +31,199 @@ def test_machines_get(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_machines_begin_create_or_update(self, resource_group): + response = self.client.machines.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + machine_name="str", + parameters={ + "id": "str", + "name": "str", + "properties": { + "billing": {"spotMaxPrice": 0.0}, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "eTag": "str", + "evictionPolicy": "str", + "hardware": { + "gpuInstanceProfile": "str", + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, + "ultraSsdEnabled": bool, + "vmSize": "str", + }, + "kubernetes": { + "artifactStreamingProfile": {"enabled": bool}, + "currentOrchestratorVersion": "str", + "kubeletConfig": { + "allowedUnsafeSysctls": ["str"], + "containerLogMaxFiles": 0, + "containerLogMaxSizeMB": 0, + "cpuCfsQuota": bool, + "cpuCfsQuotaPeriod": "str", + "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, + "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "imageGcHighThreshold": 0, + "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, + "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "topologyManagerPolicy": "str", + }, + "kubeletDiskType": "str", + "maxPods": 0, + "nodeInitializationTaints": ["str"], + "nodeLabels": {"str": "str"}, + "nodeName": "str", + "nodeTaints": ["str"], + "orchestratorVersion": "str", + "workloadRuntime": "str", + }, + "localDNSProfile": { + "kubeDNSOverrides": { + "str": { + "cacheDurationInSeconds": 0, + "forwardDestination": "str", + "forwardPolicy": "str", + "maxConcurrent": 0, + "protocol": "str", + "queryLogging": "str", + "serveStale": "str", + "serveStaleDurationInSeconds": 0, + } + }, + "mode": "str", + "state": "str", + "vnetDNSOverrides": { + "str": { + "cacheDurationInSeconds": 0, + "forwardDestination": "str", + "forwardPolicy": "str", + "maxConcurrent": 0, + "protocol": "str", + "queryLogging": "str", + "serveStale": "str", + "serveStaleDurationInSeconds": 0, + } + }, + }, + "mode": "str", + "network": { + "enableNodePublicIP": bool, + "ipAddresses": [{"family": "str", "ip": "str"}], + "nodePublicIPPrefixID": "str", + "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "podSubnetID": "str", + "vnetSubnetID": "str", + }, + "nodeImageVersion": "str", + "operatingSystem": { + "enableFIPS": bool, + "linuxProfile": { + "linuxOSConfig": { + "swapFileSizeMB": 0, + "sysctls": { + "fsAioMaxNr": 0, + "fsFileMax": 0, + "fsInotifyMaxUserWatches": 0, + "fsNrOpen": 0, + "kernelThreadsMax": 0, + "netCoreNetdevMaxBacklog": 0, + "netCoreOptmemMax": 0, + "netCoreRmemDefault": 0, + "netCoreRmemMax": 0, + "netCoreSomaxconn": 0, + "netCoreWmemDefault": 0, + "netCoreWmemMax": 0, + "netIpv4IpLocalPortRange": "str", + "netIpv4NeighDefaultGcThresh1": 0, + "netIpv4NeighDefaultGcThresh2": 0, + "netIpv4NeighDefaultGcThresh3": 0, + "netIpv4TcpFinTimeout": 0, + "netIpv4TcpKeepaliveProbes": 0, + "netIpv4TcpKeepaliveTime": 0, + "netIpv4TcpMaxSynBacklog": 0, + "netIpv4TcpMaxTwBuckets": 0, + "netIpv4TcpTwReuse": bool, + "netIpv4TcpkeepaliveIntvl": 0, + "netNetfilterNfConntrackBuckets": 0, + "netNetfilterNfConntrackMax": 0, + "vmMaxMapCount": 0, + "vmSwappiness": 0, + "vmVfsCachePressure": 0, + }, + "transparentHugePageDefrag": "str", + "transparentHugePageEnabled": "str", + }, + "messageOfTheDay": "str", + }, + "osDiskSizeGB": 0, + "osDiskType": "str", + "osSKU": "str", + "osType": "str", + "windowsProfile": {"disableOutboundNat": bool}, + }, + "priority": "str", + "provisioningState": "str", + "resourceId": "str", + "security": { + "enableEncryptionAtHost": bool, + "enableSecureBoot": bool, + "enableVTPM": bool, + "sshAccess": "str", + }, + "status": { + "creationTimestamp": "2020-02-20 00:00:00", + "driftAction": "str", + "driftReason": "str", + "provisioningError": { + "additionalInfo": [{"info": {}, "type": "str"}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + }, + "vmState": "str", + }, + "tags": {"str": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "zones": ["str"], + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_machines_list(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py index 05739238f386..f5efc758bf78 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py @@ -32,6 +32,201 @@ async def test_machines_get(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_machines_begin_create_or_update(self, resource_group): + response = await ( + await self.client.machines.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + machine_name="str", + parameters={ + "id": "str", + "name": "str", + "properties": { + "billing": {"spotMaxPrice": 0.0}, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "eTag": "str", + "evictionPolicy": "str", + "hardware": { + "gpuInstanceProfile": "str", + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, + "ultraSsdEnabled": bool, + "vmSize": "str", + }, + "kubernetes": { + "artifactStreamingProfile": {"enabled": bool}, + "currentOrchestratorVersion": "str", + "kubeletConfig": { + "allowedUnsafeSysctls": ["str"], + "containerLogMaxFiles": 0, + "containerLogMaxSizeMB": 0, + "cpuCfsQuota": bool, + "cpuCfsQuotaPeriod": "str", + "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, + "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "imageGcHighThreshold": 0, + "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, + "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "topologyManagerPolicy": "str", + }, + "kubeletDiskType": "str", + "maxPods": 0, + "nodeInitializationTaints": ["str"], + "nodeLabels": {"str": "str"}, + "nodeName": "str", + "nodeTaints": ["str"], + "orchestratorVersion": "str", + "workloadRuntime": "str", + }, + "localDNSProfile": { + "kubeDNSOverrides": { + "str": { + "cacheDurationInSeconds": 0, + "forwardDestination": "str", + "forwardPolicy": "str", + "maxConcurrent": 0, + "protocol": "str", + "queryLogging": "str", + "serveStale": "str", + "serveStaleDurationInSeconds": 0, + } + }, + "mode": "str", + "state": "str", + "vnetDNSOverrides": { + "str": { + "cacheDurationInSeconds": 0, + "forwardDestination": "str", + "forwardPolicy": "str", + "maxConcurrent": 0, + "protocol": "str", + "queryLogging": "str", + "serveStale": "str", + "serveStaleDurationInSeconds": 0, + } + }, + }, + "mode": "str", + "network": { + "enableNodePublicIP": bool, + "ipAddresses": [{"family": "str", "ip": "str"}], + "nodePublicIPPrefixID": "str", + "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "podSubnetID": "str", + "vnetSubnetID": "str", + }, + "nodeImageVersion": "str", + "operatingSystem": { + "enableFIPS": bool, + "linuxProfile": { + "linuxOSConfig": { + "swapFileSizeMB": 0, + "sysctls": { + "fsAioMaxNr": 0, + "fsFileMax": 0, + "fsInotifyMaxUserWatches": 0, + "fsNrOpen": 0, + "kernelThreadsMax": 0, + "netCoreNetdevMaxBacklog": 0, + "netCoreOptmemMax": 0, + "netCoreRmemDefault": 0, + "netCoreRmemMax": 0, + "netCoreSomaxconn": 0, + "netCoreWmemDefault": 0, + "netCoreWmemMax": 0, + "netIpv4IpLocalPortRange": "str", + "netIpv4NeighDefaultGcThresh1": 0, + "netIpv4NeighDefaultGcThresh2": 0, + "netIpv4NeighDefaultGcThresh3": 0, + "netIpv4TcpFinTimeout": 0, + "netIpv4TcpKeepaliveProbes": 0, + "netIpv4TcpKeepaliveTime": 0, + "netIpv4TcpMaxSynBacklog": 0, + "netIpv4TcpMaxTwBuckets": 0, + "netIpv4TcpTwReuse": bool, + "netIpv4TcpkeepaliveIntvl": 0, + "netNetfilterNfConntrackBuckets": 0, + "netNetfilterNfConntrackMax": 0, + "vmMaxMapCount": 0, + "vmSwappiness": 0, + "vmVfsCachePressure": 0, + }, + "transparentHugePageDefrag": "str", + "transparentHugePageEnabled": "str", + }, + "messageOfTheDay": "str", + }, + "osDiskSizeGB": 0, + "osDiskType": "str", + "osSKU": "str", + "osType": "str", + "windowsProfile": {"disableOutboundNat": bool}, + }, + "priority": "str", + "provisioningState": "str", + "resourceId": "str", + "security": { + "enableEncryptionAtHost": bool, + "enableSecureBoot": bool, + "enableVTPM": bool, + "sshAccess": "str", + }, + "status": { + "creationTimestamp": "2020-02-20 00:00:00", + "driftAction": "str", + "driftReason": "str", + "provisioningError": { + "additionalInfo": [{"info": {}, "type": "str"}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + }, + "vmState": "str", + }, + "tags": {"str": "str"}, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + "zones": ["str"], + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_machines_list(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py index 4b2d57b50abc..31df50c2bea4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py @@ -54,6 +54,7 @@ def test_maintenance_configurations_create_or_update(self, resource_group): "startDate": "2020-02-20", "utcOffset": "str", }, + "maintenanceWindowId": "str", "notAllowedTime": [{"end": "2020-02-20 00:00:00", "start": "2020-02-20 00:00:00"}], "timeInWeek": [{"day": "str", "hourSlots": [0]}], }, diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py index 5f24e461d65e..d0fcea1f5012 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py @@ -55,6 +55,7 @@ async def test_maintenance_configurations_create_or_update(self, resource_group) "startDate": "2020-02-20", "utcOffset": "str", }, + "maintenanceWindowId": "str", "notAllowedTime": [{"end": "2020-02-20 00:00:00", "start": "2020-02-20 00:00:00"}], "timeInWeek": [{"day": "str", "hourSlots": [0]}], }, diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations.py new file mode 100644 index 000000000000..c6b9b170f985 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceMaintenanceWindowsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_get(self, resource_group): + response = self.client.maintenance_windows.get( + resource_group_name=resource_group.name, + maintenance_window_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_begin_create_or_update(self, resource_group): + response = self.client.maintenance_windows.begin_create_or_update( + resource_group_name=resource_group.name, + maintenance_window_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "durationHours": 0, + "schedule": { + "absoluteMonthly": {"dayOfMonth": 0, "intervalMonths": 0}, + "daily": {"intervalDays": 0}, + "relativeMonthly": {"dayOfWeek": "str", "intervalMonths": 0, "weekIndex": "str"}, + "weekly": {"dayOfWeek": "str", "intervalWeeks": 0}, + }, + "startTime": "str", + "notAllowedDates": [{"end": "2020-02-20", "start": "2020-02-20"}], + "provisioningState": "str", + "startDate": "2020-02-20", + "utcOffset": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_update_tags(self, resource_group): + response = self.client.maintenance_windows.update_tags( + resource_group_name=resource_group.name, + maintenance_window_name="str", + properties={"tags": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_begin_delete(self, resource_group): + response = self.client.maintenance_windows.begin_delete( + resource_group_name=resource_group.name, + maintenance_window_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_list(self, resource_group): + response = self.client.maintenance_windows.list( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_maintenance_windows_list_by_subscription(self, resource_group): + response = self.client.maintenance_windows.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations_async.py new file mode 100644 index 000000000000..ea679f6e70af --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_windows_operations_async.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceMaintenanceWindowsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_get(self, resource_group): + response = await self.client.maintenance_windows.get( + resource_group_name=resource_group.name, + maintenance_window_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_begin_create_or_update(self, resource_group): + response = await ( + await self.client.maintenance_windows.begin_create_or_update( + resource_group_name=resource_group.name, + maintenance_window_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "durationHours": 0, + "schedule": { + "absoluteMonthly": {"dayOfMonth": 0, "intervalMonths": 0}, + "daily": {"intervalDays": 0}, + "relativeMonthly": {"dayOfWeek": "str", "intervalMonths": 0, "weekIndex": "str"}, + "weekly": {"dayOfWeek": "str", "intervalWeeks": 0}, + }, + "startTime": "str", + "notAllowedDates": [{"end": "2020-02-20", "start": "2020-02-20"}], + "provisioningState": "str", + "startDate": "2020-02-20", + "utcOffset": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_update_tags(self, resource_group): + response = await self.client.maintenance_windows.update_tags( + resource_group_name=resource_group.name, + maintenance_window_name="str", + properties={"tags": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_begin_delete(self, resource_group): + response = await ( + await self.client.maintenance_windows.begin_delete( + resource_group_name=resource_group.name, + maintenance_window_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_list(self, resource_group): + response = self.client.maintenance_windows.list( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_maintenance_windows_list_by_subscription(self, resource_group): + response = self.client.maintenance_windows.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py new file mode 100644 index 000000000000..d02b777d78c1 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceManagedClusterSnapshotsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_get(self, resource_group): + response = self.client.managed_cluster_snapshots.get( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_create_or_update(self, resource_group): + response = self.client.managed_cluster_snapshots.create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + parameters={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "creationData": {"sourceResourceId": "str"}, + "managedClusterPropertiesReadOnly": { + "enableRbac": bool, + "kubernetesVersion": "str", + "networkProfile": { + "loadBalancerSku": "str", + "networkMode": "str", + "networkPlugin": "str", + "networkPluginMode": "str", + "networkPolicy": "str", + }, + "sku": {"name": "str", "tier": "str"}, + }, + "snapshotType": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_update_tags(self, resource_group): + response = self.client.managed_cluster_snapshots.update_tags( + resource_group_name=resource_group.name, + resource_name="str", + parameters={"tags": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_delete(self, resource_group): + response = self.client.managed_cluster_snapshots.delete( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): + response = self.client.managed_cluster_snapshots.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_cluster_snapshots_list(self, resource_group): + response = self.client.managed_cluster_snapshots.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py new file mode 100644 index 000000000000..3c60017f23e4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceManagedClusterSnapshotsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_get(self, resource_group): + response = await self.client.managed_cluster_snapshots.get( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_create_or_update(self, resource_group): + response = await self.client.managed_cluster_snapshots.create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + parameters={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "creationData": {"sourceResourceId": "str"}, + "managedClusterPropertiesReadOnly": { + "enableRbac": bool, + "kubernetesVersion": "str", + "networkProfile": { + "loadBalancerSku": "str", + "networkMode": "str", + "networkPlugin": "str", + "networkPluginMode": "str", + "networkPolicy": "str", + }, + "sku": {"name": "str", "tier": "str"}, + }, + "snapshotType": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_update_tags(self, resource_group): + response = await self.client.managed_cluster_snapshots.update_tags( + resource_group_name=resource_group.name, + resource_name="str", + parameters={"tags": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_delete(self, resource_group): + response = await self.client.managed_cluster_snapshots.delete( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): + response = self.client.managed_cluster_snapshots.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_cluster_snapshots_list(self, resource_group): + response = self.client.managed_cluster_snapshots.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py index f6b18646458b..c79e4210b4b2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py @@ -82,10 +82,15 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, + "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -94,10 +99,28 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "cpuCfsQuota": bool, "cpuCfsQuotaPeriod": "str", "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -173,9 +196,23 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "allowedHostPorts": [{"portEnd": 0, "portStart": 0, "protocol": "str"}], "applicationSecurityGroups": ["str"], "dranet": {"mode": "str"}, + "nodePublicIPPrefixIDs": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "secondaryNetworkInterfaces": [ + { + "enableAcceleratedNetworking": bool, + "publicIPAddressConfiguration": { + "publicIPAddressVersion": "str", + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPPrefixID": "str", + }, + "type": "str", + "vnetSubnetId": "str", + } + ], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -187,6 +224,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, + "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -207,11 +245,19 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, + "upgradeSettingsBlueGreen": { + "batchSoakDurationInMinutes": 0, + "drainBatchSize": "str", + "drainTimeoutInMinutes": 0, + "finalSoakDurationInMinutes": 0, + }, + "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], "virtualMachinesProfile": { "scale": { @@ -279,15 +325,25 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "str", "containerRegistryId": "str"}, + "controlPlaneScalingProfile": {"scalingSize": "str"}, + "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", + "enableFIPS": bool, + "enableNamespaceResources": bool, + "enableNodeHardening": bool, "enableRBAC": bool, "fqdn": "str", "fqdnSubdomain": "str", + "healthMonitorProfile": { + "enableContinuousControlPlaneAndAddonMonitor": bool, + "enableOnDemandMonitor": bool, + }, "hostedSystemProfile": {"enabled": bool, "nodeSubnetID": "str", "systemNodeSubnetID": "str"}, "httpProxyConfig": { + "effectiveNoProxy": ["str"], "enabled": bool, "httpProxy": "str", "httpsProxy": "str", @@ -296,8 +352,13 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "identityProfile": {"str": {"clientId": "str", "objectId": "str", "resourceId": "str"}}, "ingressProfile": { + "applicationLoadBalancer": { + "enabled": bool, + "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, + }, "gatewayAPI": {"installation": "str"}, "webAppRouting": { + "defaultDomain": {"domainName": "str", "enabled": bool}, "dnsZoneResourceIds": ["str"], "enabled": bool, "gatewayAPIImplementations": {"appRoutingIstio": {"mode": "str"}}, @@ -320,11 +381,29 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "transitEncryption": {"type": "str"}, }, }, + "bastionProfile": { + "bastionId": "str", + "enabled": bool, + "publicIpAddressId": "str", + "scaleUnits": 0, + "sku": "str", + }, "dnsServiceIP": "str", "ipFamilies": ["str"], + "kubeProxyConfig": { + "enabled": bool, + "ipvsConfig": { + "scheduler": "str", + "tcpFinTimeoutSeconds": 0, + "tcpTimeoutSeconds": 0, + "udpTimeoutSeconds": 0, + }, + "mode": "str", + }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "str", + "clusterServiceLoadBalancerHealthProbeMode": "str", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 0, @@ -333,6 +412,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundIPs": {"publicIPs": [{"id": "str"}]}, }, "loadBalancerSku": "str", + "natGatewayId": "str", "natGatewayProfile": { "effectiveOutboundIPs": [{"id": "str"}], "idleTimeoutInMinutes": 0, @@ -349,10 +429,12 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "str", "podCidr": "str", "podCidrs": ["str"], + "podLinkLocalAccess": "str", "serviceCidr": "str", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, }, + "nodeDisruptionProfile": {"nodeDisruptionPolicy": "str"}, "nodeProvisioningProfile": {"defaultNodePools": "str", "mode": "str"}, "nodeResourceGroup": "str", "nodeResourceGroupProfile": {"restrictionLevel": "str"}, @@ -417,6 +499,10 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "securityMonitoring": {"enabled": bool}, }, "imageCleaner": {"enabled": bool, "intervalHours": 0}, + "imageIntegrity": {"enabled": bool}, + "kubernetesResourceObjectEncryptionProfile": {"infrastructureEncryption": "str"}, + "nodeRestriction": {"enabled": bool}, + "serviceAccountImagePullProfile": {"defaultManagedIdentityId": "str", "enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -473,7 +559,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": bool}, + "verticalPodAutoscaler": {"enabled": bool, "addonAutoscaling": "str"}, }, }, "sku": {"name": "str", "tier": "str"}, @@ -701,6 +787,18 @@ def test_managed_clusters_list_outbound_network_dependencies_endpoints(self, res # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_clusters_begin_rebalance_load_balancers(self, resource_group): + response = self.client.managed_clusters.begin_rebalance_load_balancers( + resource_group_name=resource_group.name, + resource_name="str", + parameters={"loadBalancerNames": ["str"]}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_clusters_get_upgrade_profile(self, resource_group): @@ -712,6 +810,48 @@ def test_managed_clusters_get_upgrade_profile(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_clusters_get_guardrails_versions(self, resource_group): + response = self.client.managed_clusters.get_guardrails_versions( + location="str", + version="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_clusters_list_guardrails_versions(self, resource_group): + response = self.client.managed_clusters.list_guardrails_versions( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_clusters_get_safeguards_versions(self, resource_group): + response = self.client.managed_clusters.get_safeguards_versions( + location="str", + version="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_clusters_list_safeguards_versions(self, resource_group): + response = self.client.managed_clusters.list_safeguards_versions( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_clusters_get_mesh_revision_profile(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py index a9d2b28b82d9..b986d1ea7743 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py @@ -89,10 +89,15 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, + "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": { + "driver": "str", + "driverType": "str", + "nvidia": {"driverMode": "str", "managementMode": "str", "migStrategy": "str"}, + }, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -101,10 +106,28 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "cpuCfsQuota": bool, "cpuCfsQuotaPeriod": "str", "cpuManagerPolicy": "str", + "evictionMaxPodGracePeriodInSeconds": 0, "failSwapOn": bool, + "hardEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, + "kubeReserved": {"cpuMillicores": 0, "memoryMB": 0}, "podMaxPids": 0, + "seccompDefault": "str", + "softEvictionGracePeriod": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, + "softEvictionThreshold": { + "memoryAvailable": "str", + "nodeFsAvailable": "str", + "nodeFsInodesFree": "str", + }, "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -180,9 +203,23 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "allowedHostPorts": [{"portEnd": 0, "portStart": 0, "protocol": "str"}], "applicationSecurityGroups": ["str"], "dranet": {"mode": "str"}, + "nodePublicIPPrefixIDs": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], + "secondaryNetworkInterfaces": [ + { + "enableAcceleratedNetworking": bool, + "publicIPAddressConfiguration": { + "publicIPAddressVersion": "str", + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPPrefixID": "str", + }, + "type": "str", + "vnetSubnetId": "str", + } + ], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -194,6 +231,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, + "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -214,11 +252,19 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, + "upgradeSettingsBlueGreen": { + "batchSoakDurationInMinutes": 0, + "drainBatchSize": "str", + "drainTimeoutInMinutes": 0, + "finalSoakDurationInMinutes": 0, + }, + "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], "virtualMachinesProfile": { "scale": { @@ -289,15 +335,25 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "str", "containerRegistryId": "str"}, + "controlPlaneScalingProfile": {"scalingSize": "str"}, + "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", + "enableFIPS": bool, + "enableNamespaceResources": bool, + "enableNodeHardening": bool, "enableRBAC": bool, "fqdn": "str", "fqdnSubdomain": "str", + "healthMonitorProfile": { + "enableContinuousControlPlaneAndAddonMonitor": bool, + "enableOnDemandMonitor": bool, + }, "hostedSystemProfile": {"enabled": bool, "nodeSubnetID": "str", "systemNodeSubnetID": "str"}, "httpProxyConfig": { + "effectiveNoProxy": ["str"], "enabled": bool, "httpProxy": "str", "httpsProxy": "str", @@ -306,8 +362,13 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "identityProfile": {"str": {"clientId": "str", "objectId": "str", "resourceId": "str"}}, "ingressProfile": { + "applicationLoadBalancer": { + "enabled": bool, + "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, + }, "gatewayAPI": {"installation": "str"}, "webAppRouting": { + "defaultDomain": {"domainName": "str", "enabled": bool}, "dnsZoneResourceIds": ["str"], "enabled": bool, "gatewayAPIImplementations": {"appRoutingIstio": {"mode": "str"}}, @@ -330,11 +391,29 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "transitEncryption": {"type": "str"}, }, }, + "bastionProfile": { + "bastionId": "str", + "enabled": bool, + "publicIpAddressId": "str", + "scaleUnits": 0, + "sku": "str", + }, "dnsServiceIP": "str", "ipFamilies": ["str"], + "kubeProxyConfig": { + "enabled": bool, + "ipvsConfig": { + "scheduler": "str", + "tcpFinTimeoutSeconds": 0, + "tcpTimeoutSeconds": 0, + "udpTimeoutSeconds": 0, + }, + "mode": "str", + }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "str", + "clusterServiceLoadBalancerHealthProbeMode": "str", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 0, @@ -343,6 +422,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundIPs": {"publicIPs": [{"id": "str"}]}, }, "loadBalancerSku": "str", + "natGatewayId": "str", "natGatewayProfile": { "effectiveOutboundIPs": [{"id": "str"}], "idleTimeoutInMinutes": 0, @@ -359,10 +439,12 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "str", "podCidr": "str", "podCidrs": ["str"], + "podLinkLocalAccess": "str", "serviceCidr": "str", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, }, + "nodeDisruptionProfile": {"nodeDisruptionPolicy": "str"}, "nodeProvisioningProfile": {"defaultNodePools": "str", "mode": "str"}, "nodeResourceGroup": "str", "nodeResourceGroupProfile": {"restrictionLevel": "str"}, @@ -432,6 +514,10 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "securityMonitoring": {"enabled": bool}, }, "imageCleaner": {"enabled": bool, "intervalHours": 0}, + "imageIntegrity": {"enabled": bool}, + "kubernetesResourceObjectEncryptionProfile": {"infrastructureEncryption": "str"}, + "nodeRestriction": {"enabled": bool}, + "serviceAccountImagePullProfile": {"defaultManagedIdentityId": "str", "enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -488,7 +574,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": bool}, + "verticalPodAutoscaler": {"enabled": bool, "addonAutoscaling": "str"}, }, }, "sku": {"name": "str", "tier": "str"}, @@ -737,6 +823,20 @@ async def test_managed_clusters_list_outbound_network_dependencies_endpoints(sel # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_clusters_begin_rebalance_load_balancers(self, resource_group): + response = await ( + await self.client.managed_clusters.begin_rebalance_load_balancers( + resource_group_name=resource_group.name, + resource_name="str", + parameters={"loadBalancerNames": ["str"]}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_clusters_get_upgrade_profile(self, resource_group): @@ -748,6 +848,48 @@ async def test_managed_clusters_get_upgrade_profile(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_clusters_get_guardrails_versions(self, resource_group): + response = await self.client.managed_clusters.get_guardrails_versions( + location="str", + version="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_clusters_list_guardrails_versions(self, resource_group): + response = self.client.managed_clusters.list_guardrails_versions( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_clusters_get_safeguards_versions(self, resource_group): + response = await self.client.managed_clusters.get_safeguards_versions( + location="str", + version="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_clusters_list_safeguards_versions(self, resource_group): + response = self.client.managed_clusters.list_safeguards_versions( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_clusters_get_mesh_revision_profile(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py new file mode 100644 index 000000000000..556954334154 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceMeshMembershipsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_mesh_memberships_get(self, resource_group): + response = self.client.mesh_memberships.get( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_mesh_memberships_begin_create_or_update(self, resource_group): + response = self.client.mesh_memberships.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + parameters={ + "eTag": "str", + "id": "str", + "managedBy": "str", + "name": "str", + "properties": { + "managedMeshID": "str", + "privateConnectProfile": {"privateIpAddress": "str", "subnetResourceId": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_mesh_memberships_begin_delete(self, resource_group): + response = self.client.mesh_memberships.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_mesh_memberships_list_by_managed_cluster(self, resource_group): + response = self.client.mesh_memberships.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py new file mode 100644 index 000000000000..87c7b2cd23d9 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceMeshMembershipsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_mesh_memberships_get(self, resource_group): + response = await self.client.mesh_memberships.get( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_mesh_memberships_begin_create_or_update(self, resource_group): + response = await ( + await self.client.mesh_memberships.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + parameters={ + "eTag": "str", + "id": "str", + "managedBy": "str", + "name": "str", + "properties": { + "managedMeshID": "str", + "privateConnectProfile": {"privateIpAddress": "str", "subnetResourceId": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_mesh_memberships_begin_delete(self, resource_group): + response = await ( + await self.client.mesh_memberships.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + mesh_membership_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_mesh_memberships_list_by_managed_cluster(self, resource_group): + response = self.client.mesh_memberships.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py new file mode 100644 index 000000000000..38e976ad1ba7 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceOperationStatusResultOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_status_result_list_by_agent_pool(self, resource_group): + response = self.client.operation_status_result.list_by_agent_pool( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_status_result_get_by_agent_pool(self, resource_group): + response = self.client.operation_status_result.get_by_agent_pool( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_status_result_list(self, resource_group): + response = self.client.operation_status_result.list( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_status_result_get(self, resource_group): + response = self.client.operation_status_result.get( + resource_group_name=resource_group.name, + resource_name="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py new file mode 100644 index 000000000000..1b46f93fed1b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceOperationStatusResultOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_status_result_list_by_agent_pool(self, resource_group): + response = self.client.operation_status_result.list_by_agent_pool( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_status_result_get_by_agent_pool(self, resource_group): + response = await self.client.operation_status_result.get_by_agent_pool( + resource_group_name=resource_group.name, + resource_name="str", + agent_pool_name="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_status_result_list(self, resource_group): + response = self.client.operation_status_result.list( + resource_group_name=resource_group.name, + resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_status_result_get(self, resource_group): + response = await self.client.operation_status_result.get( + resource_group_name=resource_group.name, + resource_name="str", + operation_id="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py new file mode 100644 index 000000000000..a4936ed3c7e4 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceVmSkusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_vm_skus_list(self, resource_group): + response = self.client.vm_skus.list( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py new file mode 100644 index 000000000000..0b59f282b641 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py @@ -0,0 +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. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceVmSkusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_vm_skus_list(self, resource_group): + response = self.client.vm_skus.list( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml b/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml index 1857f93e712a..4d73543539cc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml +++ b/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml @@ -13,7 +13,7 @@ authors = [ description = "Microsoft Azure Containerservice Management Client Library for Python" license = "MIT" classifiers = [ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", @@ -78,7 +78,7 @@ verifytypes = false package_name = "azure-mgmt-containerservice" package_pprint_name = "Container Service Management" package_doc_id = "container-service" -is_stable = true +is_stable = false sample_link = "" title = "ContainerServiceClient" package_nspkg = "azure-mgmt-nspkg" diff --git a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml index 6d3d031ee22d..8869d794c3b5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: f8beca0ed7b433a34c234f776c06cc38bc799eac +commit: 53c0f6efe9872c971e8c365e3b0d41a6bd6efd3d repo: Azure/azure-rest-api-specs additionalDirectories: