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 NetAppManagementClientConfiguration
20- from ._serialization import Deserializer , Serializer
22+ from ._utils . serialization import Deserializer , Serializer
2123from .operations import (
2224 AccountsOperations ,
2325 BackupPoliciesOperations ,
2628 BackupsUnderAccountOperations ,
2729 BackupsUnderBackupVaultOperations ,
2830 BackupsUnderVolumeOperations ,
31+ BucketsOperations ,
2932 NetAppResourceOperations ,
33+ NetAppResourceQuotaLimitsAccountOperations ,
3034 NetAppResourceQuotaLimitsOperations ,
3135 NetAppResourceRegionInfosOperations ,
3236 NetAppResourceUsagesOperations ,
@@ -79,6 +83,10 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
7983 :vartype subvolumes: azure.mgmt.netapp.operations.SubvolumesOperations
8084 :ivar backups: BackupsOperations operations
8185 :vartype backups: azure.mgmt.netapp.operations.BackupsOperations
86+ :ivar net_app_resource_quota_limits_account: NetAppResourceQuotaLimitsAccountOperations
87+ operations
88+ :vartype net_app_resource_quota_limits_account:
89+ azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsAccountOperations
8290 :ivar backup_vaults: BackupVaultsOperations operations
8391 :vartype backup_vaults: azure.mgmt.netapp.operations.BackupVaultsOperations
8492 :ivar backups_under_backup_vault: BackupsUnderBackupVaultOperations operations
@@ -88,29 +96,33 @@ class NetAppManagementClient: # pylint: disable=too-many-instance-attributes
8896 :vartype backups_under_volume: azure.mgmt.netapp.operations.BackupsUnderVolumeOperations
8997 :ivar backups_under_account: BackupsUnderAccountOperations operations
9098 :vartype backups_under_account: azure.mgmt.netapp.operations.BackupsUnderAccountOperations
99+ :ivar buckets: BucketsOperations operations
100+ :vartype buckets: azure.mgmt.netapp.operations.BucketsOperations
91101 :param credential: Credential needed for the client to connect to Azure. Required.
92102 :type credential: ~azure.core.credentials.TokenCredential
93103 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
94104 :type subscription_id: str
95- :param base_url: Service URL. Default value is "https://management.azure.com" .
105+ :param base_url: Service URL. Default value is None .
96106 :type base_url: str
97- :keyword api_version: Api Version. Default value is "2025-01-01". Note that overriding this
98- default value may result in unsupported behavior.
107+ :keyword api_version: Api Version. Default value is "2025-01-01-preview ". Note that overriding
108+ this default value may result in unsupported behavior.
99109 :paramtype api_version: str
100110 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
101111 Retry-After header is present.
102112 """
103113
104114 def __init__ (
105- self ,
106- credential : "TokenCredential" ,
107- subscription_id : str ,
108- base_url : str = "https://management.azure.com" ,
109- ** kwargs : Any
115+ self , credential : "TokenCredential" , subscription_id : str , base_url : Optional [str ] = None , ** kwargs : Any
110116 ) -> None :
117+ _cloud = kwargs .pop ("cloud_setting" , None ) or settings .current .azure_cloud # type: ignore
118+ _endpoints = get_arm_endpoints (_cloud )
119+ if not base_url :
120+ base_url = _endpoints ["resource_manager" ]
121+ credential_scopes = kwargs .pop ("credential_scopes" , _endpoints ["credential_scopes" ])
111122 self ._config = NetAppManagementClientConfiguration (
112- credential = credential , subscription_id = subscription_id , ** kwargs
123+ credential = credential , subscription_id = subscription_id , credential_scopes = credential_scopes , ** kwargs
113124 )
125+
114126 _policies = kwargs .pop ("policies" , None )
115127 if _policies is None :
116128 _policies = [
@@ -129,7 +141,7 @@ def __init__(
129141 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
130142 self ._config .http_logging_policy ,
131143 ]
132- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
144+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = cast ( str , base_url ) , policies = _policies , ** kwargs )
133145
134146 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
135147 self ._serialize = Serializer (client_models )
@@ -160,6 +172,9 @@ def __init__(
160172 self .volume_groups = VolumeGroupsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
161173 self .subvolumes = SubvolumesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
162174 self .backups = BackupsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
175+ self .net_app_resource_quota_limits_account = NetAppResourceQuotaLimitsAccountOperations (
176+ self ._client , self ._config , self ._serialize , self ._deserialize
177+ )
163178 self .backup_vaults = BackupVaultsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
164179 self .backups_under_backup_vault = BackupsUnderBackupVaultOperations (
165180 self ._client , self ._config , self ._serialize , self ._deserialize
@@ -170,6 +185,7 @@ def __init__(
170185 self .backups_under_account = BackupsUnderAccountOperations (
171186 self ._client , self ._config , self ._serialize , self ._deserialize
172187 )
188+ self .buckets = BucketsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
173189
174190 def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
175191 """Runs the network request through the client's chained policies.
0 commit comments