import Service from "serverless/classes/Service"; import { FunctionInfo } from "./layer"; import Aws = require("serverless/plugins/aws/provider/awsProvider"); interface ForwarderConfigs { AddExtension: boolean; TestingMode: boolean | undefined; IntegrationTesting: boolean | undefined; SubToAccessLogGroups: boolean; SubToExecutionLogGroups: boolean; } interface SubscriptionFilter { creationTime: number; destinationArn: string; distribution: string; filterName: string; filterPattern: string; logGroupName: string; roleArn: string; } type SubLogsConfig = boolean | { accessLogging: boolean | undefined; executionLogging: boolean | undefined; } | undefined; type LogsConfig = { restApi: SubLogsConfig; httpApi: SubLogsConfig; websocket: SubLogsConfig; } | undefined; /** A single CloudFormation resource */ interface CfnResource { Type: string; Properties?: Record; [key: string]: unknown; } /** The Resources block of a compiled CloudFormation template */ export type CfnResourceMap = Record; /** A compiled AWS::StepFunctions::StateMachine CFN resource */ export interface StateMachineCfnResource { Properties?: { Tags?: { Key: string; Value: string; }[]; [key: string]: unknown; }; [key: string]: unknown; } /** Logging config for a step function (from serverless-step-functions plugin) */ interface StepFunctionLoggingConfig { level: string; includeExecutionData: boolean; destinations: unknown[]; } /** A step function entry from stepFunctions.stateMachines */ export interface StepFunctionConfig { name: string; loggingConfig?: StepFunctionLoggingConfig; } export interface CloudFormationObjectArn { "Fn::Sub"?: string; "arn:aws"?: string; } export declare function addExecutionLogGroupsAndSubscriptions(service: Service, aws: Aws, functionArn: CloudFormationObjectArn | string): Promise; export declare function addStepFunctionLogGroup(aws: Aws, resources: CfnResourceMap, stepFunction: StepFunctionConfig): Promise; export declare function addDdSlsPluginTag(stateMachineObj: StateMachineCfnResource): void; export declare function addDdTraceEnabledTag(stateMachineObj: StateMachineCfnResource, enableStepFunctionsTracing: undefined | boolean): void; export declare function addStepFunctionLogGroupSubscription(resources: CfnResourceMap, stepFunction: StepFunctionConfig, functionArn: CloudFormationObjectArn | string): Promise; export declare function addCloudWatchForwarderSubscriptions(service: Service, aws: Aws, functionArn: CloudFormationObjectArn | string, forwarderConfigs: ForwarderConfigs, handlers: FunctionInfo[]): Promise; export declare function canSubscribeLogGroup(aws: Aws, logGroupName: string, expectedSubName: string): Promise; export declare function describeSubscriptionFilters(aws: Aws, logGroupName: string): Promise; export declare function isLogsConfig(obj: unknown): obj is LogsConfig; export {}; //# sourceMappingURL=forwarder.d.ts.map