99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
1111
12+ from azure .core .pipeline import policies
1213from azure .core .rest import HttpRequest , HttpResponse
1314from azure .mgmt .core import ARMPipelineClient
15+ from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1416
1517from . import models as _models
1618from ._configuration import HDInsightContainersMgmtClientConfiguration
1719from ._serialization import Deserializer , Serializer
1820from .operations import (
1921 AvailableClusterPoolVersionsOperations ,
2022 AvailableClusterVersionsOperations ,
23+ ClusterAvailableUpgradesOperations ,
2124 ClusterJobsOperations ,
25+ ClusterPoolAvailableUpgradesOperations ,
2226 ClusterPoolsOperations ,
2327 ClustersOperations ,
2428 LocationsOperations ,
3135
3236
3337class HDInsightContainersMgmtClient : # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
34- """HDInsight On Aks Management Client.
38+ """HDInsight Containers Management Client.
3539
3640 :ivar cluster_pools: ClusterPoolsOperations operations
3741 :vartype cluster_pools: azure.mgmt.hdinsightcontainers.operations.ClusterPoolsOperations
42+ :ivar cluster_pool_available_upgrades: ClusterPoolAvailableUpgradesOperations operations
43+ :vartype cluster_pool_available_upgrades:
44+ azure.mgmt.hdinsightcontainers.operations.ClusterPoolAvailableUpgradesOperations
3845 :ivar clusters: ClustersOperations operations
3946 :vartype clusters: azure.mgmt.hdinsightcontainers.operations.ClustersOperations
47+ :ivar cluster_available_upgrades: ClusterAvailableUpgradesOperations operations
48+ :vartype cluster_available_upgrades:
49+ azure.mgmt.hdinsightcontainers.operations.ClusterAvailableUpgradesOperations
4050 :ivar cluster_jobs: ClusterJobsOperations operations
4151 :vartype cluster_jobs: azure.mgmt.hdinsightcontainers.operations.ClusterJobsOperations
4252 :ivar locations: LocationsOperations operations
@@ -55,7 +65,7 @@ class HDInsightContainersMgmtClient: # pylint: disable=client-accepts-api-versi
5565 :type subscription_id: str
5666 :param base_url: Service URL. Default value is "https://management.azure.com".
5767 :type base_url: str
58- :keyword api_version: Api Version. Default value is "2023-06 -01-preview". Note that overriding
68+ :keyword api_version: Api Version. Default value is "2023-11 -01-preview". Note that overriding
5969 this default value may result in unsupported behavior.
6070 :paramtype api_version: str
6171 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -72,14 +82,38 @@ def __init__(
7282 self ._config = HDInsightContainersMgmtClientConfiguration (
7383 credential = credential , subscription_id = subscription_id , ** kwargs
7484 )
75- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
85+ _policies = kwargs .pop ("policies" , None )
86+ if _policies is None :
87+ _policies = [
88+ policies .RequestIdPolicy (** kwargs ),
89+ self ._config .headers_policy ,
90+ self ._config .user_agent_policy ,
91+ self ._config .proxy_policy ,
92+ policies .ContentDecodePolicy (** kwargs ),
93+ ARMAutoResourceProviderRegistrationPolicy (),
94+ self ._config .redirect_policy ,
95+ self ._config .retry_policy ,
96+ self ._config .authentication_policy ,
97+ self ._config .custom_hook_policy ,
98+ self ._config .logging_policy ,
99+ policies .DistributedTracingPolicy (** kwargs ),
100+ policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
101+ self ._config .http_logging_policy ,
102+ ]
103+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
76104
77105 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
78106 self ._serialize = Serializer (client_models )
79107 self ._deserialize = Deserializer (client_models )
80108 self ._serialize .client_side_validation = False
81109 self .cluster_pools = ClusterPoolsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
110+ self .cluster_pool_available_upgrades = ClusterPoolAvailableUpgradesOperations (
111+ self ._client , self ._config , self ._serialize , self ._deserialize
112+ )
82113 self .clusters = ClustersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
114+ self .cluster_available_upgrades = ClusterAvailableUpgradesOperations (
115+ self ._client , self ._config , self ._serialize , self ._deserialize
116+ )
83117 self .cluster_jobs = ClusterJobsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
84118 self .locations = LocationsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
85119 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -90,7 +124,7 @@ def __init__(
90124 self ._client , self ._config , self ._serialize , self ._deserialize
91125 )
92126
93- def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
127+ def _send_request (self , request : HttpRequest , * , stream : bool = False , * *kwargs : Any ) -> HttpResponse :
94128 """Runs the network request through the client's chained policies.
95129
96130 >>> from azure.core.rest import HttpRequest
@@ -110,7 +144,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
110144
111145 request_copy = deepcopy (request )
112146 request_copy .url = self ._client .format_url (request_copy .url )
113- return self ._client .send_request (request_copy , ** kwargs )
147+ return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
114148
115149 def close (self ) -> None :
116150 self ._client .close ()
0 commit comments