Skip to content

Commit

Permalink
feat(client-lambda): Add ProvisionedPollerConfig to Lambda event-sour…
Browse files Browse the repository at this point in the history
…ce-mapping API.
  • Loading branch information
awstools committed Nov 22, 2024
1 parent dc13e07 commit 511ab41
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ export interface CreateEventSourceMappingCommandOutput extends EventSourceMappin
* "EventCount",
* ],
* },
* ProvisionedPollerConfig: { // ProvisionedPollerConfig
* MinimumPollers: Number("int"),
* MaximumPollers: Number("int"),
* },
* };
* const command = new CreateEventSourceMappingCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -307,6 +311,10 @@ export interface CreateEventSourceMappingCommandOutput extends EventSourceMappin
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export interface DeleteEventSourceMappingCommandOutput extends EventSourceMappin
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export interface GetEventSourceMappingCommandOutput extends EventSourceMappingCo
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export interface ListEventSourceMappingsCommandOutput extends ListEventSourceMap
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export interface UpdateEventSourceMappingCommandOutput extends EventSourceMappin
* "EventCount",
* ],
* },
* ProvisionedPollerConfig: { // ProvisionedPollerConfig
* MinimumPollers: Number("int"),
* MaximumPollers: Number("int"),
* },
* };
* const command = new UpdateEventSourceMappingCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -284,6 +288,10 @@ export interface UpdateEventSourceMappingCommandOutput extends EventSourceMappin
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // };
*
* ```
Expand Down
41 changes: 41 additions & 0 deletions clients/client-lambda/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,26 @@ export interface EventSourceMappingMetricsConfig {
Metrics?: EventSourceMappingMetric[] | undefined;
}

/**
* <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">
* Provisioned Mode</a> configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers
* for your event source. An event poller is a compute unit that provides approximately 5 MBps of throughput.</p>
* @public
*/
export interface ProvisionedPollerConfig {
/**
* <p>The minimum number of event pollers this event source can scale down to.</p>
* @public
*/
MinimumPollers?: number | undefined;

/**
* <p>The maximum number of event pollers this event source can scale up to.</p>
* @public
*/
MaximumPollers?: number | undefined;
}

/**
* <p>(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.</p>
* @public
Expand Down Expand Up @@ -1324,6 +1344,13 @@ export interface CreateEventSourceMappingRequest {
* @public
*/
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;

/**
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
* 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>
* @public
*/
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
}

/**
Expand Down Expand Up @@ -1558,6 +1585,13 @@ export interface EventSourceMappingConfiguration {
* @public
*/
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;

/**
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
* 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>
* @public
*/
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
}

/**
Expand Down Expand Up @@ -7221,6 +7255,13 @@ export interface UpdateEventSourceMappingRequest {
* @public
*/
MetricsConfig?: EventSourceMappingMetricsConfig | undefined;

/**
* <p>(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source.
* 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>
* @public
*/
ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions clients/client-lambda/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ import {
PolicyLengthExceededException,
PreconditionFailedException,
ProvisionedConcurrencyConfigNotFoundException,
ProvisionedPollerConfig,
RecursiveInvocationException,
RequestTooLargeException,
ResourceConflictException,
Expand Down Expand Up @@ -456,6 +457,7 @@ export const se_CreateEventSourceMappingCommand = async (
MaximumRetryAttempts: [],
MetricsConfig: (_) => _json(_),
ParallelizationFactor: [],
ProvisionedPollerConfig: (_) => _json(_),
Queues: (_) => _json(_),
ScalingConfig: (_) => _json(_),
SelfManagedEventSource: (_) => _json(_),
Expand Down Expand Up @@ -1699,6 +1701,7 @@ export const se_UpdateEventSourceMappingCommand = async (
MaximumRetryAttempts: [],
MetricsConfig: (_) => _json(_),
ParallelizationFactor: [],
ProvisionedPollerConfig: (_) => _json(_),
ScalingConfig: (_) => _json(_),
SourceAccessConfigurations: (_) => _json(_),
TumblingWindowInSeconds: [],
Expand Down Expand Up @@ -1960,6 +1963,7 @@ export const de_CreateEventSourceMappingCommand = async (
MaximumRetryAttempts: __expectInt32,
MetricsConfig: _json,
ParallelizationFactor: __expectInt32,
ProvisionedPollerConfig: _json,
Queues: _json,
ScalingConfig: _json,
SelfManagedEventSource: _json,
Expand Down Expand Up @@ -2127,6 +2131,7 @@ export const de_DeleteEventSourceMappingCommand = async (
MaximumRetryAttempts: __expectInt32,
MetricsConfig: _json,
ParallelizationFactor: __expectInt32,
ProvisionedPollerConfig: _json,
Queues: _json,
ScalingConfig: _json,
SelfManagedEventSource: _json,
Expand Down Expand Up @@ -2366,6 +2371,7 @@ export const de_GetEventSourceMappingCommand = async (
MaximumRetryAttempts: __expectInt32,
MetricsConfig: _json,
ParallelizationFactor: __expectInt32,
ProvisionedPollerConfig: _json,
Queues: _json,
ScalingConfig: _json,
SelfManagedEventSource: _json,
Expand Down Expand Up @@ -3433,6 +3439,7 @@ export const de_UpdateEventSourceMappingCommand = async (
MaximumRetryAttempts: __expectInt32,
MetricsConfig: _json,
ParallelizationFactor: __expectInt32,
ProvisionedPollerConfig: _json,
Queues: _json,
ScalingConfig: _json,
SelfManagedEventSource: _json,
Expand Down Expand Up @@ -4690,6 +4697,8 @@ const se_LayerVersionContentInput = (input: LayerVersionContentInput, context: _

// se_OnSuccess omitted.

// se_ProvisionedPollerConfig omitted.

// se_Queues omitted.

// se_ScalingConfig omitted.
Expand Down Expand Up @@ -4838,6 +4847,7 @@ const de_EventSourceMappingConfiguration = (output: any, context: __SerdeContext
MaximumRetryAttempts: __expectInt32,
MetricsConfig: _json,
ParallelizationFactor: __expectInt32,
ProvisionedPollerConfig: _json,
Queues: _json,
ScalingConfig: _json,
SelfManagedEventSource: _json,
Expand Down Expand Up @@ -4954,6 +4964,8 @@ const de_FunctionEventInvokeConfigList = (output: any, context: __SerdeContext):

// de_ProvisionedConcurrencyConfigListItem omitted.

// de_ProvisionedPollerConfig omitted.

// de_Queues omitted.

// de_RuntimeVersionConfig omitted.
Expand Down
56 changes: 56 additions & 0 deletions codegen/sdk-codegen/aws-models/lambda.json
Original file line number Diff line number Diff line change
Expand Up @@ -2780,6 +2780,12 @@
"traits": {
"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>"
}
},
"ProvisionedPollerConfig": {
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -4347,6 +4353,12 @@
"traits": {
"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>"
}
},
"ProvisionedPollerConfig": {
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -9557,6 +9569,15 @@
}
}
},
"com.amazonaws.lambda#MaximumNumberOfPollers": {
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 1,
"max": 2000
}
}
},
"com.amazonaws.lambda#MaximumRecordAgeInSeconds": {
"type": "integer",
"traits": {
Expand Down Expand Up @@ -9603,6 +9624,15 @@
"smithy.api#pattern": ".*"
}
},
"com.amazonaws.lambda#MinimumNumberOfPollers": {
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 1,
"max": 200
}
}
},
"com.amazonaws.lambda#NameSpacedFunctionArn": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -9881,6 +9911,26 @@
}
}
},
"com.amazonaws.lambda#ProvisionedPollerConfig": {
"type": "structure",
"members": {
"MinimumPollers": {
"target": "com.amazonaws.lambda#MinimumNumberOfPollers",
"traits": {
"smithy.api#documentation": "<p>The minimum number of event pollers this event source can scale down to.</p>"
}
},
"MaximumPollers": {
"target": "com.amazonaws.lambda#MaximumNumberOfPollers",
"traits": {
"smithy.api#documentation": "<p>The maximum number of event pollers this event source can scale up to.</p>"
}
}
},
"traits": {
"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>"
}
},
"com.amazonaws.lambda#PublishLayerVersion": {
"type": "operation",
"input": {
Expand Down Expand Up @@ -12689,6 +12739,12 @@
"traits": {
"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>"
}
},
"ProvisionedPollerConfig": {
"target": "com.amazonaws.lambda#ProvisionedPollerConfig",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down

0 comments on commit 511ab41

Please sign in to comment.