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 AzureStackHCIClientConfiguration
2224 ArcSettingsOperations ,
2325 ClustersOperations ,
2426 DeploymentSettingsOperations ,
27+ EdgeDeviceJobsOperations ,
2528 EdgeDevicesOperations ,
2629 ExtensionsOperations ,
2730 OffersOperations ,
3235 UpdateRunsOperations ,
3336 UpdateSummariesOperations ,
3437 UpdatesOperations ,
38+ ValidatedSolutionRecipesOperations ,
3539)
3640
3741if TYPE_CHECKING :
38- # pylint: disable=unused-import,ungrouped-imports
3942 from azure .core .credentials import TokenCredential
4043
4144
42- class AzureStackHCIClient : # pylint: disable=client-accepts-api-version-keyword, too-many-instance-attributes
45+ class AzureStackHCIClient : # pylint: disable=too-many-instance-attributes
4346 """Azure Stack HCI management service.
4447
4548 :ivar arc_settings: ArcSettingsOperations operations
@@ -48,6 +51,8 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
4851 :vartype clusters: azure.mgmt.azurestackhci.operations.ClustersOperations
4952 :ivar deployment_settings: DeploymentSettingsOperations operations
5053 :vartype deployment_settings: azure.mgmt.azurestackhci.operations.DeploymentSettingsOperations
54+ :ivar edge_device_jobs: EdgeDeviceJobsOperations operations
55+ :vartype edge_device_jobs: azure.mgmt.azurestackhci.operations.EdgeDeviceJobsOperations
5156 :ivar edge_devices: EdgeDevicesOperations operations
5257 :vartype edge_devices: azure.mgmt.azurestackhci.operations.EdgeDevicesOperations
5358 :ivar extensions: ExtensionsOperations operations
@@ -64,33 +69,38 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
6469 :vartype skus: azure.mgmt.azurestackhci.operations.SkusOperations
6570 :ivar update_runs: UpdateRunsOperations operations
6671 :vartype update_runs: azure.mgmt.azurestackhci.operations.UpdateRunsOperations
67- :ivar update_summaries: UpdateSummariesOperations operations
68- :vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
6972 :ivar updates: UpdatesOperations operations
7073 :vartype updates: azure.mgmt.azurestackhci.operations.UpdatesOperations
74+ :ivar update_summaries: UpdateSummariesOperations operations
75+ :vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
76+ :ivar validated_solution_recipes: ValidatedSolutionRecipesOperations operations
77+ :vartype validated_solution_recipes:
78+ azure.mgmt.azurestackhci.operations.ValidatedSolutionRecipesOperations
7179 :param credential: Credential needed for the client to connect to Azure. Required.
7280 :type credential: ~azure.core.credentials.TokenCredential
7381 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
7482 :type subscription_id: str
75- :param base_url: Service URL. Default value is "https://management.azure.com" .
83+ :param base_url: Service URL. Default value is None .
7684 :type base_url: str
77- :keyword api_version: Api Version. Default value is "2024-04 -01". Note that overriding this
78- default value may result in unsupported behavior.
85+ :keyword api_version: Api Version. Default value is "2025-02 -01-preview ". Note that overriding
86+ this default value may result in unsupported behavior.
7987 :paramtype api_version: str
8088 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
8189 Retry-After header is present.
8290 """
8391
8492 def __init__ (
85- self ,
86- credential : "TokenCredential" ,
87- subscription_id : str ,
88- base_url : str = "https://management.azure.com" ,
89- ** kwargs : Any
93+ self , credential : "TokenCredential" , subscription_id : str , base_url : Optional [str ] = None , ** kwargs : Any
9094 ) -> None :
95+ _cloud = kwargs .pop ("cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
96+ _endpoints = get_arm_endpoints (_cloud )
97+ if not base_url :
98+ base_url = _endpoints ["resource_manager" ]
99+ credential_scopes = kwargs .pop ("credential_scopes" , _endpoints ["credential_scopes" ])
91100 self ._config = AzureStackHCIClientConfiguration (
92- credential = credential , subscription_id = subscription_id , ** kwargs
101+ credential = credential , subscription_id = subscription_id , credential_scopes = credential_scopes , ** kwargs
93102 )
103+
94104 _policies = kwargs .pop ("policies" , None )
95105 if _policies is None :
96106 _policies = [
@@ -109,7 +119,7 @@ def __init__(
109119 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
110120 self ._config .http_logging_policy ,
111121 ]
112- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
122+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = cast ( str , base_url ) , policies = _policies , ** kwargs )
113123
114124 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
115125 self ._serialize = Serializer (client_models )
@@ -120,6 +130,7 @@ def __init__(
120130 self .deployment_settings = DeploymentSettingsOperations (
121131 self ._client , self ._config , self ._serialize , self ._deserialize
122132 )
133+ self .edge_device_jobs = EdgeDeviceJobsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
123134 self .edge_devices = EdgeDevicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
124135 self .extensions = ExtensionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
125136 self .offers = OffersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -130,10 +141,13 @@ def __init__(
130141 )
131142 self .skus = SkusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
132143 self .update_runs = UpdateRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
144+ self .updates = UpdatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
133145 self .update_summaries = UpdateSummariesOperations (
134146 self ._client , self ._config , self ._serialize , self ._deserialize
135147 )
136- self .updates = UpdatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
148+ self .validated_solution_recipes = ValidatedSolutionRecipesOperations (
149+ self ._client , self ._config , self ._serialize , self ._deserialize
150+ )
137151
138152 def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
139153 """Runs the network request through the client's chained policies.
0 commit comments