interface ServiceConnectService
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.ServiceConnectService |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ServiceConnectService |
Java | software.amazon.awscdk.services.ecs.ServiceConnectService |
Python | aws_cdk.aws_ecs.ServiceConnectService |
TypeScript (source) | aws-cdk-lib » aws_ecs » ServiceConnectService |
Interface for service connect Service props.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
const serviceConnectService: ecs.ServiceConnectService = {
portMappingName: 'portMappingName',
// the properties below are optional
discoveryName: 'discoveryName',
dnsName: 'dnsName',
idleTimeout: cdk.Duration.minutes(30),
ingressPortOverride: 123,
perRequestTimeout: cdk.Duration.minutes(30),
port: 123,
};
Properties
Name | Type | Description |
---|---|---|
port | string | portMappingName specifies which port and protocol combination should be used for this service connect service. |
discovery | string | Optionally specifies an intermediate dns name to register in the CloudMap namespace. |
dns | string | The terse DNS alias to use for this port mapping in the service connect mesh. |
idle | Duration | The amount of time in seconds a connection for Service Connect will stay active while idle. |
ingress | number | Optional. |
per | Duration | The amount of time waiting for the upstream to respond with a complete response per request for Service Connect. |
port? | number | The port for clients to use to communicate with this service via Service Connect. |
portMappingName
Type:
string
portMappingName specifies which port and protocol combination should be used for this service connect service.
discoveryName?
Type:
string
(optional, default: port mapping name)
Optionally specifies an intermediate dns name to register in the CloudMap namespace.
This is required if you wish to use the same port mapping name in more than one service.
dnsName?
Type:
string
(optional, default: No alias is created. The service is reachable at portMappingName.namespace:port
.)
The terse DNS alias to use for this port mapping in the service connect mesh.
Service Connect-enabled clients will be able to reach this service at http://dnsName:port.
idleTimeout?
Type:
Duration
(optional, default: Duration.minutes(5) for HTTP/HTTP2/GRPC, Duration.hours(1) for TCP.)
The amount of time in seconds a connection for Service Connect will stay active while idle.
A value of 0 can be set to disable idleTimeout
.
If idleTimeout
is set to a time that is less than perRequestTimeout
, the connection will close
when the idleTimeout
is reached and not the perRequestTimeout
.
ingressPortOverride?
Type:
number
(optional, default: none)
Optional.
The port on the Service Connect agent container to use for traffic ingress to this service.
perRequestTimeout?
Type:
Duration
(optional, default: Duration.seconds(15))
The amount of time waiting for the upstream to respond with a complete response per request for Service Connect.
A value of 0 can be set to disable perRequestTimeout
.
Can only be set when the appProtocol
for the application container is HTTP/HTTP2/GRPC.
If idleTimeout
is set to a time that is less than perRequestTimeout
, the connection will close
when the idleTimeout
is reached and not the perRequestTimeout
.
port?
Type:
number
(optional, default: the container port specified by the port mapping in portMappingName.)
The port for clients to use to communicate with this service via Service Connect.