CfnLoadBalancerProps
- class aws_cdk.aws_elasticloadbalancing.CfnLoadBalancerProps(*, listeners, access_logging_policy=None, app_cookie_stickiness_policy=None, availability_zones=None, connection_draining_policy=None, connection_settings=None, cross_zone=None, health_check=None, instances=None, lb_cookie_stickiness_policy=None, load_balancer_name=None, policies=None, scheme=None, security_groups=None, subnets=None, tags=None)
Bases:
object
Properties for defining a
CfnLoadBalancer
.- Parameters:
listeners (
Union
[IResolvable
,Sequence
[Union
[ListenersProperty
,Dict
[str
,Any
],IResolvable
]]]) – The listeners for the load balancer. You can specify at most one listener per port. If you update the properties for a listener, AWS CloudFormation deletes the existing listener and creates a new one with the specified properties. While the new listener is being created, clients cannot connect to the load balancer.access_logging_policy (
Union
[IResolvable
,AccessLoggingPolicyProperty
,Dict
[str
,Any
],None
]) – Information about where and how access logs are stored for the load balancer.app_cookie_stickiness_policy (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,AppCookieStickinessPolicyProperty
,Dict
[str
,Any
]]],None
]) – Information about a policy for application-controlled session stickiness.availability_zones (
Optional
[Sequence
[str
]]) – The Availability Zones for the load balancer. For load balancers in a VPC, specifySubnets
instead. Update requires replacement if you did not previously specify an Availability Zone or if you are removing all Availability Zones. Otherwise, update requires no interruption.connection_draining_policy (
Union
[IResolvable
,ConnectionDrainingPolicyProperty
,Dict
[str
,Any
],None
]) – If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance. For more information, see Configure Connection Draining in the Classic Load Balancers Guide .connection_settings (
Union
[IResolvable
,ConnectionSettingsProperty
,Dict
[str
,Any
],None
]) – If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration. By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Classic Load Balancers Guide .cross_zone (
Union
[bool
,IResolvable
,None
]) – If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones. For more information, see Configure Cross-Zone Load Balancing in the Classic Load Balancers Guide .health_check (
Union
[IResolvable
,HealthCheckProperty
,Dict
[str
,Any
],None
]) – The health check settings to use when evaluating the health of your EC2 instances. Update requires replacement if you did not previously specify health check settings or if you are removing the health check settings. Otherwise, update requires no interruption.instances (
Optional
[Sequence
[str
]]) – The IDs of the instances for the load balancer.lb_cookie_stickiness_policy (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,LBCookieStickinessPolicyProperty
,Dict
[str
,Any
]]],None
]) – Information about a policy for duration-based session stickiness.load_balancer_name (
Optional
[str
]) – The name of the load balancer. This name must be unique within your set of load balancers for the region. If you don’t specify a name, AWS CloudFormation generates a unique physical ID for the load balancer. For more information, see Name Type . If you specify a name, you cannot perform updates that require replacement of this resource, but you can perform other updates. To replace the resource, specify a new name.policies (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,PoliciesProperty
,Dict
[str
,Any
]]],None
]) – The policies defined for your Classic Load Balancer. Specify only back-end server policies.scheme (
Optional
[str
]) – The type of load balancer. Valid only for load balancers in a VPC. IfScheme
isinternet-facing
, the load balancer has a public DNS name that resolves to a public IP address. IfScheme
isinternal
, the load balancer has a public DNS name that resolves to a private IP address.security_groups (
Optional
[Sequence
[str
]]) – The security groups for the load balancer. Valid only for load balancers in a VPC.subnets (
Optional
[Sequence
[str
]]) – The IDs of the subnets for the load balancer. You can specify at most one subnet per Availability Zone. Update requires replacement if you did not previously specify a subnet or if you are removing all subnets. Otherwise, update requires no interruption. To update to a different subnet in the current Availability Zone, you must first update to a subnet in a different Availability Zone, then update to the new subnet in the original Availability Zone.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The tags associated with a load balancer.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb.html
- 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.aws_elasticloadbalancing as elb # attributes: Any cfn_load_balancer_props = elb.CfnLoadBalancerProps( listeners=[elb.CfnLoadBalancer.ListenersProperty( instance_port="instancePort", load_balancer_port="loadBalancerPort", protocol="protocol", # the properties below are optional instance_protocol="instanceProtocol", policy_names=["policyNames"], ssl_certificate_id="sslCertificateId" )], # the properties below are optional access_logging_policy=elb.CfnLoadBalancer.AccessLoggingPolicyProperty( enabled=False, s3_bucket_name="s3BucketName", # the properties below are optional emit_interval=123, s3_bucket_prefix="s3BucketPrefix" ), app_cookie_stickiness_policy=[elb.CfnLoadBalancer.AppCookieStickinessPolicyProperty( cookie_name="cookieName", policy_name="policyName" )], availability_zones=["availabilityZones"], connection_draining_policy=elb.CfnLoadBalancer.ConnectionDrainingPolicyProperty( enabled=False, # the properties below are optional timeout=123 ), connection_settings=elb.CfnLoadBalancer.ConnectionSettingsProperty( idle_timeout=123 ), cross_zone=False, health_check=elb.CfnLoadBalancer.HealthCheckProperty( healthy_threshold="healthyThreshold", interval="interval", target="target", timeout="timeout", unhealthy_threshold="unhealthyThreshold" ), instances=["instances"], lb_cookie_stickiness_policy=[elb.CfnLoadBalancer.LBCookieStickinessPolicyProperty( cookie_expiration_period="cookieExpirationPeriod", policy_name="policyName" )], load_balancer_name="loadBalancerName", policies=[elb.CfnLoadBalancer.PoliciesProperty( attributes=[attributes], policy_name="policyName", policy_type="policyType", # the properties below are optional instance_ports=["instancePorts"], load_balancer_ports=["loadBalancerPorts"] )], scheme="scheme", security_groups=["securityGroups"], subnets=["subnets"], tags=[CfnTag( key="key", value="value" )] )
Attributes
- access_logging_policy
Information about where and how access logs are stored for the load balancer.
- app_cookie_stickiness_policy
Information about a policy for application-controlled session stickiness.
- availability_zones
The Availability Zones for the load balancer. For load balancers in a VPC, specify
Subnets
instead.Update requires replacement if you did not previously specify an Availability Zone or if you are removing all Availability Zones. Otherwise, update requires no interruption.
- connection_draining_policy
If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance.
For more information, see Configure Connection Draining in the Classic Load Balancers Guide .
- connection_settings
If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.
By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Classic Load Balancers Guide .
- cross_zone
If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.
For more information, see Configure Cross-Zone Load Balancing in the Classic Load Balancers Guide .
- health_check
The health check settings to use when evaluating the health of your EC2 instances.
Update requires replacement if you did not previously specify health check settings or if you are removing the health check settings. Otherwise, update requires no interruption.
- instances
The IDs of the instances for the load balancer.
- lb_cookie_stickiness_policy
Information about a policy for duration-based session stickiness.
- listeners
The listeners for the load balancer. You can specify at most one listener per port.
If you update the properties for a listener, AWS CloudFormation deletes the existing listener and creates a new one with the specified properties. While the new listener is being created, clients cannot connect to the load balancer.
- load_balancer_name
The name of the load balancer.
This name must be unique within your set of load balancers for the region.
If you don’t specify a name, AWS CloudFormation generates a unique physical ID for the load balancer. For more information, see Name Type . If you specify a name, you cannot perform updates that require replacement of this resource, but you can perform other updates. To replace the resource, specify a new name.
- policies
The policies defined for your Classic Load Balancer.
Specify only back-end server policies.
- scheme
The type of load balancer. Valid only for load balancers in a VPC.
If
Scheme
isinternet-facing
, the load balancer has a public DNS name that resolves to a public IP address.If
Scheme
isinternal
, the load balancer has a public DNS name that resolves to a private IP address.
- security_groups
The security groups for the load balancer.
Valid only for load balancers in a VPC.
- subnets
The IDs of the subnets for the load balancer. You can specify at most one subnet per Availability Zone.
Update requires replacement if you did not previously specify a subnet or if you are removing all subnets. Otherwise, update requires no interruption. To update to a different subnet in the current Availability Zone, you must first update to a subnet in a different Availability Zone, then update to the new subnet in the original Availability Zone.
- tags
The tags associated with a load balancer.