package awselasticloadbalancingv2 import ( "github.com/aws/aws-cdk-go/awscdk/v2" "github.com/aws/aws-cdk-go/awscdk/v2/awsec2" ) // Properties for defining an Application Load Balancer. // // Example: // var cluster cluster // var taskDefinition taskDefinition // var vpc vpc // // service := ecs.NewFargateService(this, jsii.String("Service"), &FargateServiceProps{ // Cluster: Cluster, // TaskDefinition: TaskDefinition, // }) // // lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &ApplicationLoadBalancerProps{ // Vpc: Vpc, // InternetFacing: jsii.Boolean(true), // }) // listener := lb.AddListener(jsii.String("Listener"), &BaseApplicationListenerProps{ // Port: jsii.Number(80), // }) // service.RegisterLoadBalancerTargets(&EcsTarget{ // ContainerName: jsii.String("web"), // ContainerPort: jsii.Number(80), // NewTargetGroupId: jsii.String("ECS"), // Listener: ecs.ListenerConfig_ApplicationListener(listener, &AddApplicationTargetsProps{ // Protocol: elbv2.ApplicationProtocol_HTTPS, // }), // }) // type ApplicationLoadBalancerProps struct { // The VPC network to place the load balancer in. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` // Indicates whether deletion protection is enabled. DeletionProtection *bool `field:"optional" json:"deletionProtection" yaml:"deletionProtection"` // Whether the load balancer has an internet-routable address. InternetFacing *bool `field:"optional" json:"internetFacing" yaml:"internetFacing"` // Name of the load balancer. LoadBalancerName *string `field:"optional" json:"loadBalancerName" yaml:"loadBalancerName"` // Which subnets place the load balancer in. VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"` // Determines how the load balancer handles requests that might pose a security risk to your application. DesyncMitigationMode DesyncMitigationMode `field:"optional" json:"desyncMitigationMode" yaml:"desyncMitigationMode"` // Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). DropInvalidHeaderFields *bool `field:"optional" json:"dropInvalidHeaderFields" yaml:"dropInvalidHeaderFields"` // Indicates whether HTTP/2 is enabled. Http2Enabled *bool `field:"optional" json:"http2Enabled" yaml:"http2Enabled"` // The load balancer idle timeout, in seconds. IdleTimeout awscdk.Duration `field:"optional" json:"idleTimeout" yaml:"idleTimeout"` // The type of IP addresses to use. // // Only applies to application load balancers. IpAddressType IpAddressType `field:"optional" json:"ipAddressType" yaml:"ipAddressType"` // Security group to associate with this load balancer. SecurityGroup awsec2.ISecurityGroup `field:"optional" json:"securityGroup" yaml:"securityGroup"` }