Type Alias APIGatewayProxyEvent
APIGatewayProxyEvent: {
body: null | string;
headers?: null | Record<string, string>;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
isBase64Encoded: boolean;
multiValueHeaders?: null
| Record<string, string[]>;
multiValueQueryStringParameters: null | Record<string, string[]>;
path: string;
pathParameters?: null | Record<string, string>;
queryStringParameters: null | Record<string, string>;
requestContext: {
accountId: string;
apiId: string;
authorizer?:
| null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
};
resource: string;
stageVariables?: null
| Record<string, string>;
}
Type declaration
body: null | string
Optionalheaders?: null | Record<string, string>
httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS"
isBase64Encoded: boolean
OptionalmultiValueHeaders?: null | Record<string, string[]>
multiValueQueryStringParameters: null | Record<string, string[]>
path: string
OptionalpathParameters?: null | Record<string, string>
queryStringParameters: null | Record<string, string>
requestContext: {
accountId: string;
apiId: string;
authorizer?:
| null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
}
accountId: string
apiId: string
Optionalauthorizer?:
| null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] }
OptionalconnectedAt?: null | number
OptionalconnectionId?: null | string
OptionaldeploymentId?: null | string
OptionaldomainName?: null | string
OptionaldomainPrefix?: null | string
OptionaleventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT"
OptionalextendedRequestId?: null | string
httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS"
identity: {
accessKey?: null | string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
}
OptionalaccessKey?: null | string
OptionalaccountId?: null | string
OptionalapiKey?: null | string
OptionalapiKeyId?: null | string
Optionalcaller?: null | string
OptionalclientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
}
OptionalcognitoAuthenticationProvider?: null | string
OptionalcognitoAuthenticationType?: null | string
OptionalcognitoIdentityId?: null | string
OptionalcognitoIdentityPoolId?: null | string
OptionalprincipalOrgId?: null | string
OptionalsourceIp?: string
Optionaluser?: null | string
OptionaluserAgent?: null | string
OptionaluserArn?: null | string
OptionalmessageDirection?: null | string
OptionalmessageId?: null | string
OptionaloperationName?: null | string
path: string
protocol: string
requestId: string
requestTime: string
requestTimeEpoch: number
OptionalresourceId?: null | string
resourcePath: string
OptionalrouteKey?: null | string
stage: string
resource: string
OptionalstageVariables?: null | Record<string, string>
A zod schema for an API Gateway Proxy event