Each argument of the Python example should be an EcsTarget with the properties given as keyword arguments. The keyword args are instead given as keyword arguments to register_load_balancer_targets, which is wrong.
Thanks for reporting this Jerry, I've come across similar instances of this in the past. Here's a similar issue where this occurs https://github.com/aws/aws-cdk/issues/4900
Describe the issue
In the TypeScript API Ref, the example for
Ec2Service.registerLoadBalancerTargets
looks like this:The Python version of the example looks like this:
Each argument of the Python example should be an EcsTarget with the properties given as keyword arguments. The keyword args are instead given as keyword arguments to
register_load_balancer_targets
, which is wrong.Links
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_ecs/Ec2Service.html#aws_cdk.aws_ecs.Ec2Service.register_load_balancer_targets