import * as cdk from "aws-cdk-lib"; import type * as apigw from "aws-cdk-lib/aws-apigatewayv2"; import * as logs from "aws-cdk-lib/aws-logs"; import * as constructs from "constructs"; export type ApiGatewayAccessLogsProps = { /** * Delete the access logs if this construct is deleted? * * Maybe you want to DESTROY instead. Or for legal reasons, retain for audit. * * @default RemovalPolicy.RETAIN */ removalPolicy?: cdk.RemovalPolicy; /** * How long to keep the logs. If undefined, uses the same default as new AWS log groups. * * @default RetentionDays.TWO_YEARS */ retention?: logs.RetentionDays; /** * A custom JSON log format, which uses variables from `"$context"`. * * See [AWS: CloudWatch log formats for API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#apigateway-cloudwatch-log-formats) * for formats and rules. It is possible to use other formats like CLF and XML, but this construct * only supports JSON for now. * * For a list of all possible variables to log, see * [AWS: $context Variables for data models, authorizers, mapping templates, and CloudWatch access logging](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference) * and * [AWS: $context Variables for access logging only](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference-access-logging-only) . * * @default {@link defaultAccessLogFormat} */ accessLogFormat?: Record; }; /** * Enables access logs on the API-Gateway. * * @author Kristian Rekstad */ export declare class ApiGatewayAccessLogs extends constructs.Construct { readonly logGroup: logs.LogGroup; constructor(scope: constructs.Construct, id: string, stage: apigw.CfnStage, props: ApiGatewayAccessLogsProps | undefined); }