agent-claw: automated task changes

This commit is contained in:
daniel
2026-05-06 18:55:16 -05:00
parent 38905bb1e9
commit 732b00fb66
8494 changed files with 2018127 additions and 4 deletions

View File

@@ -0,0 +1,105 @@
import type { Construct } from 'constructs';
import type { IListenerAction } from './listener-action';
import * as cxschema from '../../../cloud-assembly-schema';
import type { IResource } from '../../../core';
import { Resource } from '../../../core';
import type * as cxapi from '../../../cx-api';
import type { aws_elasticloadbalancingv2 } from '../../../interfaces';
/**
* Options for listener lookup
*/
export interface BaseListenerLookupOptions {
/**
* Filter listeners by associated load balancer arn
* @default - does not filter by load balancer arn
*/
readonly loadBalancerArn?: string;
/**
* Filter listeners by associated load balancer tags
* @default - does not filter by load balancer tags
*/
readonly loadBalancerTags?: Record<string, string>;
/**
* Filter listeners by listener port
* @default - does not filter by listener port
*/
readonly listenerPort?: number;
}
/**
* Options for querying the load balancer listener context provider
* @internal
*/
export interface ListenerQueryContextProviderOptions {
/**
* User's provided options
*/
readonly userOptions: BaseListenerLookupOptions;
/**
* Type of load balancer expected
*/
readonly loadBalancerType: cxschema.LoadBalancerType;
/**
* ARN of the listener to look up
* @default - does not filter by listener arn
*/
readonly listenerArn?: string;
/**
* Optional protocol of the listener to look up
*/
readonly listenerProtocol?: cxschema.LoadBalancerListenerProtocol;
}
/**
* Base interface for listeners
*/
export interface IListener extends IResource, aws_elasticloadbalancingv2.IListenerRef {
/**
* ARN of the listener
* @attribute
*/
readonly listenerArn: string;
}
/**
* Base class for listeners
*/
export declare abstract class BaseListener extends Resource implements IListener {
/**
* Queries the load balancer listener context provider for load balancer
* listener info.
* @internal
*/
protected static _queryContextProvider(scope: Construct, options: ListenerQueryContextProviderOptions): cxapi.LoadBalancerListenerContextResponse;
/**
* @attribute
*/
readonly listenerArn: string;
/**
* A reference to this listener
*/
get listenerRef(): aws_elasticloadbalancingv2.ListenerReference;
/**
* Attributes set on this listener
*/
private readonly attributes;
private readonly _defaultAction;
constructor(scope: Construct, id: string, additionalProps: any);
/**
* Set a non-standard attribute on the listener
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-listenerattribute.html
*/
setAttribute(key: string, value: string | undefined): void;
/**
* Remove an attribute from the listener
*/
removeAttribute(key: string): void;
/**
* Validate this listener
*/
protected validateListener(): string[];
/**
* Configure the default action
*
* @internal
*/
protected _setDefaultAction(action: IListenerAction): void;
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseListener=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var util_1=()=>{var tmp=require("./util");return util_1=()=>tmp,tmp},cxschema=()=>{var tmp=require("../../../cloud-assembly-schema");return cxschema=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},helpers_internal_1=()=>{var tmp=require("../../../core/lib/helpers-internal");return helpers_internal_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},elasticloadbalancingv2_generated_1=()=>{var tmp=require("../elasticloadbalancingv2.generated");return elasticloadbalancingv2_generated_1=()=>tmp,tmp};class BaseListener extends core_1().Resource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2.BaseListener",version:"2.252.0"};static _queryContextProvider(scope,options){if(core_1().Token.isUnresolved(options.userOptions.loadBalancerArn)||Object.values(options.userOptions.loadBalancerTags??{}).some(core_1().Token.isUnresolved)||core_1().Token.isUnresolved(options.userOptions.listenerPort))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`ArgumentsLookUpLoadBalancer`,"All arguments to look up a load balancer listener must be concrete (no Tokens)",scope);let cxschemaTags;return options.userOptions.loadBalancerTags&&(cxschemaTags=(0,util_1().mapTagMapToCxschema)(options.userOptions.loadBalancerTags)),core_1().ContextProvider.getValue(scope,{provider:cxschema().ContextProvider.LOAD_BALANCER_LISTENER_PROVIDER,props:{listenerArn:options.listenerArn,listenerPort:options.userOptions.listenerPort,listenerProtocol:options.listenerProtocol,loadBalancerArn:options.userOptions.loadBalancerArn,loadBalancerTags:cxschemaTags,loadBalancerType:options.loadBalancerType},dummyValue:{listenerArn:`arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/${options.loadBalancerType}/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2`,listenerPort:80,securityGroupIds:["sg-123456789012"]}}).value}listenerArn;get listenerRef(){return{listenerArn:this.listenerArn}}attributes={};_defaultAction;constructor(scope,id,additionalProps){super(scope,id),this._defaultAction=helpers_internal_1().Box.fromValue(void 0);const resource=new(elasticloadbalancingv2_generated_1()).CfnListener(this,"Resource",{...additionalProps,defaultActions:this._defaultAction.derive(a=>a?.renderActions()??[]),listenerAttributes:core_1().Lazy.any({produce:()=>(0,util_1().renderAttributes)(this.attributes)},{omitEmptyArray:!0})});this.listenerArn=resource.ref,this.node.addValidation({validate:()=>this.validateListener()})}setAttribute(key,value){this.attributes[key]=value}removeAttribute(key){this.setAttribute(key,void 0)}validateListener(){return this._defaultAction.get()?[]:["Listener needs at least one default action or target group (call addTargetGroups or addAction)"]}_setDefaultAction(action){this._defaultAction.get()&&core_1().Annotations.of(this).addWarningV2("@aws-cdk/aws-elbv2:listenerExistingDefaultActionReplaced","A default Action already existed on this Listener and was replaced. Configure exactly one default Action."),this._defaultAction.set(action)}}exports.BaseListener=BaseListener;

View File

@@ -0,0 +1,257 @@
import type { Construct } from 'constructs';
import * as ec2 from '../../../aws-ec2';
import * as iam from '../../../aws-iam';
import type * as s3 from '../../../aws-s3';
import * as cxschema from '../../../cloud-assembly-schema';
import type { IResource } from '../../../core';
import { Resource } from '../../../core';
import * as cxapi from '../../../cx-api';
import type { aws_elasticloadbalancingv2 } from '../../../interfaces';
/**
* The prefix to use for source NAT for a dual-stack network load balancer with UDP listeners.
*/
export declare class SourceNatIpv6Prefix {
readonly prefix: string;
/**
* Use an automatically assigned IPv6 prefix
*/
static autoAssigned(): SourceNatIpv6Prefix;
/**
* Use a custom IPv6 prefix with /80 netmask
* @param prefix The IPv6 prefix
*/
static fromIpv6Prefix(prefix: string): SourceNatIpv6Prefix;
/**
* @param prefix The IPv6 prefix
*/
constructor(prefix: string);
}
/**
* Specifies a subnet for a load balancer
*/
export interface SubnetMapping {
/**
* The subnet.
*/
readonly subnet: ec2.ISubnet;
/**
* The allocation ID of the Elastic IP address for an internet-facing load balancer.
*
* @default undefined - AWS default is to allocate a new IP address for internet-facing load balancers
*/
readonly allocationId?: string;
/**
* The IPv6 address.
*
* @default undefined - AWS default is to allocate an IPv6 address from the subnet's pool
*/
readonly ipv6Address?: string;
/**
* The private IPv4 address for an internal load balancer.
*
* @default undefined - AWS default is to allocate a private IPv4 address from the subnet's pool
*/
readonly privateIpv4Address?: string;
/**
* The IPv6 prefix to use for source NAT for a dual-stack network load balancer with UDP listeners.
*
* Specify an IPv6 prefix (/80 netmask) from the subnet CIDR block
* or `SourceNatIpv6Prefix.autoAssigned()` to use an IPv6 prefix selected at random from the subnet CIDR block.
*
* @default undefined - AWS default is `SourceNatIpv6Prefix.autoAssigned()` for IPv6 load balancers
*/
readonly sourceNatIpv6Prefix?: SourceNatIpv6Prefix;
}
/**
* Shared properties of both Application and Network Load Balancers
*/
export interface BaseLoadBalancerProps {
/**
* Name of the load balancer
*
* @default - Automatically generated name.
*/
readonly loadBalancerName?: string;
/**
* The VPC network to place the load balancer in
*/
readonly vpc: ec2.IVpc;
/**
* Whether the load balancer has an internet-routable address
*
* @default false
*/
readonly internetFacing?: boolean;
/**
* Which subnets place the load balancer in
*
* @default - the Vpc default strategy.
*
*/
readonly vpcSubnets?: ec2.SubnetSelection;
/**
* Indicates whether deletion protection is enabled.
*
* @default false
*/
readonly deletionProtection?: boolean;
/**
* Indicates whether cross-zone load balancing is enabled.
*
* @default - false for Network Load Balancers and true for Application Load Balancers.
* This can not be `false` for Application Load Balancers.
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattribute.html
*/
readonly crossZoneEnabled?: boolean;
/**
* Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
*
* @default - false for internet-facing load balancers and true for internal load balancers
*/
readonly denyAllIgwTraffic?: boolean;
/**
* The minimum capacity (LCU) for a load balancer.
*
* @default undefined - ELB default is 0 LCU
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/capacity-unit-reservation.html
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/network/capacity-unit-reservation.html
* @see https://exampleloadbalancer.com/ondemand_capacity_reservation_calculator.html
*/
readonly minimumCapacityUnit?: number;
}
export interface ILoadBalancerV2 extends IResource, aws_elasticloadbalancingv2.ILoadBalancerRef {
/**
* The canonical hosted zone ID of this load balancer
*
* Example value: `Z2P70J7EXAMPLE`
*
* @attribute
*/
readonly loadBalancerCanonicalHostedZoneId: string;
/**
* The DNS name of this load balancer
*
* Example value: `my-load-balancer-424835706.us-west-2.elb.amazonaws.com`
*
* @attribute
*/
readonly loadBalancerDnsName: string;
}
/**
* Options for looking up load balancers
*/
export interface BaseLoadBalancerLookupOptions {
/**
* Find by load balancer's ARN
* @default - does not search by load balancer arn
*/
readonly loadBalancerArn?: string;
/**
* Match load balancer tags.
* @default - does not match load balancers by tags
*/
readonly loadBalancerTags?: Record<string, string>;
}
/**
* Options for query context provider
* @internal
*/
export interface LoadBalancerQueryContextProviderOptions {
/**
* User's lookup options
*/
readonly userOptions: BaseLoadBalancerLookupOptions;
/**
* Type of load balancer
*/
readonly loadBalancerType: cxschema.LoadBalancerType;
}
/**
* Base class for both Application and Network Load Balancers
*/
export declare abstract class BaseLoadBalancer extends Resource {
/**
* Queries the load balancer context provider for load balancer info.
* @internal
*/
protected static _queryContextProvider(scope: Construct, options: LoadBalancerQueryContextProviderOptions): cxapi.LoadBalancerContextResponse;
/**
* The canonical hosted zone ID of this load balancer
*
* Example value: `Z2P70J7EXAMPLE`
*
* @attribute
*/
readonly loadBalancerCanonicalHostedZoneId: string;
/**
* The DNS name of this load balancer
*
* Example value: `my-load-balancer-424835706.us-west-2.elb.amazonaws.com`
*
* @attribute
*/
readonly loadBalancerDnsName: string;
/**
* The full name of this load balancer
*
* Example value: `app/my-load-balancer/50dc6c495c0c9188`
*
* @attribute
*/
readonly loadBalancerFullName: string;
/**
* The name of this load balancer
*
* Example value: `my-load-balancer`
*
* @attribute
*/
readonly loadBalancerName: string;
/**
* The ARN of this load balancer
*
* Example value: `arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188`
*
* @attribute
*/
readonly loadBalancerArn: string;
/**
* A reference to this load balancer
*/
get loadBalancerRef(): aws_elasticloadbalancingv2.LoadBalancerReference;
/**
* @attribute
*/
readonly loadBalancerSecurityGroups: string[];
/**
* The VPC this load balancer has been created in.
*
* This property is always defined (not `null` or `undefined`) for sub-classes of `BaseLoadBalancer`.
*/
readonly vpc?: ec2.IVpc;
/**
* Attributes set on this load balancer
*/
private readonly attributes;
constructor(scope: Construct, id: string, baseProps: BaseLoadBalancerProps, additionalProps: any);
/**
* Enable access logging for this load balancer.
*
* A region must be specified on the stack containing the load balancer; you cannot enable logging on
* environment-agnostic stacks. See https://docs.aws.amazon.com/cdk/latest/guide/environments.html
*/
logAccessLogs(bucket: s3.IBucket, prefix?: string): void;
/**
* Set a non-standard attribute on the load balancer
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes
*/
setAttribute(key: string, value: string | undefined): void;
/**
* Remove an attribute from the load balancer
*/
removeAttribute(key: string): void;
protected resourcePolicyPrincipal(): iam.IPrincipal;
protected validateLoadBalancer(): string[];
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,365 @@
import type { IConstruct, IDependable } from 'constructs';
import { Construct, DependencyGroup } from 'constructs';
import type { Protocol } from './enums';
import { TargetType } from './enums';
import type * as ec2 from '../../../aws-ec2';
import * as cdk from '../../../core';
import type { aws_elasticloadbalancingv2 } from '../../../interfaces';
/**
* The IP address type of targets registered with a target group
*/
export declare enum TargetGroupIpAddressType {
/**
* IPv4 addresses
*/
IPV4 = "ipv4",
/**
* IPv6 addresses
*/
IPV6 = "ipv6"
}
/**
* Basic properties of both Application and Network Target Groups
*/
export interface BaseTargetGroupProps {
/**
* The name of the target group.
*
* This name must be unique per region per account, can have a maximum of
* 32 characters, must contain only alphanumeric characters or hyphens, and
* must not begin or end with a hyphen.
*
* @default - Automatically generated.
*/
readonly targetGroupName?: string;
/**
* The virtual private cloud (VPC).
*
* only if `TargetType` is `Ip` or `InstanceId`
*
* @default - undefined
*/
readonly vpc?: ec2.IVpc;
/**
* The amount of time for Elastic Load Balancing to wait before deregistering a target.
*
* The range is 0-3600 seconds.
*
* @default 300
*/
readonly deregistrationDelay?: cdk.Duration;
/**
* Health check configuration
*
* @default - The default value for each property in this configuration varies depending on the target.
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#aws-resource-elasticloadbalancingv2-targetgroup-properties
*/
readonly healthCheck?: HealthCheck;
/**
* The type of targets registered to this TargetGroup, either IP or Instance.
*
* All targets registered into the group must be of this type. If you
* register targets to the TargetGroup in the CDK app, the TargetType is
* determined automatically.
*
* @default - Determined automatically.
*/
readonly targetType?: TargetType;
/**
* Indicates whether cross zone load balancing is enabled.
*
* @default - use load balancer configuration
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html
*/
readonly crossZoneEnabled?: boolean;
/**
* The type of IP addresses of the targets registered with the target group.
*
* @default undefined - ELB defaults to IPv4
*/
readonly ipAddressType?: TargetGroupIpAddressType;
/**
* Configuring target group health.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes
* @default - use default configuration
*/
readonly targetGroupHealth?: TargetGroupHealth;
}
/**
* Properties for configuring a target group health
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes
*/
export interface TargetGroupHealth {
/**
* The minimum number of targets that must be healthy for DNS failover.
* If below this value, mark the zone as unhealthy in DNS.
* Use 0 for "off".
* @default 1
*/
readonly dnsMinimumHealthyTargetCount?: number;
/**
* The minimum percentage of targets that must be healthy for DNS failover.
* If below this value, mark the zone as unhealthy in DNS.
* Use 0 for "off".
* @default 0
*/
readonly dnsMinimumHealthyTargetPercentage?: number;
/**
* The minimum number of targets that must be healthy for unhealthy state routing.
* If below this value, send traffic to all targets including unhealthy ones.
* @default 1
*/
readonly routingMinimumHealthyTargetCount?: number;
/**
* The minimum percentage of targets that must be healthy for unhealthy state routing.
* If below this value, send traffic to all targets including unhealthy ones.
* Use 0 for "off".
* @default 0
*/
readonly routingMinimumHealthyTargetPercentage?: number;
}
/**
* Properties for configuring a health check
*/
export interface HealthCheck {
/**
* Indicates whether health checks are enabled. If the target type is lambda,
* health checks are disabled by default but can be enabled. If the target type
* is instance or ip, health checks are always enabled and cannot be disabled.
*
* @default - Determined automatically.
*/
readonly enabled?: boolean;
/**
* The approximate number of seconds between health checks for an individual target.
* Must be 5 to 300 seconds
*
* @default - 10 seconds if protocol is `GENEVE`, 35 seconds if target type is `lambda`, else 30 seconds
*/
readonly interval?: cdk.Duration;
/**
* The ping path destination where Elastic Load Balancing sends health check requests.
*
* @default /
*/
readonly path?: string;
/**
* The port that the load balancer uses when performing health checks on the targets.
*
* @default 'traffic-port'
*/
readonly port?: string;
/**
* The protocol the load balancer uses when performing health checks on targets.
*
* The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP.
* The TLS, UDP, and TCP_UDP protocols are not supported for health checks.
*
* @default - HTTP for ALBs, TCP for NLBs
*/
readonly protocol?: Protocol;
/**
* The amount of time, in seconds, during which no response from a target means a failed health check.
* Must be 2 to 120 seconds.
*
* @default - 6 seconds if the protocol is HTTP, 5 seconds if protocol is `GENEVE`, 30 seconds if target type is `lambda`, 10 seconds for TCP, TLS, or HTTPS
*/
readonly timeout?: cdk.Duration;
/**
* The number of consecutive health checks successes required before considering an unhealthy target healthy.
*
* For Application Load Balancers, the default is 5. For Network Load Balancers, the default is 3.
*
* @default - 5 for ALBs, 3 for NLBs
*/
readonly healthyThresholdCount?: number;
/**
* The number of consecutive health check failures required before considering a target unhealthy.
*
* For Application Load Balancers, the default is 2. For Network Load
* Balancers, the range is between 2-10 and can be set accordingly.
*
* @default 2
*/
readonly unhealthyThresholdCount?: number;
/**
* GRPC code to use when checking for a successful response from a target.
*
* You can specify values between 0 and 99. You can specify multiple values
* (for example, "0,1") or a range of values (for example, "0-5").
*
* @default 12
*/
readonly healthyGrpcCodes?: string;
/**
* HTTP code to use when checking for a successful response from a target.
*
* For Application Load Balancers, you can specify values between 200 and
* 499, and the default value is 200. You can specify multiple values (for
* example, "200,202") or a range of values (for example, "200-299").
*/
readonly healthyHttpCodes?: string;
}
/**
* Define the target of a load balancer
*/
export declare abstract class TargetGroupBase extends Construct implements ITargetGroup {
/**
* The ARN of the target group
*/
readonly targetGroupArn: string;
/**
* A reference to this target group
*/
get targetGroupRef(): aws_elasticloadbalancingv2.TargetGroupReference;
/**
* The environment this resource belongs to
*/
get env(): cdk.ResourceEnvironment;
/**
* The full name of the target group
*/
readonly targetGroupFullName: string;
/**
* The name of the target group
*/
readonly targetGroupName: string;
/**
* ARNs of load balancers load balancing to this TargetGroup
*/
readonly targetGroupLoadBalancerArns: string[];
/**
* Full name of first load balancer
*
* This identifier is emitted as a dimensions of the metrics of this target
* group.
*
* Example value: `app/my-load-balancer/123456789`
*/
abstract readonly firstLoadBalancerFullName: string;
/**
* A token representing a list of ARNs of the load balancers that route traffic to this target group
*/
readonly loadBalancerArns: string;
/**
* Health check for the members of this target group
*/
get healthCheck(): HealthCheck;
set healthCheck(value: HealthCheck);
/**
* Default port configured for members of this target group
*/
protected readonly defaultPort: number;
/**
* Configurable dependable with all resources that lead to load balancer attachment
*/
protected readonly loadBalancerAttachedDependencies: DependencyGroup;
/**
* The types of the directly registered members of this target group
*/
protected get targetType(): TargetType | undefined;
protected set targetType(value: TargetType | undefined);
/**
* Attributes of this target group
*/
private readonly attributes;
private readonly _healthCheck;
private readonly _targetType;
/**
* The JSON objects returned by the directly registered members of this target group
*/
private readonly _targetsJson;
/**
* The target group VPC
*
* @default - Required if adding instances instead of Lambdas to TargetGroup
*/
private vpc?;
/**
* The target group resource
*/
private readonly resource;
constructor(scope: Construct, id: string, baseProps: BaseTargetGroupProps, additionalProps: any);
/**
* List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer
*/
get loadBalancerAttached(): IDependable;
/**
* Set/replace the target group's health check
*/
configureHealthCheck(healthCheck: HealthCheck): void;
/**
* Set a non-standard attribute on the target group
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes
*/
setAttribute(key: string, value: string | undefined): void;
/**
* Register the given load balancing target as part of this group
*/
protected addLoadBalancerTarget(props: LoadBalancerTargetProps): void;
protected validateTargetGroup(): string[];
protected validateHealthCheck(): string[];
}
/**
* Properties to reference an existing target group
*/
export interface TargetGroupAttributes {
/**
* ARN of the target group
*/
readonly targetGroupArn: string;
/**
* A Token representing the list of ARNs for the load balancer routing to this target group
*/
readonly loadBalancerArns?: string;
}
/**
* A target group
*/
export interface ITargetGroup extends IConstruct, aws_elasticloadbalancingv2.ITargetGroupRef {
/**
* The name of the target group
*/
readonly targetGroupName: string;
/**
* ARN of the target group
*/
readonly targetGroupArn: string;
/**
* A token representing a list of ARNs of the load balancers that route traffic to this target group
*/
readonly loadBalancerArns: string;
/**
* Return an object to depend on the listeners added to this target group
*/
readonly loadBalancerAttached: IDependable;
}
/**
* Result of attaching a target to load balancer
*/
export interface LoadBalancerTargetProps {
/**
* What kind of target this is
*/
readonly targetType: TargetType;
/**
* JSON representing the target's direct addition to the TargetGroup list
*
* May be omitted if the target is going to register itself later.
*/
readonly targetJson?: any;
}
/**
* Extract the full load balancer name (used for metrics) from the listener ARN:
*
* Turns
*
* arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2
*
* Into
*
* app/my-load-balancer/50dc6c495c0c9188
*/
export declare function loadBalancerNameFromListenerArn(listenerArn: string): string;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,388 @@
/**
* What kind of addresses to allocate to the load balancer
*/
export declare enum IpAddressType {
/**
* Allocate IPv4 addresses
*/
IPV4 = "ipv4",
/**
* Allocate both IPv4 and IPv6 addresses
*/
DUAL_STACK = "dualstack",
/**
* IPv6 only public addresses, with private IPv4 and IPv6 addresses
*/
DUAL_STACK_WITHOUT_PUBLIC_IPV4 = "dualstack-without-public-ipv4"
}
/**
* Backend protocol for network load balancers and health checks
*/
export declare enum Protocol {
/**
* HTTP (ALB health checks and NLB health checks)
*/
HTTP = "HTTP",
/**
* HTTPS (ALB health checks and NLB health checks)
*/
HTTPS = "HTTPS",
/**
* TCP (NLB, NLB health checks)
*/
TCP = "TCP",
/**
* TLS (NLB)
*/
TLS = "TLS",
/**
* UDP (NLB)
*/
UDP = "UDP",
/**
* Listen to both TCP and UDP on the same port (NLB)
*/
TCP_UDP = "TCP_UDP"
}
/**
* Load balancing protocol for application load balancers
*/
export declare enum ApplicationProtocol {
/**
* HTTP
*/
HTTP = "HTTP",
/**
* HTTPS
*/
HTTPS = "HTTPS"
}
/**
* Load balancing protocol version for application load balancers
*/
export declare enum ApplicationProtocolVersion {
/**
* GRPC
*/
GRPC = "GRPC",
/**
* HTTP1
*/
HTTP1 = "HTTP1",
/**
* HTTP2
*/
HTTP2 = "HTTP2"
}
/**
* Elastic Load Balancing provides the following security policies for Application Load Balancers
*
* We recommend the Recommended policy for general use. You can
* use the ForwardSecrecy policy if you require Forward Secrecy
* (FS).
*
* You can use one of the TLS policies to meet compliance and security
* standards that require disabling certain TLS protocol versions, or to
* support legacy clients that require deprecated ciphers.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
*/
export declare enum SslPolicy {
/**
* The recommended security policy for TLS listeners.
* This is the default policy for listeners created using the AWS Management Console
*
* This policy includes TLS 1.3, and is backwards compatible with TLS 1.2
*
* When feature flag @aws-cdk/aws-elasticloadbalancingv2:usePostQuantumTlsPolicy is enabled,
* listeners automatically use the post-quantum policy instead.
*/
RECOMMENDED_TLS = "ELBSecurityPolicy-TLS13-1-2-2021-06",
/**
* TLS 1.3 and 1.2 with post-quantum hybrid key exchange using ML-KEM.
*
* This uses the non-restricted variant (without -Res-) to maintain AES-CBC cipher support
* for TLS 1.2 clients, ensuring backward compatibility.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_12_PQ = "ELBSecurityPolicy-TLS13-1-2-PQ-2025-09",
/**
* The recommended policy for http listeners.
* This is the default security policy for listeners created using the AWS CLI
*/
RECOMMENDED = "ELBSecurityPolicy-2016-08",
/**
* TLS1.2 and 1.3
*/
TLS13_RES = "ELBSecurityPolicy-TLS13-1-2-Res-2021-06",
/**
* TLS1.2 and 1.3 and no SHA ciphers
*/
TLS13_EXT1 = "ELBSecurityPolicy-TLS13-1-2-Ext1-2021-06",
/**
* TLS1.2 and 1.3 with all ciphers
*/
TLS13_EXT2 = "ELBSecurityPolicy-TLS13-1-2-Ext2-2021-06",
/**
* TLS1.0 through 1.3 with all ciphers
*/
TLS13_10 = "ELBSecurityPolicy-TLS13-1-0-2021-06",
/**
* TLS1.1 through 1.3 with all ciphers
*/
TLS13_11 = "ELBSecurityPolicy-TLS13-1-1-2021-06",
/**
* TLS1.3 only
*/
TLS13_13 = "ELBSecurityPolicy-TLS13-1-3-2021-06",
/**
* TLS 1.3 only with post-quantum hybrid key exchange using ML-KEM
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_13_PQ = "ELBSecurityPolicy-TLS13-1-3-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Restricted cipher suite for enhanced security with quantum resistance.
* Removes AES-CBC algorithms. AWS Console default policy for post-quantum cryptography.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_12_RES_PQ = "ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Extended cipher suite 1 with quantum resistance.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_12_EXT1_PQ = "ELBSecurityPolicy-TLS13-1-2-Ext1-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Extended cipher suite 2 with quantum resistance.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_12_EXT2_PQ = "ELBSecurityPolicy-TLS13-1-2-Ext2-PQ-2025-09",
/**
* TLS 1.0 through 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html
*/
TLS13_10_PQ = "ELBSecurityPolicy-TLS13-1-0-PQ-2025-09",
/**
* TLS 1.3 only with AES 128 and 256 GCM SHA ciphers
*/
FIPS_TLS13_13 = "ELBSecurityPolicy-TLS13-1-3-FIPS-2023-04",
/**
* TLS 1.2 and 1.3 with AES and ECDHE GCM/SHA ciphers
*/
FIPS_TLS13_12_RES = "ELBSecurityPolicy-TLS13-1-2-Res-FIPS-2023-04",
/**
* TLS 1.2 and 1.3 with ECDHE SHA/GCM ciphers, excluding SHA1 ciphers
*/
FIPS_TLS13_12 = "ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04",
/**
* TLS 1.2 and 1.3 with all ECDHE ciphers
*/
FIPS_TLS13_12_EXT0 = "ELBSecurityPolicy-TLS13-1-2-Ext0-FIPS-2023-04",
/**
* TLS 1.2 and 1.3 with all AES and ECDHE ciphers excluding SHA1 ciphers
*/
FIPS_TLS13_12_EXT1 = "ELBSecurityPolicy-TLS13-1-2-Ext1-FIPS-2023-04",
/**
* TLS 1.2 and 1.3 with all ciphers
*/
FIPS_TLS13_12_EXT2 = "ELBSecurityPolicy-TLS13-1-2-Ext2-FIPS-2023-04",
/**
* TLS1.1 through 1.3 with all ciphers
*/
FIPS_TLS13_11 = "ELBSecurityPolicy-TLS13-1-1-FIPS-2023-04",
/**
* TLS1.0 through 1.3 with all ciphers
*/
FIPS_TLS13_10 = "ELBSecurityPolicy-TLS13-1-0-FIPS-2023-04",
/**
* TLS 1.3 only with post-quantum hybrid key exchange using ML-KEM
*
* FIPS-compliant with quantum resistance.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_13_PQ = "ELBSecurityPolicy-TLS13-1-3-FIPS-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* FIPS-compliant with quantum resistance.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_12_PQ = "ELBSecurityPolicy-TLS13-1-2-FIPS-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Restricted cipher suite for enhanced security with quantum resistance.
* FIPS-compliant. AWS recommended policy for post-quantum cryptography with FIPS.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_12_RES_PQ = "ELBSecurityPolicy-TLS13-1-2-Res-FIPS-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Extended cipher suite 0 with quantum resistance. FIPS-compliant.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_12_EXT0_PQ = "ELBSecurityPolicy-TLS13-1-2-Ext0-FIPS-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Extended cipher suite 1 with quantum resistance. FIPS-compliant.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_12_EXT1_PQ = "ELBSecurityPolicy-TLS13-1-2-Ext1-FIPS-PQ-2025-09",
/**
* TLS 1.2 and 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* Extended cipher suite 2 with quantum resistance. FIPS-compliant.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_12_EXT2_PQ = "ELBSecurityPolicy-TLS13-1-2-Ext2-FIPS-PQ-2025-09",
/**
* TLS 1.0 through 1.3 with post-quantum hybrid key exchange using ML-KEM
*
* FIPS-compliant with quantum resistance.
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html#fips-security-policies
*/
FIPS_TLS13_10_PQ = "ELBSecurityPolicy-TLS13-1-0-FIPS-PQ-2025-09",
/**
* Strong foward secrecy ciphers and TLV1.2 only (2020 edition).
* Same as FORWARD_SECRECY_TLS12_RES, but only supports GCM versions of the TLS ciphers
*/
FORWARD_SECRECY_TLS12_RES_GCM = "ELBSecurityPolicy-FS-1-2-Res-2020-10",
/**
* Strong forward secrecy ciphers and TLS1.2 only
*/
FORWARD_SECRECY_TLS12_RES = "ELBSecurityPolicy-FS-1-2-Res-2019-08",
/**
* Forward secrecy ciphers and TLS1.2 only
*/
FORWARD_SECRECY_TLS12 = "ELBSecurityPolicy-FS-1-2-2019-08",
/**
* Forward secrecy ciphers only with TLS1.1 and 1.2
*/
FORWARD_SECRECY_TLS11 = "ELBSecurityPolicy-FS-1-1-2019-08",
/**
* Forward secrecy ciphers only
*/
FORWARD_SECRECY = "ELBSecurityPolicy-FS-2018-06",
/**
* TLS1.2 only and no SHA ciphers
*/
TLS12 = "ELBSecurityPolicy-TLS-1-2-2017-01",
/**
* TLS1.2 only with all ciphers
*/
TLS12_EXT = "ELBSecurityPolicy-TLS-1-2-Ext-2018-06",
/**
* TLS1.1 and 1.2 with all ciphers
*/
TLS11 = "ELBSecurityPolicy-TLS-1-1-2017-01",
/**
* Support for DES-CBC3-SHA
*
* Do not use this security policy unless you must support a legacy client
* that requires the DES-CBC3-SHA cipher, which is a weak cipher.
*/
LEGACY = "ELBSecurityPolicy-TLS-1-0-2015-04"
}
/**
* How to interpret the load balancing target identifiers
*/
export declare enum TargetType {
/**
* Targets identified by instance ID
*/
INSTANCE = "instance",
/**
* Targets identified by IP address
*/
IP = "ip",
/**
* Target is a single Lambda Function
*/
LAMBDA = "lambda",
/**
* Target is a single Application Load Balancer
*/
ALB = "alb"
}
/**
* Application-Layer Protocol Negotiation Policies for network load balancers.
* Which protocols should be used over a secure connection.
*/
export declare enum AlpnPolicy {
/**
* Negotiate only HTTP/1.*. The ALPN preference list is http/1.1, http/1.0
*/
HTTP1_ONLY = "HTTP1Only",
/**
* Negotiate only HTTP/2. The ALPN preference list is h2
*/
HTTP2_ONLY = "HTTP2Only",
/**
* Prefer HTTP/1.* over HTTP/2 (which can be useful for HTTP/2 testing). The ALPN preference list is http/1.1, http/1.0, h2
*/
HTTP2_OPTIONAL = "HTTP2Optional",
/**
* Prefer HTTP/2 over HTTP/1.*. The ALPN preference list is h2, http/1.1, http/1.0
*/
HTTP2_PREFERRED = "HTTP2Preferred",
/**
* Do not negotiate ALPN
*/
NONE = "None"
}
/**
* Load balancing algorithmm type for target groups
*/
export declare enum TargetGroupLoadBalancingAlgorithmType {
/**
* round_robin
*/
ROUND_ROBIN = "round_robin",
/**
* least_outstanding_requests
*/
LEAST_OUTSTANDING_REQUESTS = "least_outstanding_requests",
/**
* weighted_random
*/
WEIGHTED_RANDOM = "weighted_random"
}
/**
* How the load balancer handles requests that might pose a security risk to your application
*
* @see https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#desync-mitigation-mode
*/
export declare enum DesyncMitigationMode {
/**
* Allows all traffic
*/
MONITOR = "monitor",
/**
* Provides durable mitigation against HTTP desync while maintaining the availability of your application
*/
DEFENSIVE = "defensive",
/**
* Receives only requests that comply with RFC 7230
*/
STRICTEST = "strictest"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,35 @@
import type { IDependable } from 'constructs';
import { Construct } from 'constructs';
import type { ITargetGroup } from './base-target-group';
import * as cdk from '../../../core';
import type { aws_elasticloadbalancingv2 } from '../../../interfaces';
/**
* Base internal class for existing target groups
*/
export declare abstract class ImportedTargetGroupBase extends Construct implements ITargetGroup {
/**
* ARN of the target group
*/
readonly targetGroupArn: string;
/**
* A reference to this target group
*/
get targetGroupRef(): aws_elasticloadbalancingv2.TargetGroupReference;
/**
* The environment this resource belongs to
*/
get env(): cdk.ResourceEnvironment;
/**
* The name of the target group
*/
readonly targetGroupName: string;
/**
* A token representing a list of ARNs of the load balancers that route traffic to this target group
*/
readonly loadBalancerArns: string;
/**
* Return an object to depend on the listeners added to this target group
*/
readonly loadBalancerAttached: IDependable;
constructor(scope: Construct, id: string, props: TargetGroupImportProps);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImportedTargetGroupBase=void 0;var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp};class ImportedTargetGroupBase extends constructs_1().Construct{targetGroupArn;get targetGroupRef(){return{targetGroupArn:this.targetGroupArn}}get env(){return cdk().Stack.of(this).env}targetGroupName;loadBalancerArns;loadBalancerAttached=new(constructs_1()).DependencyGroup;constructor(scope,id,props){super(scope,id),this.targetGroupArn=props.targetGroupArn,this.targetGroupName=cdk().Stack.of(scope).splitArn(props.targetGroupArn,cdk().ArnFormat.SLASH_RESOURCE_NAME).resourceName.split("/")[0],this.loadBalancerArns=props.loadBalancerArns||cdk().Aws.NO_VALUE}}exports.ImportedTargetGroupBase=ImportedTargetGroupBase;

View File

@@ -0,0 +1,14 @@
import type { CfnListener, CfnListenerRule } from '../elasticloadbalancingv2.generated';
/**
* Interface for listener actions
*/
export interface IListenerAction {
/**
* Render the listener default actions in this chain
*/
renderActions(): CfnListener.ActionProperty[];
/**
* Render the listener rule actions in this chain
*/
renderRuleActions(): CfnListenerRule.ActionProperty[];
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});

View File

@@ -0,0 +1,28 @@
import type { ICertificateRef } from '../../../interfaces/generated/aws-certificatemanager-interfaces.generated';
/**
* A certificate source for an ELBv2 listener
*/
export interface IListenerCertificate {
/**
* The ARN of the certificate to use
*/
readonly certificateArn: string;
}
/**
* A certificate source for an ELBv2 listener
*/
export declare class ListenerCertificate implements IListenerCertificate {
/**
* Use an ACM certificate as a listener certificate
*/
static fromCertificateManager(this: void, acmCertificate: ICertificateRef): ListenerCertificate;
/**
* Use any certificate, identified by its ARN, as a listener certificate
*/
static fromArn(this: void, certificateArn: string): ListenerCertificate;
/**
* The ARN of the certificate to use
*/
readonly certificateArn: string;
protected constructor(certificateArn: string);
}

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ListenerCertificate=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class ListenerCertificate{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2.ListenerCertificate",version:"2.252.0"};static fromCertificateManager(acmCertificate){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_certificatemanager_ICertificateRef(acmCertificate)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromCertificateManager),error}return new ListenerCertificate(acmCertificate.certificateRef.certificateId)}static fromArn(certificateArn){return new ListenerCertificate(certificateArn)}certificateArn;constructor(certificateArn){this.certificateArn=certificateArn}}exports.ListenerCertificate=ListenerCertificate;

View File

@@ -0,0 +1,3 @@
import type { LoadBalancerTargetProps } from './base-target-group';
import type { IApplicationLoadBalancerTarget, IApplicationTargetGroup } from '../alb/application-target-group';
import type { INetworkLoadBalancerTarget, INetworkTargetGroup } from '../nlb/network-target-group';

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.IpTarget=exports.InstanceTarget=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var enums_1=()=>{var tmp=require("./enums");return enums_1=()=>tmp,tmp};class InstanceTarget{instanceId;port;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2.InstanceTarget",version:"2.252.0"};constructor(instanceId,port){this.instanceId=instanceId,this.port=port}attachToApplicationTargetGroup(targetGroup){return this.attach(targetGroup)}attachToNetworkTargetGroup(targetGroup){return this.attach(targetGroup)}attach(_targetGroup){return{targetType:enums_1().TargetType.INSTANCE,targetJson:{id:this.instanceId,port:this.port}}}}exports.InstanceTarget=InstanceTarget;class IpTarget{ipAddress;port;availabilityZone;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_elasticloadbalancingv2.IpTarget",version:"2.252.0"};constructor(ipAddress,port,availabilityZone){this.ipAddress=ipAddress,this.port=port,this.availabilityZone=availabilityZone}attachToApplicationTargetGroup(targetGroup){return this.attach(targetGroup)}attachToNetworkTargetGroup(targetGroup){return this.attach(targetGroup)}attach(_targetGroup){return{targetType:enums_1().TargetType.IP,targetJson:{id:this.ipAddress,port:this.port,availabilityZone:this.availabilityZone}}}}exports.IpTarget=IpTarget;

View File

@@ -0,0 +1,46 @@
import { ApplicationProtocol, Protocol } from './enums';
import type * as cxschema from '../../../cloud-assembly-schema';
export type Attributes = {
[key: string]: string | undefined;
};
/**
* Render an attribute dict to a list of { key, value } pairs
*/
export declare function renderAttributes(attributes: Attributes): any[];
/**
* Return the appropriate default port for a given protocol
*/
export declare function defaultPortForProtocol(proto: ApplicationProtocol): number;
/**
* Return the appropriate default protocol for a given port
*/
export declare function defaultProtocolForPort(port: number): ApplicationProtocol;
/**
* Given a protocol and a port, try to guess the other one if it's undefined
*/
export declare function determineProtocolAndPort(protocol: ApplicationProtocol | undefined, port: number | undefined): [ApplicationProtocol | undefined, number | undefined];
/**
* Helper function to default undefined input props
*/
export declare function ifUndefined<T>(x: T | undefined, def: T): T;
/**
* Helper function for ensuring network listeners and target groups only accept valid
* protocols.
*/
export declare function validateNetworkProtocol(protocol: Protocol): void;
/**
* Helper to map a map of tags to cxschema tag format.
* @internal
*/
export declare function mapTagMapToCxschema(tagMap: Record<string, string>): cxschema.Tag[];
export declare function parseLoadBalancerFullName(arn: string): string;
/**
* Transforms:
*
* arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/my-target-group/da693d633af407a0
*
* Into:
*
* targetgroup/my-target-group/da693d633af407a0
*/
export declare function parseTargetGroupFullName(arn: string): string;

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.renderAttributes=renderAttributes,exports.defaultPortForProtocol=defaultPortForProtocol,exports.defaultProtocolForPort=defaultProtocolForPort,exports.determineProtocolAndPort=determineProtocolAndPort,exports.ifUndefined=ifUndefined,exports.validateNetworkProtocol=validateNetworkProtocol,exports.mapTagMapToCxschema=mapTagMapToCxschema,exports.parseLoadBalancerFullName=parseLoadBalancerFullName,exports.parseTargetGroupFullName=parseTargetGroupFullName;var enums_1=()=>{var tmp=require("./enums");return enums_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};function renderAttributes(attributes){const ret=[];for(const[key,value]of Object.entries(attributes))value!==void 0&&ret.push({key,value});return ret}function defaultPortForProtocol(proto){switch(proto){case enums_1().ApplicationProtocol.HTTP:return 80;case enums_1().ApplicationProtocol.HTTPS:return 443;default:throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`UnrecognizedProtocol`,`Unrecognized protocol: ${proto}`)}}function defaultProtocolForPort(port){switch(port){case 80:case 8e3:case 8008:case 8080:return enums_1().ApplicationProtocol.HTTP;case 443:case 8443:return enums_1().ApplicationProtocol.HTTPS;default:throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`DonTKnowDefaultProtocol`,`Don't know default protocol for port: ${port}; please supply a protocol`)}}function determineProtocolAndPort(protocol,port){return protocol===void 0&&port===void 0?[void 0,void 0]:(protocol===void 0&&(protocol=defaultProtocolForPort(port)),port===void 0&&(port=defaultPortForProtocol(protocol)),[protocol,port])}function ifUndefined(x,def){return x??def}function validateNetworkProtocol(protocol){const NLB_PROTOCOLS=[enums_1().Protocol.TCP,enums_1().Protocol.TLS,enums_1().Protocol.UDP,enums_1().Protocol.TCP_UDP];if(NLB_PROTOCOLS.indexOf(protocol)===-1)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeProtocol`,`The protocol must be one of ${NLB_PROTOCOLS.join(", ")}. Found ${protocol}`)}function mapTagMapToCxschema(tagMap){return Object.entries(tagMap).map(([key,value])=>({key,value}))}function parseLoadBalancerFullName(arn){if(core_1().Token.isUnresolved(arn)){const arnParts=core_1().Fn.split("/",arn);return`${core_1().Fn.select(1,arnParts)}/${core_1().Fn.select(2,arnParts)}/${core_1().Fn.select(3,arnParts)}`}else{const resourceName=core_1().Arn.split(arn,core_1().ArnFormat.SLASH_RESOURCE_NAME).resourceName;if(!resourceName)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`ProvidedDoesBelongLoad`,`Provided ARN does not belong to a load balancer: ${arn}`);return resourceName}}function parseTargetGroupFullName(arn){const resource=core_1().Arn.split(arn,core_1().ArnFormat.NO_RESOURCE_NAME).resource;if(!resource)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`ProvidedDoesBelongTarget`,`Provided ARN does not belong to a target group: ${arn}`);return resource}