import type { IAutoScalingGroup } from 'aws-cdk-lib/aws-autoscaling'; import type { IInstance, IVpc } from 'aws-cdk-lib/aws-ec2'; import type { Construct } from 'constructs'; import { RequestProtocol, RequestProtocolVersion, TargetGroupBase, TargetType } from './base-target-group'; import type { HealthCheck } from './health-check'; export interface InstanceTarget { /** * The EC2 Instance */ readonly instance: IInstance; /** * The port on which the target is listening * @default - Defaults to port 80 for HTTP, or 443 for HTTPS */ readonly port?: number; } export interface InstanceTargetGroupProps { /** * The name of the target group * @default - Automatically generated name */ readonly name?: string; /** * The VPC where the target instances reside */ readonly vpc: IVpc; /** * The targets to associate with the target group */ readonly instances?: InstanceTarget[]; /** * The ASGs to associate with the target group */ readonly autoScalingGroups?: IAutoScalingGroup[]; /** * The protocol to use for routing traffic to the targets. * Can't be changed after creation. * @default Protocol.HTTPS */ readonly protocol?: RequestProtocol; /** * Choose the protocol version for requests to be sent to targets. * The protocol version you choose must support the request protocols * from clients. * @default - Protocol.HTTP1 if HTTP or HTTPS is selected */ readonly protocolVersion?: RequestProtocolVersion; /** * * @default - Defaults to port 80 for HTTP, or 443 for HTTPS */ readonly port?: number; /** * Healthcheck */ readonly healthCheck?: HealthCheck; } /** * Supports creating a Target group with instances within a specific VPC */ export declare class InstanceTargetGroup extends TargetGroupBase { readonly name: string; readonly targetType = TargetType.INSTANCE; readonly protocol: RequestProtocol; readonly protocolVersion?: RequestProtocolVersion; readonly targetGroupArn: string; readonly targetGroupId: string; readonly port: number; readonly vpc: IVpc; readonly healthCheck: HealthCheck; readonly instances: InstanceTarget[]; readonly autoScalingGroups: IAutoScalingGroup[]; private readonly _resource; constructor(scope: Construct, id: string, props: InstanceTargetGroupProps); /** * Adds a target to the target Group * @param target */ addTarget(target: InstanceTarget): void; }