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
20- from ._serialization import Deserializer , Serializer
22+ from ._utils . serialization import Deserializer , Serializer
2123from .operations import (
2224 ArcSettingsOperations ,
2325 ClustersOperations ,
2426 DeploymentSettingsOperations ,
2527 EdgeDevicesOperations ,
2628 ExtensionsOperations ,
29+ GalleryImagesOperations ,
30+ GuestAgentOperations ,
31+ GuestAgentsOperations ,
32+ HybridIdentityMetadataOperations ,
33+ LogicalNetworksOperations ,
34+ MarketplaceGalleryImagesOperations ,
35+ NetworkInterfacesOperations ,
2736 OffersOperations ,
2837 Operations ,
2938 PublishersOperations ,
3039 SecuritySettingsOperations ,
3140 SkusOperations ,
41+ StorageContainersOperations ,
3242 UpdateRunsOperations ,
3343 UpdateSummariesOperations ,
3444 UpdatesOperations ,
45+ VirtualHardDisksOperations ,
46+ VirtualMachineInstancesOperations ,
3547)
3648
3749if TYPE_CHECKING :
38- # pylint: disable=unused-import,ungrouped-imports
3950 from azure .core .credentials import TokenCredential
4051
4152
42- class AzureStackHCIClient : # pylint: disable=client-accepts-api-version-keyword, too-many-instance-attributes
53+ class AzureStackHCIClient : # pylint: disable=too-many-instance-attributes
4354 """Azure Stack HCI management service.
4455
4556 :ivar arc_settings: ArcSettingsOperations operations
@@ -52,6 +63,15 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
5263 :vartype edge_devices: azure.mgmt.azurestackhci.operations.EdgeDevicesOperations
5364 :ivar extensions: ExtensionsOperations operations
5465 :vartype extensions: azure.mgmt.azurestackhci.operations.ExtensionsOperations
66+ :ivar gallery_images: GalleryImagesOperations operations
67+ :vartype gallery_images: azure.mgmt.azurestackhci.operations.GalleryImagesOperations
68+ :ivar logical_networks: LogicalNetworksOperations operations
69+ :vartype logical_networks: azure.mgmt.azurestackhci.operations.LogicalNetworksOperations
70+ :ivar marketplace_gallery_images: MarketplaceGalleryImagesOperations operations
71+ :vartype marketplace_gallery_images:
72+ azure.mgmt.azurestackhci.operations.MarketplaceGalleryImagesOperations
73+ :ivar network_interfaces: NetworkInterfacesOperations operations
74+ :vartype network_interfaces: azure.mgmt.azurestackhci.operations.NetworkInterfacesOperations
5575 :ivar offers: OffersOperations operations
5676 :vartype offers: azure.mgmt.azurestackhci.operations.OffersOperations
5777 :ivar operations: Operations operations
@@ -62,35 +82,51 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
6282 :vartype security_settings: azure.mgmt.azurestackhci.operations.SecuritySettingsOperations
6383 :ivar skus: SkusOperations operations
6484 :vartype skus: azure.mgmt.azurestackhci.operations.SkusOperations
85+ :ivar storage_containers: StorageContainersOperations operations
86+ :vartype storage_containers: azure.mgmt.azurestackhci.operations.StorageContainersOperations
6587 :ivar update_runs: UpdateRunsOperations operations
6688 :vartype update_runs: azure.mgmt.azurestackhci.operations.UpdateRunsOperations
6789 :ivar update_summaries: UpdateSummariesOperations operations
6890 :vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
6991 :ivar updates: UpdatesOperations operations
7092 :vartype updates: azure.mgmt.azurestackhci.operations.UpdatesOperations
93+ :ivar virtual_hard_disks: VirtualHardDisksOperations operations
94+ :vartype virtual_hard_disks: azure.mgmt.azurestackhci.operations.VirtualHardDisksOperations
95+ :ivar virtual_machine_instances: VirtualMachineInstancesOperations operations
96+ :vartype virtual_machine_instances:
97+ azure.mgmt.azurestackhci.operations.VirtualMachineInstancesOperations
98+ :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
99+ :vartype hybrid_identity_metadata:
100+ azure.mgmt.azurestackhci.operations.HybridIdentityMetadataOperations
101+ :ivar guest_agent: GuestAgentOperations operations
102+ :vartype guest_agent: azure.mgmt.azurestackhci.operations.GuestAgentOperations
103+ :ivar guest_agents: GuestAgentsOperations operations
104+ :vartype guest_agents: azure.mgmt.azurestackhci.operations.GuestAgentsOperations
71105 :param credential: Credential needed for the client to connect to Azure. Required.
72106 :type credential: ~azure.core.credentials.TokenCredential
73- :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
107+ :param subscription_id: The ID of the target subscription. Required.
74108 :type subscription_id: str
75- :param base_url: Service URL. Default value is "https://management.azure.com" .
109+ :param base_url: Service URL. Default value is None .
76110 :type base_url: str
77- :keyword api_version: Api Version. Default value is "2024-04 -01". Note that overriding this
111+ :keyword api_version: Api Version. Default value is "2024-01 -01". Note that overriding this
78112 default value may result in unsupported behavior.
79113 :paramtype api_version: str
80114 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
81115 Retry-After header is present.
82116 """
83117
84118 def __init__ (
85- self ,
86- credential : "TokenCredential" ,
87- subscription_id : str ,
88- base_url : str = "https://management.azure.com" ,
89- ** kwargs : Any
119+ self , credential : "TokenCredential" , subscription_id : str , base_url : Optional [str ] = None , ** kwargs : Any
90120 ) -> None :
121+ _cloud = kwargs .pop ("cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
122+ _endpoints = get_arm_endpoints (_cloud )
123+ if not base_url :
124+ base_url = _endpoints ["resource_manager" ]
125+ credential_scopes = kwargs .pop ("credential_scopes" , _endpoints ["credential_scopes" ])
91126 self ._config = AzureStackHCIClientConfiguration (
92- credential = credential , subscription_id = subscription_id , ** kwargs
127+ credential = credential , subscription_id = subscription_id , credential_scopes = credential_scopes , ** kwargs
93128 )
129+
94130 _policies = kwargs .pop ("policies" , None )
95131 if _policies is None :
96132 _policies = [
@@ -109,7 +145,7 @@ def __init__(
109145 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
110146 self ._config .http_logging_policy ,
111147 ]
112- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
148+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = cast ( str , base_url ) , policies = _policies , ** kwargs )
113149
114150 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
115151 self ._serialize = Serializer (client_models )
@@ -122,18 +158,42 @@ def __init__(
122158 )
123159 self .edge_devices = EdgeDevicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
124160 self .extensions = ExtensionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
161+ self .gallery_images = GalleryImagesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
162+ self .logical_networks = LogicalNetworksOperations (
163+ self ._client , self ._config , self ._serialize , self ._deserialize
164+ )
165+ self .marketplace_gallery_images = MarketplaceGalleryImagesOperations (
166+ self ._client , self ._config , self ._serialize , self ._deserialize
167+ )
168+ self .network_interfaces = NetworkInterfacesOperations (
169+ self ._client , self ._config , self ._serialize , self ._deserialize
170+ )
125171 self .offers = OffersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
126172 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
127173 self .publishers = PublishersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
128174 self .security_settings = SecuritySettingsOperations (
129175 self ._client , self ._config , self ._serialize , self ._deserialize
130176 )
131177 self .skus = SkusOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
178+ self .storage_containers = StorageContainersOperations (
179+ self ._client , self ._config , self ._serialize , self ._deserialize
180+ )
132181 self .update_runs = UpdateRunsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
133182 self .update_summaries = UpdateSummariesOperations (
134183 self ._client , self ._config , self ._serialize , self ._deserialize
135184 )
136185 self .updates = UpdatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
186+ self .virtual_hard_disks = VirtualHardDisksOperations (
187+ self ._client , self ._config , self ._serialize , self ._deserialize
188+ )
189+ self .virtual_machine_instances = VirtualMachineInstancesOperations (
190+ self ._client , self ._config , self ._serialize , self ._deserialize
191+ )
192+ self .hybrid_identity_metadata = HybridIdentityMetadataOperations (
193+ self ._client , self ._config , self ._serialize , self ._deserialize
194+ )
195+ self .guest_agent = GuestAgentOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
196+ self .guest_agents = GuestAgentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
137197
138198 def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
139199 """Runs the network request through the client's chained policies.
0 commit comments