Skip to content

Commit e146375

Browse files
authored
docs(elbv2): clarify target group documentation (#24938)
The Target Group documentation improperly described the `port` property as where the _listener_ listened for traffic; however, this property is for the _target group_ and has no bearing on any created listeners. Additionally, `protocol` is not just optional for Lambda functions, it is entirely ignored. This updates the wording to be slightly closer to the documentation on the `AWS::ElasticLoadBalancingV2::TargetGroup` resource documentation from CloudFormation. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 963634b commit e146375

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ import { determineProtocolAndPort, parseLoadBalancerFullName, parseTargetGroupFu
1818
*/
1919
export interface ApplicationTargetGroupProps extends BaseTargetGroupProps {
2020
/**
21-
* The protocol to use
21+
* The protocol used for communication with the target.
2222
*
23-
* @default - Determined from port if known, optional for Lambda targets.
23+
* This is not applicable for Lambda targets.
24+
*
25+
* @default - Determined from port if known
2426
*/
2527
readonly protocol?: ApplicationProtocol;
2628

@@ -32,9 +34,11 @@ export interface ApplicationTargetGroupProps extends BaseTargetGroupProps {
3234
readonly protocolVersion?: ApplicationProtocolVersion;
3335

3436
/**
35-
* The port on which the listener listens for requests.
37+
* The port on which the target receives traffic.
38+
*
39+
* This is not applicable for Lambda targets.
3640
*
37-
* @default - Determined from protocol if known, optional for Lambda targets.
41+
* @default - Determined from protocol if known
3842
*/
3943
readonly port?: number;
4044

packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { parseLoadBalancerFullName, parseTargetGroupFullName, validateNetworkPro
1515
*/
1616
export interface NetworkTargetGroupProps extends BaseTargetGroupProps {
1717
/**
18-
* The port on which the listener listens for requests.
18+
* The port on which the target receives traffic.
1919
*/
2020
readonly port: number;
2121

0 commit comments

Comments
 (0)