You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -190,26 +187,20 @@ class AppConfigProvider extends BaseProvider {
190
187
privatereadonlyapplication?: string;
191
188
privatereadonlyenvironment: string;
192
189
193
-
/**
194
-
* initializes an `AppConfigProvider` class instance.
195
-
*
196
-
* @param options - The configuration object.
197
-
* @param options.environment - The environment ID or the environment name.
198
-
* @param options.application - Optional application ID or the application name.
199
-
* @param options.clientConfig - Optional configuration to pass during client initialization, e.g. AWS region. Mutually exclusive with `awsSdkV3Client`. Accepts the same configuration object as the AWS SDK v3 client ({@link AppConfigDataClientConfig | `AppConfigDataClientConfig`}).
200
-
* @param options.awsSdkV3Client - Optional ({@link AppConfigDataClient | `AppConfigDataClient`}) instance to pass during `AppConfigProvider` class instantiation. Mutually exclusive with `clientConfig`.
* The Parameters utility provides an AppConfigProvider that allows to retrieve configuration profiles from AWS AppConfig.
9
+
* The Parameters utility provides an `AppConfigProvider` that allows to retrieve configuration profiles from AWS AppConfig.
11
10
*
12
-
* ## Getting started
13
-
*
14
-
* This utility supports AWS SDK v3 for JavaScript only. This allows the utility to be modular, and you to install only
11
+
* This utility supports AWS SDK v3 for JavaScript only (`@aws-sdk/client-appconfigdata`). This allows the utility to be modular, and you to install only
15
12
* the SDK packages you need and keep your bundle size small.
16
13
*
17
-
* To use the provider, you must install the Parameters utility and the AWS SDK v3 for JavaScript for AppConfig:
* const config = new TextDecoder('utf-8').decode(encodedConfig);
67
+
* // Use the config variable as needed
68
+
* console.log
74
69
* };
75
70
* ```
76
71
*
77
-
* ### Transformations
72
+
* **Transformations**
78
73
*
79
74
* For configurations stored as freeform JSON, Freature Flag, you can use the transform argument for deserialization. This will return a JavaScript object instead of a string.
80
75
*
81
76
* @example
82
77
* ```typescript
83
78
* import { getAppConfig } from '@aws-lambda-powertools/parameters/appconfig';
@@ -108,7 +106,7 @@ import { AppConfigProvider } from './AppConfigProvider.js';
108
106
* };
109
107
* ```
110
108
*
111
-
* ### Extra SDK options
109
+
* **Extra SDK options**
112
110
*
113
111
* When retrieving a configuration profile, you can pass extra options to the AWS SDK v3 for JavaScript client by using the `sdkOptions` parameter.
114
112
*
@@ -131,15 +129,18 @@ import { AppConfigProvider } from './AppConfigProvider.js';
131
129
*
132
130
* This object accepts the same options as the [AWS SDK v3 for JavaScript AppConfigData client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-appconfigdata/interfaces/startconfigurationsessioncommandinput.html).
133
131
*
134
-
* ### Built-in provider class
132
+
* For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use the {@link AppConfigProvider | `AppConfigProvider`} class.
135
133
*
136
-
* For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use the {@link AppConfigProvider} class.
137
-
*
138
-
* For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/features/parameters/).
139
-
*
140
-
* @param {string} name - The name of the configuration profile or its ID
141
-
* @param {GetAppConfigOptions} options - Options to configure the provider
* @param config.valueAttr - Optional DynamoDB table value attribute name. Defaults to 'value'.
245
-
* @param config.clientConfig - Optional configuration to pass during client initialization, e.g. AWS region. Mutually exclusive with `awsSdkV3Client`, accepts the same options as the AWS SDK v3 client ({@link DynamoDBClient | `DynamoDBClient`}).
246
-
* @param config.awsSdkV3Client - Optional AWS SDK v3 client to pass during DynamoDBProvider class instantiation. Mutually exclusive with `clientConfig`, should be an instance of {@link DynamoDBClient | `DynamoDBClient`}.
@@ -362,12 +351,12 @@ class DynamoDBProvider extends BaseProvider {
362
351
* @param options - Options to customize the retrieval
363
352
* @param options.maxAge - Maximum age of the value in the cache, in seconds.
364
353
* @param options.sdkOptions - Additional options to pass to the AWS SDK v3 client, supports all options from {@link GetItemCommandInput | `GetItemCommandInput`} except `Key`, `TableName`, and `ProjectionExpression`.
365
-
* @paramparams.forceFetch - Force fetch the value from the parameter store, ignoring the cache.
354
+
* @paramoptions.forceFetch - Force fetch the value from the parameter store, ignoring the cache.
366
355
* @param options.transform - Transform to be applied, can be 'json' or 'binary'.
367
356
*/
368
357
protectedasync_get(
369
358
name: string,
370
-
options?: DynamoDBGetOptions
359
+
options?: NonNullable<DynamoDBGetOptions>
371
360
): Promise<JSONValue|undefined>{
372
361
constsdkOptions: GetItemCommandInput={
373
362
...(options?.sdkOptions||{}),
@@ -396,7 +385,7 @@ class DynamoDBProvider extends BaseProvider {
Copy file name to clipboardExpand all lines: packages/parameters/src/secrets/getSecret.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,6 @@ import { SecretsProvider } from './SecretsProvider.js';
97
97
* @param options.forceFetch - Whether to always fetch a new value from the store regardless if already available in cache (default: `false`)
98
98
* @param options.transform - Whether to transform the value before returning it. Supported values: `json`, `binary`
99
99
* @param options.sdkOptions - Extra options to pass to the AWS SDK v3 for JavaScript client, accepts the same configuration object as the AWS SDK v3 client ({@link SecretsManagerClientConfig | `SecretsManagerClientConfig`}).
100
-
* @param options.decrypt - Whether to decrypt the value before returning it. (default: `false`)
0 commit comments