@@ -50,7 +50,8 @@ def __init__(
50
50
retries = None ,
51
51
backoff = None ,
52
52
config_files = None ,
53
- profile = None
53
+ profile = None ,
54
+ kms_endpoint_url = None
54
55
):
55
56
"""Create a ConfidantClient object.
56
57
@@ -78,6 +79,8 @@ def __init__(
78
79
configuration from. First file found will be used. Default:
79
80
['~/.confidant', '/etc/confidant/config']
80
81
profile: profile to read config values from.
82
+ kms_endpoint_url: A URL to override the default endpoint used to
83
+ access the KMS service. Default: None
81
84
"""
82
85
# Set defaults
83
86
self .config = {
@@ -90,7 +93,8 @@ def __init__(
90
93
'assume_role' : None ,
91
94
'region' : None ,
92
95
'retries' : 0 ,
93
- 'backoff' : 1
96
+ 'backoff' : 1 ,
97
+ 'kms_endpoint_url' : None
94
98
}
95
99
if config_files is None :
96
100
config_files = ['~/.confidant' , '/etc/confidant/config' ]
@@ -108,7 +112,8 @@ def __init__(
108
112
'token_cache_file' : token_cache_file ,
109
113
'region' : region ,
110
114
'backoff' : backoff ,
111
- 'assume_role' : assume_role
115
+ 'assume_role' : assume_role ,
116
+ 'kms_endpoint_url' : kms_endpoint_url
112
117
}
113
118
for key , val in args_config .iteritems ():
114
119
if val is not None :
@@ -157,7 +162,8 @@ def __init__(
157
162
token_version = self .config ['token_version' ],
158
163
token_cache_file = self .config ['token_cache_file' ],
159
164
token_lifetime = self .config ['token_lifetime' ],
160
- aws_creds = self .aws_creds
165
+ aws_creds = self .aws_creds ,
166
+ endpoint_url = self .config ['kms_endpoint_url' ]
161
167
)
162
168
except kmsauth .ConfigurationError :
163
169
raise ClientConfigurationError ('Error configuring kmsauth client.' )
0 commit comments