interface ServiceConnectProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.ServiceConnectProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ServiceConnectProps |
![]() | software.amazon.awscdk.services.ecs.ServiceConnectProps |
![]() | aws_cdk.aws_ecs.ServiceConnectProps |
![]() | aws-cdk-lib » aws_ecs » ServiceConnectProps |
Interface for Service Connect configuration.
Example
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;
const customService = new ecs.FargateService(this, 'CustomizedService', {
cluster,
taskDefinition,
minHealthyPercent: 100,
serviceConnectConfiguration: {
logDriver: ecs.LogDrivers.awsLogs({
streamPrefix: 'sc-traffic',
}),
services: [
{
portMappingName: 'api',
dnsName: 'customized-api',
port: 80,
ingressPortOverride: 20040,
discoveryName: 'custom',
},
],
},
});
Properties
Name | Type | Description |
---|---|---|
log | Log | The log driver configuration to use for the Service Connect agent logs. |
namespace? | string | The cloudmap namespace to register this service into. |
services? | Service [] | The list of Services, including a port mapping, terse client alias, and optional intermediate DNS name. |
logDriver?
Type:
Log
(optional, default: none)
The log driver configuration to use for the Service Connect agent logs.
namespace?
Type:
string
(optional, default: the cloudmap namespace specified on the cluster.)
The cloudmap namespace to register this service into.
services?
Type:
Service
[]
(optional, default: none)
The list of Services, including a port mapping, terse client alias, and optional intermediate DNS name.
This property may be left blank if the current ECS service does not need to advertise any ports via Service Connect.