@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
127 lines • 8.24 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventSourceMapping = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The ``AWS::Lambda::EventSourceMapping`` resource creates a mapping between an event source and an LAMlong function. LAM reads items from the event source and triggers the function.
* For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.
* + [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping)
* + [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping)
* + [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource)
* + [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping)
* + [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)
* + [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html)
* + [Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html)
*/
class EventSourceMapping extends pulumi.CustomResource {
/**
* Get an existing EventSourceMapping resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new EventSourceMapping(name, undefined, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of EventSourceMapping. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === EventSourceMapping.__pulumiType;
}
/**
* Create a EventSourceMapping resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.functionName === undefined && !opts.urn) {
throw new Error("Missing required property 'functionName'");
}
resourceInputs["amazonManagedKafkaEventSourceConfig"] = args?.amazonManagedKafkaEventSourceConfig;
resourceInputs["batchSize"] = args?.batchSize;
resourceInputs["bisectBatchOnFunctionError"] = args?.bisectBatchOnFunctionError;
resourceInputs["destinationConfig"] = args?.destinationConfig;
resourceInputs["documentDbEventSourceConfig"] = args?.documentDbEventSourceConfig;
resourceInputs["enabled"] = args?.enabled;
resourceInputs["eventSourceArn"] = args?.eventSourceArn;
resourceInputs["filterCriteria"] = args?.filterCriteria;
resourceInputs["functionName"] = args?.functionName;
resourceInputs["functionResponseTypes"] = args?.functionResponseTypes;
resourceInputs["kmsKeyArn"] = args?.kmsKeyArn;
resourceInputs["loggingConfig"] = args?.loggingConfig;
resourceInputs["maximumBatchingWindowInSeconds"] = args?.maximumBatchingWindowInSeconds;
resourceInputs["maximumRecordAgeInSeconds"] = args?.maximumRecordAgeInSeconds;
resourceInputs["maximumRetryAttempts"] = args?.maximumRetryAttempts;
resourceInputs["metricsConfig"] = args?.metricsConfig;
resourceInputs["parallelizationFactor"] = args?.parallelizationFactor;
resourceInputs["provisionedPollerConfig"] = args?.provisionedPollerConfig;
resourceInputs["queues"] = args?.queues;
resourceInputs["scalingConfig"] = args?.scalingConfig;
resourceInputs["selfManagedEventSource"] = args?.selfManagedEventSource;
resourceInputs["selfManagedKafkaEventSourceConfig"] = args?.selfManagedKafkaEventSourceConfig;
resourceInputs["sourceAccessConfigurations"] = args?.sourceAccessConfigurations;
resourceInputs["startingPosition"] = args?.startingPosition;
resourceInputs["startingPositionTimestamp"] = args?.startingPositionTimestamp;
resourceInputs["tags"] = args?.tags;
resourceInputs["topics"] = args?.topics;
resourceInputs["tumblingWindowInSeconds"] = args?.tumblingWindowInSeconds;
resourceInputs["awsId"] = undefined /*out*/;
resourceInputs["eventSourceMappingArn"] = undefined /*out*/;
}
else {
resourceInputs["amazonManagedKafkaEventSourceConfig"] = undefined /*out*/;
resourceInputs["awsId"] = undefined /*out*/;
resourceInputs["batchSize"] = undefined /*out*/;
resourceInputs["bisectBatchOnFunctionError"] = undefined /*out*/;
resourceInputs["destinationConfig"] = undefined /*out*/;
resourceInputs["documentDbEventSourceConfig"] = undefined /*out*/;
resourceInputs["enabled"] = undefined /*out*/;
resourceInputs["eventSourceArn"] = undefined /*out*/;
resourceInputs["eventSourceMappingArn"] = undefined /*out*/;
resourceInputs["filterCriteria"] = undefined /*out*/;
resourceInputs["functionName"] = undefined /*out*/;
resourceInputs["functionResponseTypes"] = undefined /*out*/;
resourceInputs["kmsKeyArn"] = undefined /*out*/;
resourceInputs["loggingConfig"] = undefined /*out*/;
resourceInputs["maximumBatchingWindowInSeconds"] = undefined /*out*/;
resourceInputs["maximumRecordAgeInSeconds"] = undefined /*out*/;
resourceInputs["maximumRetryAttempts"] = undefined /*out*/;
resourceInputs["metricsConfig"] = undefined /*out*/;
resourceInputs["parallelizationFactor"] = undefined /*out*/;
resourceInputs["provisionedPollerConfig"] = undefined /*out*/;
resourceInputs["queues"] = undefined /*out*/;
resourceInputs["scalingConfig"] = undefined /*out*/;
resourceInputs["selfManagedEventSource"] = undefined /*out*/;
resourceInputs["selfManagedKafkaEventSourceConfig"] = undefined /*out*/;
resourceInputs["sourceAccessConfigurations"] = undefined /*out*/;
resourceInputs["startingPosition"] = undefined /*out*/;
resourceInputs["startingPositionTimestamp"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["topics"] = undefined /*out*/;
resourceInputs["tumblingWindowInSeconds"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["eventSourceArn", "selfManagedEventSource", "startingPosition", "startingPositionTimestamp"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(EventSourceMapping.__pulumiType, name, resourceInputs, opts);
}
}
exports.EventSourceMapping = EventSourceMapping;
/** @internal */
EventSourceMapping.__pulumiType = 'aws-native:lambda:EventSourceMapping';
//# sourceMappingURL=eventSourceMapping.js.map