1010# --------------------------------------------------------------------------
1111
1212from typing import Any , Optional , TYPE_CHECKING
13+ from typing_extensions import Self
1314
15+ from azure .core .pipeline import policies
1416from azure .mgmt .core import ARMPipelineClient
17+ from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1518from azure .profiles import KnownProfiles , ProfileDefinition
1619from azure .profiles .multiapiclient import MultiApiClientMixin
1720
@@ -53,7 +56,7 @@ class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
5356 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5457 """
5558
56- DEFAULT_API_VERSION = '2023-09-04 '
59+ DEFAULT_API_VERSION = '2023-11-22 '
5760 _PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
5861 LATEST_PROFILE = ProfileDefinition ({
5962 _PROFILE_TAG : {
@@ -74,7 +77,25 @@ def __init__(
7477 if api_version :
7578 kwargs .setdefault ('api_version' , api_version )
7679 self ._config = AzureRedHatOpenShiftClientConfiguration (credential , subscription_id , ** kwargs )
77- self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
80+ _policies = kwargs .pop ("policies" , None )
81+ if _policies is None :
82+ _policies = [
83+ policies .RequestIdPolicy (** kwargs ),
84+ self ._config .headers_policy ,
85+ self ._config .user_agent_policy ,
86+ self ._config .proxy_policy ,
87+ policies .ContentDecodePolicy (** kwargs ),
88+ ARMAutoResourceProviderRegistrationPolicy (),
89+ self ._config .redirect_policy ,
90+ self ._config .retry_policy ,
91+ self ._config .authentication_policy ,
92+ self ._config .custom_hook_policy ,
93+ self ._config .logging_policy ,
94+ policies .DistributedTracingPolicy (** kwargs ),
95+ policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
96+ self ._config .http_logging_policy ,
97+ ]
98+ self ._client = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
7899 super (AzureRedHatOpenShiftClient , self ).__init__ (
79100 api_version = api_version ,
80101 profile = profile
@@ -94,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
94115 * 2022-09-04: :mod:`v2022_09_04.models<azure.mgmt.redhatopenshift.v2022_09_04.models>`
95116 * 2023-04-01: :mod:`v2023_04_01.models<azure.mgmt.redhatopenshift.v2023_04_01.models>`
96117 * 2023-09-04: :mod:`v2023_09_04.models<azure.mgmt.redhatopenshift.v2023_09_04.models>`
118+ * 2023-11-22: :mod:`v2023_11_22.models<azure.mgmt.redhatopenshift.v2023_11_22.models>`
97119 """
98120 if api_version == '2020-04-30' :
99121 from .v2020_04_30 import models
@@ -113,6 +135,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
113135 elif api_version == '2023-09-04' :
114136 from .v2023_09_04 import models
115137 return models
138+ elif api_version == '2023-11-22' :
139+ from .v2023_11_22 import models
140+ return models
116141 raise ValueError ("API version {} is not available" .format (api_version ))
117142
118143 @property
@@ -122,6 +147,7 @@ def machine_pools(self):
122147 * 2022-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.MachinePoolsOperations>`
123148 * 2023-04-01: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.MachinePoolsOperations>`
124149 * 2023-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.MachinePoolsOperations>`
150+ * 2023-11-22: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.MachinePoolsOperations>`
125151 """
126152 api_version = self ._get_api_version ('machine_pools' )
127153 if api_version == '2022-09-04' :
@@ -130,6 +156,8 @@ def machine_pools(self):
130156 from .v2023_04_01 .operations import MachinePoolsOperations as OperationClass
131157 elif api_version == '2023-09-04' :
132158 from .v2023_09_04 .operations import MachinePoolsOperations as OperationClass
159+ elif api_version == '2023-11-22' :
160+ from .v2023_11_22 .operations import MachinePoolsOperations as OperationClass
133161 else :
134162 raise ValueError ("API version {} does not have operation group 'machine_pools'" .format (api_version ))
135163 self ._config .api_version = api_version
@@ -145,6 +173,7 @@ def open_shift_clusters(self):
145173 * 2022-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftClustersOperations>`
146174 * 2023-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftClustersOperations>`
147175 * 2023-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftClustersOperations>`
176+ * 2023-11-22: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftClustersOperations>`
148177 """
149178 api_version = self ._get_api_version ('open_shift_clusters' )
150179 if api_version == '2020-04-30' :
@@ -159,6 +188,8 @@ def open_shift_clusters(self):
159188 from .v2023_04_01 .operations import OpenShiftClustersOperations as OperationClass
160189 elif api_version == '2023-09-04' :
161190 from .v2023_09_04 .operations import OpenShiftClustersOperations as OperationClass
191+ elif api_version == '2023-11-22' :
192+ from .v2023_11_22 .operations import OpenShiftClustersOperations as OperationClass
162193 else :
163194 raise ValueError ("API version {} does not have operation group 'open_shift_clusters'" .format (api_version ))
164195 self ._config .api_version = api_version
@@ -171,6 +202,7 @@ def open_shift_versions(self):
171202 * 2022-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftVersionsOperations>`
172203 * 2023-04-01: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftVersionsOperations>`
173204 * 2023-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftVersionsOperations>`
205+ * 2023-11-22: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftVersionsOperations>`
174206 """
175207 api_version = self ._get_api_version ('open_shift_versions' )
176208 if api_version == '2022-09-04' :
@@ -179,6 +211,8 @@ def open_shift_versions(self):
179211 from .v2023_04_01 .operations import OpenShiftVersionsOperations as OperationClass
180212 elif api_version == '2023-09-04' :
181213 from .v2023_09_04 .operations import OpenShiftVersionsOperations as OperationClass
214+ elif api_version == '2023-11-22' :
215+ from .v2023_11_22 .operations import OpenShiftVersionsOperations as OperationClass
182216 else :
183217 raise ValueError ("API version {} does not have operation group 'open_shift_versions'" .format (api_version ))
184218 self ._config .api_version = api_version
@@ -194,6 +228,7 @@ def operations(self):
194228 * 2022-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2022_09_04.operations.Operations>`
195229 * 2023-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2023_04_01.operations.Operations>`
196230 * 2023-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2023_09_04.operations.Operations>`
231+ * 2023-11-22: :class:`Operations<azure.mgmt.redhatopenshift.v2023_11_22.operations.Operations>`
197232 """
198233 api_version = self ._get_api_version ('operations' )
199234 if api_version == '2020-04-30' :
@@ -208,6 +243,8 @@ def operations(self):
208243 from .v2023_04_01 .operations import Operations as OperationClass
209244 elif api_version == '2023-09-04' :
210245 from .v2023_09_04 .operations import Operations as OperationClass
246+ elif api_version == '2023-11-22' :
247+ from .v2023_11_22 .operations import Operations as OperationClass
211248 else :
212249 raise ValueError ("API version {} does not have operation group 'operations'" .format (api_version ))
213250 self ._config .api_version = api_version
@@ -220,6 +257,7 @@ def secrets(self):
220257 * 2022-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SecretsOperations>`
221258 * 2023-04-01: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SecretsOperations>`
222259 * 2023-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SecretsOperations>`
260+ * 2023-11-22: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SecretsOperations>`
223261 """
224262 api_version = self ._get_api_version ('secrets' )
225263 if api_version == '2022-09-04' :
@@ -228,6 +266,8 @@ def secrets(self):
228266 from .v2023_04_01 .operations import SecretsOperations as OperationClass
229267 elif api_version == '2023-09-04' :
230268 from .v2023_09_04 .operations import SecretsOperations as OperationClass
269+ elif api_version == '2023-11-22' :
270+ from .v2023_11_22 .operations import SecretsOperations as OperationClass
231271 else :
232272 raise ValueError ("API version {} does not have operation group 'secrets'" .format (api_version ))
233273 self ._config .api_version = api_version
@@ -240,6 +280,7 @@ def sync_identity_providers(self):
240280 * 2022-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncIdentityProvidersOperations>`
241281 * 2023-04-01: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncIdentityProvidersOperations>`
242282 * 2023-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncIdentityProvidersOperations>`
283+ * 2023-11-22: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncIdentityProvidersOperations>`
243284 """
244285 api_version = self ._get_api_version ('sync_identity_providers' )
245286 if api_version == '2022-09-04' :
@@ -248,6 +289,8 @@ def sync_identity_providers(self):
248289 from .v2023_04_01 .operations import SyncIdentityProvidersOperations as OperationClass
249290 elif api_version == '2023-09-04' :
250291 from .v2023_09_04 .operations import SyncIdentityProvidersOperations as OperationClass
292+ elif api_version == '2023-11-22' :
293+ from .v2023_11_22 .operations import SyncIdentityProvidersOperations as OperationClass
251294 else :
252295 raise ValueError ("API version {} does not have operation group 'sync_identity_providers'" .format (api_version ))
253296 self ._config .api_version = api_version
@@ -260,6 +303,7 @@ def sync_sets(self):
260303 * 2022-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncSetsOperations>`
261304 * 2023-04-01: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncSetsOperations>`
262305 * 2023-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncSetsOperations>`
306+ * 2023-11-22: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncSetsOperations>`
263307 """
264308 api_version = self ._get_api_version ('sync_sets' )
265309 if api_version == '2022-09-04' :
@@ -268,6 +312,8 @@ def sync_sets(self):
268312 from .v2023_04_01 .operations import SyncSetsOperations as OperationClass
269313 elif api_version == '2023-09-04' :
270314 from .v2023_09_04 .operations import SyncSetsOperations as OperationClass
315+ elif api_version == '2023-11-22' :
316+ from .v2023_11_22 .operations import SyncSetsOperations as OperationClass
271317 else :
272318 raise ValueError ("API version {} does not have operation group 'sync_sets'" .format (api_version ))
273319 self ._config .api_version = api_version
0 commit comments