10
10
# --------------------------------------------------------------------------
11
11
from typing import Any , TYPE_CHECKING
12
12
13
- from azure .core .configuration import Configuration
14
13
from azure .core .pipeline import policies
15
14
from azure .mgmt .core .policies import ARMChallengeAuthenticationPolicy , ARMHttpLoggingPolicy
16
15
20
19
# pylint: disable=unused-import,ungrouped-imports
21
20
from azure .core .credentials import TokenCredential
22
21
23
-
24
- class AppConfigurationManagementClientConfiguration (Configuration ):
22
+ class AppConfigurationManagementClientConfiguration :
25
23
"""Configuration for AppConfigurationManagementClient.
26
24
27
25
Note that all parameters used to create this instance are saved as instance
@@ -33,30 +31,36 @@ class AppConfigurationManagementClientConfiguration(Configuration):
33
31
:type subscription_id: str
34
32
"""
35
33
36
- def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ):
34
+ def __init__ (
35
+ self ,
36
+ credential : "TokenCredential" ,
37
+ subscription_id : str ,
38
+ ** kwargs : Any
39
+ ):
37
40
if credential is None :
38
41
raise ValueError ("Parameter 'credential' must not be None." )
39
42
if subscription_id is None :
40
43
raise ValueError ("Parameter 'subscription_id' must not be None." )
41
- super (AppConfigurationManagementClientConfiguration , self ).__init__ (** kwargs )
42
44
43
45
self .credential = credential
44
46
self .subscription_id = subscription_id
45
- self .credential_scopes = kwargs .pop ("credential_scopes" , ["https://management.azure.com/.default" ])
46
- kwargs .setdefault ("sdk_moniker" , "azure-mgmt-appconfiguration/{}" .format (VERSION ))
47
+ self .credential_scopes = kwargs .pop ('credential_scopes' , ['https://management.azure.com/.default' ])
48
+ kwargs .setdefault ('sdk_moniker' , 'azure-mgmt-appconfiguration/{}' .format (VERSION ))
49
+ self .polling_interval = kwargs .get ("polling_interval" , 30 )
47
50
self ._configure (** kwargs )
48
51
49
- def _configure (self , ** kwargs : Any ):
50
- self .user_agent_policy = kwargs .get ("user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
51
- self .headers_policy = kwargs .get ("headers_policy" ) or policies .HeadersPolicy (** kwargs )
52
- self .proxy_policy = kwargs .get ("proxy_policy" ) or policies .ProxyPolicy (** kwargs )
53
- self .logging_policy = kwargs .get ("logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
54
- self .http_logging_policy = kwargs .get ("http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
55
- self .retry_policy = kwargs .get ("retry_policy" ) or policies .RetryPolicy (** kwargs )
56
- self .custom_hook_policy = kwargs .get ("custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
57
- self .redirect_policy = kwargs .get ("redirect_policy" ) or policies .RedirectPolicy (** kwargs )
58
- self .authentication_policy = kwargs .get ("authentication_policy" )
52
+ def _configure (
53
+ self ,
54
+ ** kwargs : Any
55
+ ):
56
+ self .user_agent_policy = kwargs .get ('user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
57
+ self .headers_policy = kwargs .get ('headers_policy' ) or policies .HeadersPolicy (** kwargs )
58
+ self .proxy_policy = kwargs .get ('proxy_policy' ) or policies .ProxyPolicy (** kwargs )
59
+ self .logging_policy = kwargs .get ('logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
60
+ self .http_logging_policy = kwargs .get ('http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
61
+ self .retry_policy = kwargs .get ('retry_policy' ) or policies .RetryPolicy (** kwargs )
62
+ self .custom_hook_policy = kwargs .get ('custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
63
+ self .redirect_policy = kwargs .get ('redirect_policy' ) or policies .RedirectPolicy (** kwargs )
64
+ self .authentication_policy = kwargs .get ('authentication_policy' )
59
65
if self .credential and not self .authentication_policy :
60
- self .authentication_policy = ARMChallengeAuthenticationPolicy (
61
- self .credential , * self .credential_scopes , ** kwargs
62
- )
66
+ self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
0 commit comments