@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
37 lines (36 loc) • 1.46 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as lambda from "../lambda";
import * as eventRule from "./eventRule";
import * as eventTarget from "./eventTarget";
/**
* Arguments to control the event rule subscription. Currently empty, but still defined in case of
* future need.
*/
export interface EventRuleEventSubscriptionArgs {
}
export interface EventRuleEvent {
version: string;
account: string;
region: string;
"detail-type": string;
source: string;
time: string;
id: string;
resources: string[];
detail: Record<string, any>;
}
export type EventRuleEventHandler = lambda.EventHandler<EventRuleEvent, void>;
export declare class EventRuleEventSubscription extends lambda.EventSubscription {
readonly eventRule: eventRule.EventRule;
readonly target: eventTarget.EventTarget;
constructor(name: string, eventRuleOrSchedule: eventRule.EventRule | string, handler: EventRuleEventHandler, args?: EventRuleEventSubscriptionArgs, opts?: pulumi.ComponentResourceOptions);
}
declare module "./eventRule" {
interface EventRule {
/**
* Creates a new subscription to events fired from this EventRule to the handler provided, along
* with options to control the behavior of the subscription.
*/
onEvent(name: string, handler: EventRuleEventHandler, args?: EventRuleEventSubscriptionArgs, opts?: pulumi.ComponentResourceOptions): EventRuleEventSubscription;
}
}