@@ -25,19 +25,14 @@ class AutomationClientConfiguration(Configuration): # pylint: disable=too-many-
25
25
Note that all parameters used to create this instance are saved as instance
26
26
attributes.
27
27
28
- :param credential: Credential needed for the client to connect to Azure.
28
+ :param credential: Credential needed for the client to connect to Azure. Required.
29
29
:type credential: ~azure.core.credentials.TokenCredential
30
30
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
31
- subscription. The subscription ID forms part of the URI for every service call.
31
+ subscription. The subscription ID forms part of the URI for every service call. Required.
32
32
:type subscription_id: str
33
33
"""
34
34
35
- def __init__ (
36
- self ,
37
- credential : "TokenCredential" ,
38
- subscription_id : str ,
39
- ** kwargs : Any
40
- ) -> None :
35
+ def __init__ (self , credential : "TokenCredential" , subscription_id : str , ** kwargs : Any ) -> None :
41
36
super (AutomationClientConfiguration , self ).__init__ (** kwargs )
42
37
if credential is None :
43
38
raise ValueError ("Parameter 'credential' must not be None." )
@@ -46,23 +41,24 @@ def __init__(
46
41
47
42
self .credential = credential
48
43
self .subscription_id = subscription_id
49
- self .credential_scopes = kwargs .pop (' credential_scopes' , [' https://management.azure.com/.default' ])
50
- kwargs .setdefault (' sdk_moniker' , ' mgmt-automation/{}' .format (VERSION ))
44
+ self .credential_scopes = kwargs .pop (" credential_scopes" , [" https://management.azure.com/.default" ])
45
+ kwargs .setdefault (" sdk_moniker" , " mgmt-automation/{}" .format (VERSION ))
51
46
self ._configure (** kwargs )
52
47
53
48
def _configure (
54
- self ,
55
- ** kwargs # type: Any
49
+ self , ** kwargs # type: Any
56
50
):
57
51
# type: (...) -> None
58
- self .user_agent_policy = kwargs .get (' user_agent_policy' ) or policies .UserAgentPolicy (** kwargs )
59
- self .headers_policy = kwargs .get (' headers_policy' ) or policies .HeadersPolicy (** kwargs )
60
- self .proxy_policy = kwargs .get (' proxy_policy' ) or policies .ProxyPolicy (** kwargs )
61
- self .logging_policy = kwargs .get (' logging_policy' ) or policies .NetworkTraceLoggingPolicy (** kwargs )
62
- self .http_logging_policy = kwargs .get (' http_logging_policy' ) or ARMHttpLoggingPolicy (** kwargs )
63
- self .retry_policy = kwargs .get (' retry_policy' ) or policies .RetryPolicy (** kwargs )
64
- self .custom_hook_policy = kwargs .get (' custom_hook_policy' ) or policies .CustomHookPolicy (** kwargs )
65
- self .redirect_policy = kwargs .get (' redirect_policy' ) or policies .RedirectPolicy (** kwargs )
66
- self .authentication_policy = kwargs .get (' authentication_policy' )
52
+ self .user_agent_policy = kwargs .get (" user_agent_policy" ) or policies .UserAgentPolicy (** kwargs )
53
+ self .headers_policy = kwargs .get (" headers_policy" ) or policies .HeadersPolicy (** kwargs )
54
+ self .proxy_policy = kwargs .get (" proxy_policy" ) or policies .ProxyPolicy (** kwargs )
55
+ self .logging_policy = kwargs .get (" logging_policy" ) or policies .NetworkTraceLoggingPolicy (** kwargs )
56
+ self .http_logging_policy = kwargs .get (" http_logging_policy" ) or ARMHttpLoggingPolicy (** kwargs )
57
+ self .retry_policy = kwargs .get (" retry_policy" ) or policies .RetryPolicy (** kwargs )
58
+ self .custom_hook_policy = kwargs .get (" custom_hook_policy" ) or policies .CustomHookPolicy (** kwargs )
59
+ self .redirect_policy = kwargs .get (" redirect_policy" ) or policies .RedirectPolicy (** kwargs )
60
+ self .authentication_policy = kwargs .get (" authentication_policy" )
67
61
if self .credential and not self .authentication_policy :
68
- self .authentication_policy = ARMChallengeAuthenticationPolicy (self .credential , * self .credential_scopes , ** kwargs )
62
+ self .authentication_policy = ARMChallengeAuthenticationPolicy (
63
+ self .credential , * self .credential_scopes , ** kwargs
64
+ )
0 commit comments