mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Created ScheduledEvent on AWS Lambda Types (#22974)
* Created ScheduledEvent on AWS Lambda Types * aws-lambda types Fixed detail type on ScheduleEvent * types/aws-lambda Fixed header at index.d.ts
This commit is contained in:
committed by
Andy
parent
3499d8a0d9
commit
8db0647a2d
@@ -67,6 +67,7 @@ var cloudformationCustomResourceEvent: AWSLambda.CloudFormationCustomResourceEve
|
||||
var cloudformationCustomResourceResponse: AWSLambda.CloudFormationCustomResourceResponse;
|
||||
var cloudwatchLogsEvent: AWSLambda.CloudWatchLogsEvent;
|
||||
var cloudwatchLogsDecodedData: AWSLambda.CloudWatchLogsDecodedData;
|
||||
var scheduledEvent: AWSLambda.ScheduledEvent;
|
||||
|
||||
/* API Gateway Event request context */
|
||||
str = apiGwEvtReqCtx.accountId;
|
||||
@@ -350,6 +351,15 @@ str = cloudformationCustomResourceResponse.RequestId;
|
||||
str = cloudformationCustomResourceResponse.StackId;
|
||||
str = cloudformationCustomResourceResponse.Status;
|
||||
|
||||
/* ScheduledEvent */
|
||||
str = scheduledEvent.account;
|
||||
anyObj = scheduledEvent.detail;
|
||||
str = scheduledEvent.id;
|
||||
str = scheduledEvent.region;
|
||||
str = scheduledEvent.resources[0];
|
||||
str = scheduledEvent.source;
|
||||
str = scheduledEvent.time;
|
||||
|
||||
/* Context */
|
||||
b = context.callbackWaitsForEmptyEventLoop;
|
||||
str = context.functionName;
|
||||
|
||||
15
types/aws-lambda/index.d.ts
vendored
15
types/aws-lambda/index.d.ts
vendored
@@ -12,6 +12,7 @@
|
||||
// Daniel Cottone <https://github.com/daniel-cottone>
|
||||
// Kostya Misura <https://github.com/kostya-misura>
|
||||
// Markus Tacker <https://github.com/coderbyheart>
|
||||
// Danilo Raisi <https://github.com/daniloraisi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -294,6 +295,20 @@ type CloudFormationCustomResourceFailedResponse = CloudFormationCustomResourceRe
|
||||
|
||||
export type CloudFormationCustomResourceResponse = CloudFormationCustomResourceSuccessResponse | CloudFormationCustomResourceFailedResponse;
|
||||
|
||||
/**
|
||||
* See https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-scheduled-event
|
||||
*/
|
||||
interface ScheduledEvent {
|
||||
account: string;
|
||||
region: string;
|
||||
detail: any;
|
||||
"detail-type": string;
|
||||
source: string;
|
||||
time: string;
|
||||
id: string;
|
||||
resources: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
* See http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-cloudwatch-logs
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user