interface ApplicationTargetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.Patterns.ApplicationTargetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecspatterns#ApplicationTargetProps |
![]() | software.amazon.awscdk.services.ecs.patterns.ApplicationTargetProps |
![]() | aws_cdk.aws_ecs_patterns.ApplicationTargetProps |
![]() | aws-cdk-lib » aws_ecs_patterns » ApplicationTargetProps |
Properties to define an application target group.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_ecs_patterns as ecs_patterns } from 'aws-cdk-lib';
const applicationTargetProps: ecs_patterns.ApplicationTargetProps = {
containerPort: 123,
// the properties below are optional
hostHeader: 'hostHeader',
listener: 'listener',
pathPattern: 'pathPattern',
priority: 123,
protocol: ecs.Protocol.TCP,
};
Properties
Name | Type | Description |
---|---|---|
container | number | The port number of the container. |
host | string | Rule applies if the requested host matches the indicated host. |
listener? | string | Name of the listener the target group attached to. |
path | string | Rule applies if the requested path matches the given path pattern. |
priority? | number | Priority of this target group. |
protocol? | Protocol | The protocol used for the port mapping. |
containerPort
Type:
number
The port number of the container.
Only applicable when using application/network load balancers.
hostHeader?
Type:
string
(optional, default: No host condition)
Rule applies if the requested host matches the indicated host.
May contain up to three '*' wildcards.
Requires that priority is set.
listener?
Type:
string
(optional, default: default listener (first added listener))
Name of the listener the target group attached to.
pathPattern?
Type:
string
(optional, default: No path condition)
Rule applies if the requested path matches the given path pattern.
May contain up to three '*' wildcards.
Requires that priority is set.
priority?
Type:
number
(optional, default: Target groups are used as defaults)
Priority of this target group.
The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.
Priorities must be unique.
protocol?
Type:
Protocol
(optional, default: ecs.Protocol.TCP)
The protocol used for the port mapping.
Only applicable when using application load balancers.