@@ -176,15 +176,15 @@ object AwsLambdaApi {
176
176
* The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU
177
177
* allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
178
178
* @param snapStart
179
- * Enable SnapStart if true
179
+ * The function's SnapStart setting.
180
180
*/
181
181
inline def updateFunctionConfiguration (
182
182
lambdaArn : String ,
183
183
runtime : Option [Runtime ] = None ,
184
184
handler : Option [String ] = None ,
185
185
memorySize : Option [Int ] = None ,
186
186
timeout : Option [Int ] = None ,
187
- snapStart : Option [Boolean ] = None
187
+ snapStart : Option [SnapStart ] = None
188
188
)(using aws : AwsClient ) =
189
189
AwsClient .invoke(s " updateFunctionConfiguration " ) {
190
190
val (revisionId, codeSha256) = {
@@ -197,13 +197,7 @@ object AwsLambdaApi {
197
197
.optionally(handler, _.handler)
198
198
.optionally(memorySize, b => i => b.memorySize(Integer .valueOf(i)))
199
199
.optionally(timeout, b => i => b.timeout(Integer .valueOf(i)))
200
- .optionally(
201
- snapStart,
202
- b => {
203
- case true => b.snapStart(SnapStart .builder().applyOn(SnapStartApplyOn .PUBLISHED_VERSIONS ).build())
204
- case false => b.snapStart(SnapStart .builder().applyOn(SnapStartApplyOn .NONE ).build())
205
- }
206
- )
200
+ .optionally(snapStart, b => s => b.snapStart(s))
207
201
.build()
208
202
)
209
203
(response.revisionId(), response.codeSha256())
0 commit comments