UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

97 lines (96 loc) 2.81 kB
import { IConstruct } from 'constructs'; import * as elbv2 from '../../aws-elasticloadbalancingv2'; import * as iam from '../../aws-iam'; /** * Represents a listener configuration for advanced load balancer settings */ export declare abstract class ListenerRuleConfiguration { /** * Use an Application Load Balancer listener rule */ static applicationListenerRule(rule: elbv2.ApplicationListenerRule): ListenerRuleConfiguration; /** * Use a Network Load Balancer listener */ static networkListener(listener: elbv2.NetworkListener): ListenerRuleConfiguration; /** * @internal */ abstract readonly _listenerArn: string; } /** * Configuration returned by AlternateTargetConfiguration.bind() */ export interface AlternateTargetConfig { /** * The ARN of the alternate target group */ readonly alternateTargetGroupArn: string; /** * The IAM role ARN for the configuration * @default - a new role will be created */ readonly roleArn: string; /** * The production listener rule ARN (ALB) or listener ARN (NLB) * @default - none */ readonly productionListenerRule?: string; /** * The test listener rule ARN (ALB) or listener ARN (NLB) * @default - none */ readonly testListenerRule?: string; } /** * Interface for configuring alternate target groups for blue/green deployments */ export interface IAlternateTarget { /** * Bind this configuration to a service * * @param scope The construct scope * @returns The configuration to apply to the service */ bind(scope: IConstruct): AlternateTargetConfig; } /** * Options for AlternateTarget configuration */ export interface AlternateTargetOptions { /** * The IAM role for the configuration * @default - a new role will be created */ readonly role?: iam.IRole; /** * The test listener configuration * @default - none */ readonly testListener?: ListenerRuleConfiguration; } /** * Properties for AlternateTarget configuration */ export interface AlternateTargetProps extends AlternateTargetOptions { /** * The alternate target group */ readonly alternateTargetGroup: elbv2.ITargetGroup; /** * The production listener rule ARN (ALB) or listener ARN (NLB) */ readonly productionListener: ListenerRuleConfiguration; } /** * Configuration for alternate target groups used in blue/green deployments with load balancers */ export declare class AlternateTarget implements IAlternateTarget { private readonly id; private readonly props; constructor(id: string, props: AlternateTargetProps); /** * Bind this configuration to a service */ bind(scope: IConstruct): AlternateTargetConfig; }