77# --------------------------------------------------------------------------
88
99from copy import deepcopy
10- from typing import Any , TYPE_CHECKING
10+ from typing import Any , Optional , TYPE_CHECKING , cast
1111from typing_extensions import Self
1212
1313from azure .core .pipeline import policies
1414from azure .core .rest import HttpRequest , HttpResponse
15+ from azure .core .settings import settings
1516from azure .mgmt .core import ARMPipelineClient
1617from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
18+ from azure .mgmt .core .tools import get_arm_endpoints
1719
1820from . import models as _models
1921from ._configuration import ContainerServiceFleetMgmtClientConfiguration
20- from ._serialization import Deserializer , Serializer
22+ from ._utils . serialization import Deserializer , Serializer
2123from .operations import (
2224 AutoUpgradeProfileOperationsOperations ,
2325 AutoUpgradeProfilesOperations ,
2426 FleetMembersOperations ,
2527 FleetUpdateStrategiesOperations ,
2628 FleetsOperations ,
29+ GatesOperations ,
2730 Operations ,
2831 UpdateRunsOperations ,
2932)
@@ -45,6 +48,8 @@ class ContainerServiceFleetMgmtClient: # pylint: disable=too-many-instance-attr
4548 :ivar auto_upgrade_profile_operations: AutoUpgradeProfileOperationsOperations operations
4649 :vartype auto_upgrade_profile_operations:
4750 azure.mgmt.containerservicefleet.operations.AutoUpgradeProfileOperationsOperations
51+ :ivar gates: GatesOperations operations
52+ :vartype gates: azure.mgmt.containerservicefleet.operations.GatesOperations
4853 :ivar fleet_members: FleetMembersOperations operations
4954 :vartype fleet_members: azure.mgmt.containerservicefleet.operations.FleetMembersOperations
5055 :ivar update_runs: UpdateRunsOperations operations
@@ -56,25 +61,27 @@ class ContainerServiceFleetMgmtClient: # pylint: disable=too-many-instance-attr
5661 :type credential: ~azure.core.credentials.TokenCredential
5762 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5863 :type subscription_id: str
59- :param base_url: Service URL. Default value is "https://management.azure.com" .
64+ :param base_url: Service URL. Default value is None .
6065 :type base_url: str
61- :keyword api_version: Api Version. Default value is "2025-03 -01". Note that overriding this
62- default value may result in unsupported behavior.
66+ :keyword api_version: Api Version. Default value is "2025-04 -01-preview ". Note that overriding
67+ this default value may result in unsupported behavior.
6368 :paramtype api_version: str
6469 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6570 Retry-After header is present.
6671 """
6772
6873 def __init__ (
69- self ,
70- credential : "TokenCredential" ,
71- subscription_id : str ,
72- base_url : str = "https://management.azure.com" ,
73- ** kwargs : Any
74+ self , credential : "TokenCredential" , subscription_id : str , base_url : Optional [str ] = None , ** kwargs : Any
7475 ) -> None :
76+ _cloud = kwargs .pop ("cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
77+ _endpoints = get_arm_endpoints (_cloud )
78+ if not base_url :
79+ base_url = _endpoints ["resource_manager" ]
80+ credential_scopes = kwargs .pop ("credential_scopes" , _endpoints ["credential_scopes" ])
7581 self ._config = ContainerServiceFleetMgmtClientConfiguration (
76- credential = credential , subscription_id = subscription_id , ** kwargs
82+ credential = credential , subscription_id = subscription_id , credential_scopes = credential_scopes , ** kwargs
7783 )
84+
7885 _policies = kwargs .pop ("policies" , None )
7986 if _policies is None :
8087 _policies = [
@@ -93,7 +100,7 @@ def __init__(
93100 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
94101 self ._config .http_logging_policy ,
95102 ]
96- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
103+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = cast ( str , base_url ) , policies = _policies , ** kwargs )
97104
98105 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
99106 self ._serialize = Serializer (client_models )
@@ -107,6 +114,7 @@ def __init__(
107114 self .auto_upgrade_profile_operations = AutoUpgradeProfileOperationsOperations (
108115 self ._client , self ._config , self ._serialize , self ._deserialize
109116 )
117+ self .gates = GatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
110118 self .fleet_members = FleetMembersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
111119 self .update_runs = UpdateRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
112120 self .fleet_update_strategies = FleetUpdateStrategiesOperations (
0 commit comments