interface CfnLoadBalancerProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElasticLoadBalancing.CfnLoadBalancerProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancing#CfnLoadBalancerProps |
![]() | software.amazon.awscdk.services.elasticloadbalancing.CfnLoadBalancerProps |
![]() | aws_cdk.aws_elasticloadbalancing.CfnLoadBalancerProps |
![]() | aws-cdk-lib » aws_elasticloadbalancing » CfnLoadBalancerProps |
Properties for defining a CfnLoadBalancer
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancing as elb } from 'aws-cdk-lib';
declare const attributes: any;
const cfnLoadBalancerProps: elb.CfnLoadBalancerProps = {
listeners: [{
instancePort: 'instancePort',
loadBalancerPort: 'loadBalancerPort',
protocol: 'protocol',
// the properties below are optional
instanceProtocol: 'instanceProtocol',
policyNames: ['policyNames'],
sslCertificateId: 'sslCertificateId',
}],
// the properties below are optional
accessLoggingPolicy: {
enabled: false,
s3BucketName: 's3BucketName',
// the properties below are optional
emitInterval: 123,
s3BucketPrefix: 's3BucketPrefix',
},
appCookieStickinessPolicy: [{
cookieName: 'cookieName',
policyName: 'policyName',
}],
availabilityZones: ['availabilityZones'],
connectionDrainingPolicy: {
enabled: false,
// the properties below are optional
timeout: 123,
},
connectionSettings: {
idleTimeout: 123,
},
crossZone: false,
healthCheck: {
healthyThreshold: 'healthyThreshold',
interval: 'interval',
target: 'target',
timeout: 'timeout',
unhealthyThreshold: 'unhealthyThreshold',
},
instances: ['instances'],
lbCookieStickinessPolicy: [{
cookieExpirationPeriod: 'cookieExpirationPeriod',
policyName: 'policyName',
}],
loadBalancerName: 'loadBalancerName',
policies: [{
attributes: [attributes],
policyName: 'policyName',
policyType: 'policyType',
// the properties below are optional
instancePorts: ['instancePorts'],
loadBalancerPorts: ['loadBalancerPorts'],
}],
scheme: 'scheme',
securityGroups: ['securityGroups'],
subnets: ['subnets'],
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
listeners | IResolvable | IResolvable | Listeners [] | The listeners for the load balancer. You can specify at most one listener per port. |
access | IResolvable | Access | Information about where and how access logs are stored for the load balancer. |
app | IResolvable | IResolvable | App [] | Information about a policy for application-controlled session stickiness. |
availability | string[] | The Availability Zones for a load balancer in a default VPC. |
connection | IResolvable | Connection | If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance. |
connection | IResolvable | Connection | If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration. |
cross | boolean | IResolvable | If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones. |
health | IResolvable | Health | The health check settings to use when evaluating the health of your EC2 instances. |
instances? | string[] | The IDs of the instances for the load balancer. |
lb | IResolvable | IResolvable | LBCookie [] | Information about a policy for duration-based session stickiness. |
load | string | The name of the load balancer. |
policies? | IResolvable | IResolvable | Policies [] | The policies defined for your Classic Load Balancer. |
scheme? | string | The type of load balancer. Valid only for load balancers in a VPC. |
security | string[] | The security groups for the load balancer. |
subnets? | string[] | The IDs of the subnets for the load balancer. You can specify at most one subnet per Availability Zone. |
tags? | Cfn [] | The tags associated with a load balancer. |
listeners
Type:
IResolvable
|
IResolvable
|
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.
accessLoggingPolicy?
Type:
IResolvable
|
Access
(optional)
Information about where and how access logs are stored for the load balancer.
appCookieStickinessPolicy?
Type:
IResolvable
|
IResolvable
|
App
[]
(optional)
Information about a policy for application-controlled session stickiness.
availabilityZones?
Type:
string[]
(optional)
The Availability Zones for a load balancer in a default VPC.
For a load balancer in a nondefault 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.
connectionDrainingPolicy?
Type:
IResolvable
|
Connection
(optional)
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 User Guide for Classic Load Balancers .
connectionSettings?
Type:
IResolvable
|
Connection
(optional)
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 User Guide for Classic Load Balancers .
crossZone?
Type:
boolean |
IResolvable
(optional)
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 User Guide for Classic Load Balancers .
healthCheck?
Type:
IResolvable
|
Health
(optional)
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?
Type:
string[]
(optional)
The IDs of the instances for the load balancer.
lbCookieStickinessPolicy?
Type:
IResolvable
|
IResolvable
|
LBCookie
[]
(optional)
Information about a policy for duration-based session stickiness.
loadBalancerName?
Type:
string
(optional)
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?
Type:
IResolvable
|
IResolvable
|
Policies
[]
(optional)
The policies defined for your Classic Load Balancer.
Specify only back-end server policies.
scheme?
Type:
string
(optional)
The type of load balancer. Valid only for load balancers in a VPC.
If Scheme
is internet-facing
, the load balancer has a public DNS name that resolves to a public IP address.
If Scheme
is internal
, the load balancer has a public DNS name that resolves to a private IP address.
securityGroups?
Type:
string[]
(optional)
The security groups for the load balancer.
Valid only for load balancers in a VPC.
subnets?
Type:
string[]
(optional)
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?
Type:
Cfn
[]
(optional)
The tags associated with a load balancer.