Skip to content

Commit 511ab41

Browse files
author
awstools
committed
feat(client-lambda): Add ProvisionedPollerConfig to Lambda event-source-mapping API.
1 parent dc13e07 commit 511ab41

8 files changed

+137
-0
lines changed

clients/client-lambda/src/commands/CreateEventSourceMappingCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ export interface CreateEventSourceMappingCommandOutput extends EventSourceMappin
225225
* "EventCount",
226226
* ],
227227
* },
228+
* ProvisionedPollerConfig: { // ProvisionedPollerConfig
229+
* MinimumPollers: Number("int"),
230+
* MaximumPollers: Number("int"),
231+
* },
228232
* };
229233
* const command = new CreateEventSourceMappingCommand(input);
230234
* const response = await client.send(command);
@@ -307,6 +311,10 @@ export interface CreateEventSourceMappingCommandOutput extends EventSourceMappin
307311
* // "EventCount",
308312
* // ],
309313
* // },
314+
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
315+
* // MinimumPollers: Number("int"),
316+
* // MaximumPollers: Number("int"),
317+
* // },
310318
* // };
311319
*
312320
* ```

clients/client-lambda/src/commands/DeleteEventSourceMappingCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ export interface DeleteEventSourceMappingCommandOutput extends EventSourceMappin
122122
* // "EventCount",
123123
* // ],
124124
* // },
125+
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
126+
* // MinimumPollers: Number("int"),
127+
* // MaximumPollers: Number("int"),
128+
* // },
125129
* // };
126130
*
127131
* ```

clients/client-lambda/src/commands/GetEventSourceMappingCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ export interface GetEventSourceMappingCommandOutput extends EventSourceMappingCo
120120
* // "EventCount",
121121
* // ],
122122
* // },
123+
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
124+
* // MinimumPollers: Number("int"),
125+
* // MaximumPollers: Number("int"),
126+
* // },
123127
* // };
124128
*
125129
* ```

clients/client-lambda/src/commands/ListEventSourceMappingsCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ export interface ListEventSourceMappingsCommandOutput extends ListEventSourceMap
126126
* // "EventCount",
127127
* // ],
128128
* // },
129+
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
130+
* // MinimumPollers: Number("int"),
131+
* // MaximumPollers: Number("int"),
132+
* // },
129133
* // },
130134
* // ],
131135
* // };

clients/client-lambda/src/commands/UpdateEventSourceMappingCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ export interface UpdateEventSourceMappingCommandOutput extends EventSourceMappin
202202
* "EventCount",
203203
* ],
204204
* },
205+
* ProvisionedPollerConfig: { // ProvisionedPollerConfig
206+
* MinimumPollers: Number("int"),
207+
* MaximumPollers: Number("int"),
208+
* },
205209
* };
206210
* const command = new UpdateEventSourceMappingCommand(input);
207211
* const response = await client.send(command);
@@ -284,6 +288,10 @@ export interface UpdateEventSourceMappingCommandOutput extends EventSourceMappin
284288
* // "EventCount",
285289
* // ],
286290
* // },
291+
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
292+
* // MinimumPollers: Number("int"),
293+
* // MaximumPollers: Number("int"),
294+
* // },
287295
* // };
288296
*
289297
* ```

clients/client-lambda/src/models/models_0.ts

+41
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,26 @@ export interface EventSourceMappingMetricsConfig {
924924
Metrics?: EventSourceMappingMetric[] | undefined;
925925
}
926926

927+
/**
928+
* <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">
929+
* Provisioned Mode</a> configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers
930+
* for your event source. An event poller is a compute unit that provides approximately 5 MBps of throughput.</p>
931+
* @public
932+
*/
933+
export interface ProvisionedPollerConfig {
934+
/**
935+
* <p>The minimum number of event pollers this event source can scale down to.</p>
936+
* @public
937+
*/
938+
MinimumPollers?: number | undefined;
939+
940+
/**
941+
* <p>The maximum number of event pollers this event source can scale up to.</p>
942+
* @public
943+
*/
944+
MaximumPollers?: number | undefined;
945+
}
946+
927947
/**
928948
* <p>(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.</p>
929949
* @public
@@ -1324,6 +1344,13 @@ export interface CreateEventSourceMappingRequest {
13241344
* @public
13251345
*/
13261346
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;
1347+
1348+
/**
1349+
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
1350+
* For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">Provisioned Mode</a>.</p>
1351+
* @public
1352+
*/
1353+
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
13271354
}
13281355

13291356
/**
@@ -1558,6 +1585,13 @@ export interface EventSourceMappingConfiguration {
15581585
* @public
15591586
*/
15601587
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;
1588+
1589+
/**
1590+
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
1591+
* For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">Provisioned Mode</a>.</p>
1592+
* @public
1593+
*/
1594+
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
15611595
}
15621596

15631597
/**
@@ -7221,6 +7255,13 @@ export interface UpdateEventSourceMappingRequest {
72217255
* @public
72227256
*/
72237257
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;
7258+
7259+
/**
7260+
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
7261+
* For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">Provisioned Mode</a>.</p>
7262+
* @public
7263+
*/
7264+
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
72247265
}
72257266

72267267
/**

clients/client-lambda/src/protocols/Aws_restJson1.ts

+12
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ import {
287287
PolicyLengthExceededException,
288288
PreconditionFailedException,
289289
ProvisionedConcurrencyConfigNotFoundException,
290+
ProvisionedPollerConfig,
290291
RecursiveInvocationException,
291292
RequestTooLargeException,
292293
ResourceConflictException,
@@ -456,6 +457,7 @@ export const se_CreateEventSourceMappingCommand = async (
456457
MaximumRetryAttempts: [],
457458
MetricsConfig: (_) => _json(_),
458459
ParallelizationFactor: [],
460+
ProvisionedPollerConfig: (_) => _json(_),
459461
Queues: (_) => _json(_),
460462
ScalingConfig: (_) => _json(_),
461463
SelfManagedEventSource: (_) => _json(_),
@@ -1699,6 +1701,7 @@ export const se_UpdateEventSourceMappingCommand = async (
16991701
MaximumRetryAttempts: [],
17001702
MetricsConfig: (_) => _json(_),
17011703
ParallelizationFactor: [],
1704+
ProvisionedPollerConfig: (_) => _json(_),
17021705
ScalingConfig: (_) => _json(_),
17031706
SourceAccessConfigurations: (_) => _json(_),
17041707
TumblingWindowInSeconds: [],
@@ -1960,6 +1963,7 @@ export const de_CreateEventSourceMappingCommand = async (
19601963
MaximumRetryAttempts: __expectInt32,
19611964
MetricsConfig: _json,
19621965
ParallelizationFactor: __expectInt32,
1966+
ProvisionedPollerConfig: _json,
19631967
Queues: _json,
19641968
ScalingConfig: _json,
19651969
SelfManagedEventSource: _json,
@@ -2127,6 +2131,7 @@ export const de_DeleteEventSourceMappingCommand = async (
21272131
MaximumRetryAttempts: __expectInt32,
21282132
MetricsConfig: _json,
21292133
ParallelizationFactor: __expectInt32,
2134+
ProvisionedPollerConfig: _json,
21302135
Queues: _json,
21312136
ScalingConfig: _json,
21322137
SelfManagedEventSource: _json,
@@ -2366,6 +2371,7 @@ export const de_GetEventSourceMappingCommand = async (
23662371
MaximumRetryAttempts: __expectInt32,
23672372
MetricsConfig: _json,
23682373
ParallelizationFactor: __expectInt32,
2374+
ProvisionedPollerConfig: _json,
23692375
Queues: _json,
23702376
ScalingConfig: _json,
23712377
SelfManagedEventSource: _json,
@@ -3433,6 +3439,7 @@ export const de_UpdateEventSourceMappingCommand = async (
34333439
MaximumRetryAttempts: __expectInt32,
34343440
MetricsConfig: _json,
34353441
ParallelizationFactor: __expectInt32,
3442+
ProvisionedPollerConfig: _json,
34363443
Queues: _json,
34373444
ScalingConfig: _json,
34383445
SelfManagedEventSource: _json,
@@ -4690,6 +4697,8 @@ const se_LayerVersionContentInput = (input: LayerVersionContentInput, context: _
46904697

46914698
// se_OnSuccess omitted.
46924699

4700+
// se_ProvisionedPollerConfig omitted.
4701+
46934702
// se_Queues omitted.
46944703

46954704
// se_ScalingConfig omitted.
@@ -4838,6 +4847,7 @@ const de_EventSourceMappingConfiguration = (output: any, context: __SerdeContext
48384847
MaximumRetryAttempts: __expectInt32,
48394848
MetricsConfig: _json,
48404849
ParallelizationFactor: __expectInt32,
4850+
ProvisionedPollerConfig: _json,
48414851
Queues: _json,
48424852
ScalingConfig: _json,
48434853
SelfManagedEventSource: _json,
@@ -4954,6 +4964,8 @@ const de_FunctionEventInvokeConfigList = (output: any, context: __SerdeContext):
49544964

49554965
// de_ProvisionedConcurrencyConfigListItem omitted.
49564966

4967+
// de_ProvisionedPollerConfig omitted.
4968+
49574969
// de_Queues omitted.
49584970

49594971
// de_RuntimeVersionConfig omitted.

codegen/sdk-codegen/aws-models/lambda.json

+56
Original file line numberDiff line numberDiff line change
@@ -2780,6 +2780,12 @@
27802780
"traits": {
27812781
"smithy.api#documentation": "<p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>"
27822782
}
2783+
},
2784+
"ProvisionedPollerConfig": {
2785+
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
2786+
"traits": {
2787+
"smithy.api#documentation": "<p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.\n For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">Provisioned Mode</a>.</p>"
2788+
}
27832789
}
27842790
},
27852791
"traits": {
@@ -4347,6 +4353,12 @@
43474353
"traits": {
43484354
"smithy.api#documentation": "<p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>"
43494355
}
4356+
},
4357+
"ProvisionedPollerConfig": {
4358+
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
4359+
"traits": {
4360+
"smithy.api#documentation": "<p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.\n For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">Provisioned Mode</a>.</p>"
4361+
}
43504362
}
43514363
},
43524364
"traits": {
@@ -9557,6 +9569,15 @@
95579569
}
95589570
}
95599571
},
9572+
"com.amazonaws.lambda#MaximumNumberOfPollers": {
9573+
"type": "integer",
9574+
"traits": {
9575+
"smithy.api#range": {
9576+
"min": 1,
9577+
"max": 2000
9578+
}
9579+
}
9580+
},
95609581
"com.amazonaws.lambda#MaximumRecordAgeInSeconds": {
95619582
"type": "integer",
95629583
"traits": {
@@ -9603,6 +9624,15 @@
96039624
"smithy.api#pattern": ".*"
96049625
}
96059626
},
9627+
"com.amazonaws.lambda#MinimumNumberOfPollers": {
9628+
"type": "integer",
9629+
"traits": {
9630+
"smithy.api#range": {
9631+
"min": 1,
9632+
"max": 200
9633+
}
9634+
}
9635+
},
96069636
"com.amazonaws.lambda#NameSpacedFunctionArn": {
96079637
"type": "string",
96089638
"traits": {
@@ -9881,6 +9911,26 @@
98819911
}
98829912
}
98839913
},
9914+
"com.amazonaws.lambda#ProvisionedPollerConfig": {
9915+
"type": "structure",
9916+
"members": {
9917+
"MinimumPollers": {
9918+
"target": "com.amazonaws.lambda#MinimumNumberOfPollers",
9919+
"traits": {
9920+
"smithy.api#documentation": "<p>The minimum number of event pollers this event source can scale down to.</p>"
9921+
}
9922+
},
9923+
"MaximumPollers": {
9924+
"target": "com.amazonaws.lambda#MaximumNumberOfPollers",
9925+
"traits": {
9926+
"smithy.api#documentation": "<p>The maximum number of event pollers this event source can scale up to.</p>"
9927+
}
9928+
}
9929+
},
9930+
"traits": {
9931+
"smithy.api#documentation": "<p>The <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">\n Provisioned Mode</a> configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers\n for your event source. An event poller is a compute unit that provides approximately 5 MBps of throughput.</p>"
9932+
}
9933+
},
98849934
"com.amazonaws.lambda#PublishLayerVersion": {
98859935
"type": "operation",
98869936
"input": {
@@ -12689,6 +12739,12 @@
1268912739
"traits": {
1269012740
"smithy.api#documentation": "<p>The metrics configuration for your event source. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics\">Event source mapping metrics</a>.</p>"
1269112741
}
12742+
},
12743+
"ProvisionedPollerConfig": {
12744+
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
12745+
"traits": {
12746+
"smithy.api#documentation": "<p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.\n For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode\">Provisioned Mode</a>.</p>"
12747+
}
1269212748
}
1269312749
},
1269412750
"traits": {

0 commit comments

Comments
 (0)