1212from azure .core .rest import HttpRequest , HttpResponse
1313from azure .mgmt .core import ARMPipelineClient
1414
15- from . import models
15+ from . import models as _models
1616from ._configuration import RedisManagementClientConfiguration
1717from ._serialization import Deserializer , Serializer
1818from .operations import (
19+ AccessPolicyAssignmentOperations ,
20+ AccessPolicyOperations ,
1921 AsyncOperationStatusOperations ,
2022 FirewallRulesOperations ,
2123 LinkedServerOperations ,
@@ -51,14 +53,17 @@ class RedisManagementClient: # pylint: disable=client-accepts-api-version-keywo
5153 :vartype private_link_resources: azure.mgmt.redis.operations.PrivateLinkResourcesOperations
5254 :ivar async_operation_status: AsyncOperationStatusOperations operations
5355 :vartype async_operation_status: azure.mgmt.redis.operations.AsyncOperationStatusOperations
56+ :ivar access_policy: AccessPolicyOperations operations
57+ :vartype access_policy: azure.mgmt.redis.operations.AccessPolicyOperations
58+ :ivar access_policy_assignment: AccessPolicyAssignmentOperations operations
59+ :vartype access_policy_assignment: azure.mgmt.redis.operations.AccessPolicyAssignmentOperations
5460 :param credential: Credential needed for the client to connect to Azure. Required.
5561 :type credential: ~azure.core.credentials.TokenCredential
56- :param subscription_id: Gets subscription credentials which uniquely identify the Microsoft
57- Azure subscription. The subscription ID forms part of the URI for every service call. Required.
62+ :param subscription_id: The ID of the target subscription. Required.
5863 :type subscription_id: str
5964 :param base_url: Service URL. Default value is "https://management.azure.com".
6065 :type base_url: str
61- :keyword api_version: Api Version. Default value is "2022-06 -01". Note that overriding this
66+ :keyword api_version: Api Version. Default value is "2023-05 -01". Note that overriding this
6267 default value may result in unsupported behavior.
6368 :paramtype api_version: str
6469 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -75,9 +80,9 @@ def __init__(
7580 self ._config = RedisManagementClientConfiguration (
7681 credential = credential , subscription_id = subscription_id , ** kwargs
7782 )
78- self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
83+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
7984
80- client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
85+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
8186 self ._serialize = Serializer (client_models )
8287 self ._deserialize = Deserializer (client_models )
8388 self ._serialize .client_side_validation = False
@@ -95,6 +100,10 @@ def __init__(
95100 self .async_operation_status = AsyncOperationStatusOperations (
96101 self ._client , self ._config , self ._serialize , self ._deserialize
97102 )
103+ self .access_policy = AccessPolicyOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
104+ self .access_policy_assignment = AccessPolicyAssignmentOperations (
105+ self ._client , self ._config , self ._serialize , self ._deserialize
106+ )
98107
99108 def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
100109 """Runs the network request through the client's chained policies.
@@ -118,15 +127,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
118127 request_copy .url = self ._client .format_url (request_copy .url )
119128 return self ._client .send_request (request_copy , ** kwargs )
120129
121- def close (self ):
122- # type: () -> None
130+ def close (self ) -> None :
123131 self ._client .close ()
124132
125- def __enter__ (self ):
126- # type: () -> RedisManagementClient
133+ def __enter__ (self ) -> "RedisManagementClient" :
127134 self ._client .__enter__ ()
128135 return self
129136
130- def __exit__ (self , * exc_details ):
131- # type: (Any) -> None
137+ def __exit__ (self , * exc_details : Any ) -> None :
132138 self ._client .__exit__ (* exc_details )
0 commit comments