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
thrownewSetParameterError(`Unable to set parameter with name ${name}`);
379
+
thrownewSetParameterError(`Unable to set parameter with name ${name}`,{
380
+
cause: error,
381
+
});
380
382
}
381
383
382
-
// biome-ignore lint/style/noNonNullAssertion: The API for PutParameter states that there will always be a value returned when the request was successful.
* const version = await setParameter('/my-parameter', { value: 'my-value' });
29
-
* console.log(Parameter version: ${version});
14
+
* export const handler = async () => {
15
+
* // Set a parameter
16
+
* const version = await setParameter('/my-parameter', { value: 'my-value' });
30
17
* };
31
18
* ```
32
19
*
33
-
* ## Advanced Usage
34
-
*
35
-
* ### Overwriting a parameter
20
+
* **Overwriting a parameter**
36
21
*
37
22
* By default, the provider will not overwrite a parameter if it already exists. You can force the provider to overwrite the parameter by using the `overwrite` option.
38
23
*
@@ -50,7 +35,7 @@ import { SSMProvider } from './SSMProvider.js';
50
35
* };
51
36
* ```
52
37
*
53
-
* ### Extra SDK options
38
+
* **Extra SDK options**
54
39
*
55
40
* When setting a parameter, you can pass extra options to the AWS SDK v3 for JavaScript client by using the sdkOptions parameter.
56
41
*
@@ -67,17 +52,15 @@ import { SSMProvider } from './SSMProvider.js';
67
52
* },
68
53
* });
69
54
* };
70
-
* ```
71
-
*
72
-
* This object accepts the same options as the AWS SDK v3 for JavaScript `PutParameterCommandInput` interface.
55
+
* ```
73
56
*
74
-
* ### Built-in provider class
57
+
* This object accepts the same options as the AWS SDK v3 for JavaScript `PutParameterCommandInput` interface.
75
58
*
76
-
* For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use the {@link SSMProvider} class.
59
+
* For greater flexibility such as configuring the underlying SDK client used by built-in providers, you can use the {@link SSMProvider} utility.
77
60
*
78
-
* ### Options
61
+
* **Options**
79
62
*
80
-
* You can customize the storage of the value by passing options to the function:
63
+
* You can customize the storage of the value by passing options to the function:
81
64
* * `value` - The value of the parameter, which is a mandatory option.
82
65
* * `overwrite` - Whether to overwrite the value if it already exists (default: `false`)
83
66
* * `description` - The description of the parameter
@@ -88,8 +71,8 @@ import { SSMProvider } from './SSMProvider.js';
88
71
*
89
72
* For more usage examples, see [our documentation](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/).
90
73
*
91
-
* @param{string} name - Name of the parameter
92
-
* @param{SSMSetOptions} options - Options to configure the parameter
74
+
* @param name - Name of the parameter
75
+
* @param options - Options to configure the parameter
0 commit comments