@@ -15,6 +15,11 @@ class SSMProvider(BaseProvider):
15
15
"""
16
16
AWS Systems Manager Parameter Store Provider
17
17
18
+ Parameters
19
+ ----------
20
+ config: botocore.config.Config, optional
21
+ Botocore configuration to pass during client initialization
22
+
18
23
Example
19
24
-------
20
25
**Retrieves a parameter value from Systems Manager Parameter Store**
@@ -71,9 +76,9 @@ def _get(self, name: str, decrypt: bool = False, **sdk_options) -> str:
71
76
----------
72
77
name: str
73
78
Parameter name
74
- decrypt: bool
79
+ decrypt: bool, optional
75
80
If the parameter value should be decrypted
76
- sdk_options: dict
81
+ sdk_options: dict, optional
77
82
Dictionary of options that will be passed to the get_parameter call
78
83
"""
79
84
@@ -91,11 +96,11 @@ def _get_multiple(self, path: str, decrypt: bool = False, recursive: bool = Fals
91
96
----------
92
97
path: str
93
98
Path to retrieve the parameters
94
- decrypt: bool
99
+ decrypt: bool, optional
95
100
If the parameter values should be decrypted
96
- recursive: bool
101
+ recursive: bool, optional
97
102
If this should retrieve the parameter values recursively or not
98
- sdk_options: dict
103
+ sdk_options: dict, optional
99
104
Dictionary of options that will be passed to the get_parameters_by_path call
100
105
"""
101
106
@@ -131,9 +136,32 @@ def _get_multiple(self, path: str, decrypt: bool = False, recursive: bool = Fals
131
136
return retval
132
137
133
138
134
- def get_parameter (name : str , transform : Optional [str ] = None ) -> Union [str , list , dict , bytes ]:
139
+ def get_parameter (name : str , transform : Optional [str ] = None , ** sdk_options ) -> Union [str , list , dict , bytes ]:
135
140
"""
136
141
Retrieve a parameter value from AWS Systems Manager (SSM) Parameter Store
142
+
143
+ Parameters
144
+ ----------
145
+ name: str
146
+ Name of the parameter
147
+ transform: str, optional
148
+ Transforms the content from a JSON object ('json') or base64 binary string ('binary')
149
+ sdk_options: dict, optional
150
+ Dictionary of options that will be passed to the get_secret_value call
151
+
152
+ Example
153
+ -------
154
+ **Retrieves a parameter value from Systems Manager Parameter Store**
155
+
156
+ >>> from aws_lambda_powertools.utilities.parameters import get_parameter
157
+ >>>
158
+ >>> get_parameter("/my/parameter")
159
+
160
+ **Retrieves a parameter value and decodes it using a Base64 decoder**
161
+
162
+ >>> from aws_lambda_powertools.utilities.parameters import get_parameter
163
+ >>>
164
+ >>> get_parameter("/my/parameter", transform='binary')
137
165
"""
138
166
139
167
# Only create the provider if this function is called at least once
@@ -144,10 +172,37 @@ def get_parameter(name: str, transform: Optional[str] = None) -> Union[str, list
144
172
145
173
146
174
def get_parameters (
147
- path : str , transform : Optional [str ] = None , recursive : bool = False , decrypt : bool = False
175
+ path : str , transform : Optional [str ] = None , recursive : bool = False , decrypt : bool = False , ** sdk_options
148
176
) -> Union [Dict [str , str ], Dict [str , dict ], Dict [str , bytes ]]:
149
177
"""
150
178
Retrieve multiple parameter values from AWS Systems Manager (SSM) Parameter Store
179
+
180
+ Parameters
181
+ ----------
182
+ path: str
183
+ Path to retrieve the parameters
184
+ transform: str, optional
185
+ Transforms the content from a JSON object ('json') or base64 binary string ('binary')
186
+ decrypt: bool, optional
187
+ If the parameter values should be decrypted
188
+ recursive: bool, optional
189
+ If this should retrieve the parameter values recursively or not
190
+ sdk_options: dict, optional
191
+ Dictionary of options that will be passed to the get_parameters_by_path call
192
+
193
+ Example
194
+ -------
195
+ **Retrieves parameter values from Systems Manager Parameter Store**
196
+
197
+ >>> from aws_lambda_powertools.utilities.parameters import get_parameter
198
+ >>>
199
+ >>> get_parameters("/my/path/parameter")
200
+
201
+ **Retrieves parameter values and decodes them using a Base64 decoder**
202
+
203
+ >>> from aws_lambda_powertools.utilities.parameters import get_parameter
204
+ >>>
205
+ >>> get_parameters("/my/path/parameter", transform='binary')
151
206
"""
152
207
153
208
# Only create the provider if this function is called at least once
0 commit comments