ServiceConnectService Struct
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';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_kms as interfaces_kms } from 'aws-cdk-lib/interfaces';
declare const keyRef: interfaces_kms.IKeyRef;
declare const role: iam.Role;
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,
tls: {
awsPcaAuthorityArn: 'awsPcaAuthorityArn',
kmsKey: keyRef,
role: role,
},
};
Properties
discoveryNamestringdiscovery_namestrdiscoveryNameStringDiscoveryNamestringDiscoveryName*string= port mapping name#This is required if you wish to use the same port mapping name in more than one service.
dnsNamestringdns_namestrdnsNameStringDnsNamestringDnsName*string= No alias is created. The service…#Service Connect-enabled clients will be able to reach this service at http://dnsName:port.
default
Default: No alias is created. The service is reachable at portMappingName.namespace:port.
idleTimeoutDurationidle_timeoutDurationidleTimeoutDurationIdleTimeoutDurationIdleTimeoutDuration= Duration.minutes(5) for HTTP/HTT…#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.
default
Default: Duration.minutes(5) for HTTP/HTTP2/GRPC, Duration.hours(1) for TCP.
ingressPortOverridenumberingress_port_overrideint | floatingressPortOverrideNumberIngressPortOverridedoubleIngressPortOverride*float64= none#The port on the Service Connect agent container to use for traffic ingress to this service.
perRequestTimeoutDurationper_request_timeoutDurationperRequestTimeoutDurationPerRequestTimeoutDurationPerRequestTimeoutDuration= Duration.seconds(15)#notes
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.
default
Default: the container port specified by the port mapping in portMappingName.
portMappingNamestringport_mapping_namestrportMappingNameStringPortMappingNamestringPortMappingName*stringrequired#tlsServiceConnectTlsConfigurationtlsServiceConnectTlsConfigurationtlsServiceConnectTlsConfigurationTlsServiceConnectTlsConfigurationTlsServiceConnectTlsConfiguration= none#