Skip to content

Commit b078161

Browse files
committed
docs: updates api docs for SecretsProvider
1 parent 10f5810 commit b078161

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

Diff for: packages/parameters/src/types/SecretsProvider.ts

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,48 @@
11
import type { GetOptionsInterface } from './BaseProvider';
22
import type { SecretsManagerClient, SecretsManagerClientConfig, GetSecretValueCommandInput } from '@aws-sdk/client-secrets-manager';
33

4+
/**
5+
* Base interface for SecretsProviderOptions.
6+
*
7+
* @interface
8+
* @property {SecretsManagerClientConfig} [clientConfig] - Optional configuration to pass during client initialization, e.g. AWS region.
9+
* @property {never} [awsSdkV3Client] - This property should never be passed.
10+
*/
411
interface SecretsProviderOptionsWithClientConfig {
512
clientConfig?: SecretsManagerClientConfig
613
awsSdkV3Client?: never
714
}
815

16+
/**
17+
* Interface for SecretsProviderOptions with awsSdkV3Client property.
18+
*
19+
* @interface
20+
* @extends SecretsProviderOptionsWithClientConfig
21+
* @property {SecretsManagerClient} [awsSdkV3Client] - Optional AWS SDK v3 client to pass during SecretsProvider class instantiation
22+
* @property {never} [clientConfig] - This property should never be passed.
23+
*/
924
interface SecretsProviderOptionsWithClientInstance {
1025
awsSdkV3Client?: SecretsManagerClient
1126
clientConfig?: never
1227
}
1328

1429
/**
15-
* Options to configure the SecretsProvider.
30+
* Options for the SecretsProvider class constructor.
31+
*
32+
* @type SecretsProviderOptions
33+
* @property {AppConfigDataClientConfig} [clientConfig] - Optional configuration to pass during client initialization, e.g. AWS region. Mutually exclusive with awsSdkV3Client.
34+
* @property {AppConfigDataClient} [awsSdkV3Client] - Optional AWS SDK v3 client to pass during SecretsProvider class instantiation. Mutually exclusive with clientConfig.
1635
*/
1736
type SecretsProviderOptions = SecretsProviderOptionsWithClientConfig | SecretsProviderOptionsWithClientInstance;
1837

1938
/**
2039
* Options to configure the retrieval of a secret.
2140
*
41+
* @interface SecretsGetOptionsInterface
42+
* @extends {GetOptionsInterface}
2243
* @property {number} maxAge - Maximum age of the value in the cache, in seconds.
2344
* @property {boolean} forceFetch - Force fetch the value from the parameter store, ignoring the cache.
24-
* @property {Omit<Partial<GetSecretValueCommandInput>, 'SecretId'>} sdkOptions - Options to pass to the underlying SDK.
45+
* @property {GetSecretValueCommandInput} sdkOptions - Options to pass to the underlying SDK.
2546
* @property {TransformOptions} transform - Transform to be applied, can be 'json' or 'binary'.
2647
*/
2748
interface SecretsGetOptionsInterface extends GetOptionsInterface {

0 commit comments

Comments
 (0)