2323 Operations ,
2424 PrivateEndpointConnectionsOperations ,
2525 PrivateLinksOperations ,
26+ ReplicasOperations ,
2627)
2728
2829if TYPE_CHECKING :
@@ -45,15 +46,16 @@ class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyw
4546 azure.mgmt.mongocluster.operations.PrivateEndpointConnectionsOperations
4647 :ivar private_links: PrivateLinksOperations operations
4748 :vartype private_links: azure.mgmt.mongocluster.operations.PrivateLinksOperations
49+ :ivar replicas: ReplicasOperations operations
50+ :vartype replicas: azure.mgmt.mongocluster.operations.ReplicasOperations
4851 :param credential: Credential used to authenticate requests to the service. Required.
4952 :type credential: ~azure.core.credentials.TokenCredential
5053 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5154 :type subscription_id: str
5255 :param base_url: Service host. Default value is "https://management.azure.com".
5356 :type base_url: str
54- :keyword api_version: The API version to use for this operation. Default value is
55- "2024-03-01-preview". Note that overriding this default value may result in unsupported
56- behavior.
57+ :keyword api_version: The API version to use for this operation. Default value is "2024-07-01".
58+ Note that overriding this default value may result in unsupported behavior.
5759 :paramtype api_version: str
5860 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5961 Retry-After header is present.
@@ -66,8 +68,9 @@ def __init__(
6668 base_url : str = "https://management.azure.com" ,
6769 ** kwargs : Any
6870 ) -> None :
71+ _endpoint = "{endpoint}"
6972 self ._config = MongoClusterMgmtClientConfiguration (
70- credential = credential , subscription_id = subscription_id , ** kwargs
73+ credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
7174 )
7275 _policies = kwargs .pop ("policies" , None )
7376 if _policies is None :
@@ -87,7 +90,7 @@ def __init__(
8790 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
8891 self ._config .http_logging_policy ,
8992 ]
90- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
93+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
9194
9295 self ._serialize = Serializer ()
9396 self ._deserialize = Deserializer ()
@@ -99,6 +102,7 @@ def __init__(
99102 self ._client , self ._config , self ._serialize , self ._deserialize
100103 )
101104 self .private_links = PrivateLinksOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
105+ self .replicas = ReplicasOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
102106
103107 def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
104108 """Runs the network request through the client's chained policies.
@@ -119,7 +123,11 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
119123 """
120124
121125 request_copy = deepcopy (request )
122- request_copy .url = self ._client .format_url (request_copy .url )
126+ path_format_arguments = {
127+ "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
128+ }
129+
130+ request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
123131 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
124132
125133 def close (self ) -> None :
0 commit comments