ApplicationLoadBalancerProps
- class aws_cdk.aws_ecs_patterns.ApplicationLoadBalancerProps(*, listeners, name, domain_name=None, domain_zone=None, idle_timeout=None, public_load_balancer=None)
Bases:
object
Properties to define an application load balancer.
- Parameters:
listeners (
Sequence
[Union
[ApplicationListenerProps
,Dict
[str
,Any
]]]) – Listeners (at least one listener) attached to this load balancer.name (
str
) – Name of the load balancer.domain_name (
Optional
[str
]) – The domain name for the service, e.g. “api.example.com.”. Default: - No domain name.domain_zone (
Optional
[IHostedZone
]) – The Route53 hosted zone for the domain, e.g. “example.com.”. Default: - No Route53 hosted domain zone.idle_timeout (
Optional
[Duration
]) – The load balancer idle timeout, in seconds. Can be between 1 and 4000 seconds. Default: - CloudFormation sets idle timeout to 60 secondspublic_load_balancer (
Optional
[bool
]) – Determines whether the Load Balancer will be internet-facing. Default: true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk from aws_cdk import aws_certificatemanager as certificatemanager from aws_cdk import aws_ecs_patterns as ecs_patterns from aws_cdk import aws_elasticloadbalancingv2 as elbv2 from aws_cdk import aws_route53 as route53 # certificate: certificatemanager.Certificate # hosted_zone: route53.HostedZone application_load_balancer_props = ecs_patterns.ApplicationLoadBalancerProps( listeners=[ecs_patterns.ApplicationListenerProps( name="name", # the properties below are optional certificate=certificate, port=123, protocol=elbv2.ApplicationProtocol.HTTP, ssl_policy=elbv2.SslPolicy.RECOMMENDED_TLS )], name="name", # the properties below are optional domain_name="domainName", domain_zone=hosted_zone, idle_timeout=cdk.Duration.minutes(30), public_load_balancer=False )
Attributes
- domain_name
The domain name for the service, e.g. “api.example.com.”.
- Default:
No domain name.
- domain_zone
The Route53 hosted zone for the domain, e.g. “example.com.”.
- Default:
No Route53 hosted domain zone.
- idle_timeout
The load balancer idle timeout, in seconds.
Can be between 1 and 4000 seconds.
- Default:
CloudFormation sets idle timeout to 60 seconds
- listeners
Listeners (at least one listener) attached to this load balancer.
- name
Name of the load balancer.
- public_load_balancer
Determines whether the Load Balancer will be internet-facing.
- Default:
true