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
Optional
headers?: null | Record<string, string>
httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS"
isBase64Encoded: boolean
Optional
multiValueHeaders?: null | Record<string, string[]>
multiValueQueryStringParameters: null | Record<string, string[]>
path: string
Optional
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;
}
accountId: string
apiId: string
Optional
authorizer?:
| null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] }
Optional
connectedAt?: null | number
Optional
connectionId?: null | string
Optional
deploymentId?: null | string
Optional
domainName?: null | string
Optional
domainPrefix?: null | string
Optional
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT"
Optional
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;
}
Optional
accessKey?: null | string
Optional
accountId?: null | string
Optional
apiKey?: null | string
Optional
apiKeyId?: null | string
Optional
caller?: null | string
Optional
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
}
Optional
cognitoAuthenticationProvider?: null | string
Optional
cognitoAuthenticationType?: null | string
Optional
cognitoIdentityId?: null | string
Optional
cognitoIdentityPoolId?: null | string
Optional
principalOrgId?: null | string
Optional
sourceIp?: string
Optional
user?: null | string
Optional
userAgent?: null | string
Optional
userArn?: null | string
Optional
messageDirection?: null | string
Optional
messageId?: null | string
Optional
operationName?: null | string
path: string
protocol: string
requestId: string
requestTime: string
requestTimeEpoch: number
Optional
resourceId?: null | string
resourcePath: string
Optional
routeKey?: null | string
stage: string
resource: string
Optional
stageVariables?: null | Record<string, string>
A zod schema for an API Gateway Proxy event