@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)
125 lines • 8.64 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, Object.assign(Object.assign({}, 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 || args.functionName === undefined) && !opts.urn) {
throw new Error("Missing required property 'functionName'");
}
resourceInputs["amazonManagedKafkaEventSourceConfig"] = args ? args.amazonManagedKafkaEventSourceConfig : undefined;
resourceInputs["batchSize"] = args ? args.batchSize : undefined;
resourceInputs["bisectBatchOnFunctionError"] = args ? args.bisectBatchOnFunctionError : undefined;
resourceInputs["destinationConfig"] = args ? args.destinationConfig : undefined;
resourceInputs["documentDbEventSourceConfig"] = args ? args.documentDbEventSourceConfig : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["eventSourceArn"] = args ? args.eventSourceArn : undefined;
resourceInputs["filterCriteria"] = args ? args.filterCriteria : undefined;
resourceInputs["functionName"] = args ? args.functionName : undefined;
resourceInputs["functionResponseTypes"] = args ? args.functionResponseTypes : undefined;
resourceInputs["kmsKeyArn"] = args ? args.kmsKeyArn : undefined;
resourceInputs["maximumBatchingWindowInSeconds"] = args ? args.maximumBatchingWindowInSeconds : undefined;
resourceInputs["maximumRecordAgeInSeconds"] = args ? args.maximumRecordAgeInSeconds : undefined;
resourceInputs["maximumRetryAttempts"] = args ? args.maximumRetryAttempts : undefined;
resourceInputs["metricsConfig"] = args ? args.metricsConfig : undefined;
resourceInputs["parallelizationFactor"] = args ? args.parallelizationFactor : undefined;
resourceInputs["provisionedPollerConfig"] = args ? args.provisionedPollerConfig : undefined;
resourceInputs["queues"] = args ? args.queues : undefined;
resourceInputs["scalingConfig"] = args ? args.scalingConfig : undefined;
resourceInputs["selfManagedEventSource"] = args ? args.selfManagedEventSource : undefined;
resourceInputs["selfManagedKafkaEventSourceConfig"] = args ? args.selfManagedKafkaEventSourceConfig : undefined;
resourceInputs["sourceAccessConfigurations"] = args ? args.sourceAccessConfigurations : undefined;
resourceInputs["startingPosition"] = args ? args.startingPosition : undefined;
resourceInputs["startingPositionTimestamp"] = args ? args.startingPositionTimestamp : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["topics"] = args ? args.topics : undefined;
resourceInputs["tumblingWindowInSeconds"] = args ? args.tumblingWindowInSeconds : undefined;
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["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