ServiceConnectService
- class aws_cdk.aws_ecs.ServiceConnectService(*, port_mapping_name, discovery_name=None, dns_name=None, idle_timeout=None, ingress_port_override=None, per_request_timeout=None, port=None, tls=None)
Bases:
object
Interface for service connect Service props.
- Parameters:
port_mapping_name (
str
) – portMappingName specifies which port and protocol combination should be used for this service connect service.discovery_name (
Optional
[str
]) – 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. Default: - port mapping namedns_name (
Optional
[str
]) – 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. Default: - No alias is created. The service is reachable atportMappingName.namespace:port
.idle_timeout (
Optional
[Duration
]) – The amount of time in seconds a connection for Service Connect will stay active while idle. A value of 0 can be set to disableidleTimeout
. IfidleTimeout
is set to a time that is less thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
. Default: - Duration.minutes(5) for HTTP/HTTP2/GRPC, Duration.hours(1) for TCP.ingress_port_override (
Union
[int
,float
,None
]) – Optional. The port on the Service Connect agent container to use for traffic ingress to this service. Default: - noneper_request_timeout (
Optional
[Duration
]) – 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 disableperRequestTimeout
. Can only be set when theappProtocol
for the application container is HTTP/HTTP2/GRPC. IfidleTimeout
is set to a time that is less thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
. Default: - Duration.seconds(15)port (
Union
[int
,float
,None
]) – The port for clients to use to communicate with this service via Service Connect. Default: the container port specified by the port mapping in portMappingName.tls (
Union
[ServiceConnectTlsConfiguration
,Dict
[str
,Any
],None
]) – A reference to an object that represents a Transport Layer Security (TLS) configuration. Default: - none
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk from aws_cdk import aws_ecs as ecs from aws_cdk import aws_iam as iam from aws_cdk import aws_kms as kms # key: kms.Key # role: iam.Role service_connect_service = ecs.ServiceConnectService( port_mapping_name="portMappingName", # the properties below are optional discovery_name="discoveryName", dns_name="dnsName", idle_timeout=cdk.Duration.minutes(30), ingress_port_override=123, per_request_timeout=cdk.Duration.minutes(30), port=123, tls=ecs.ServiceConnectTlsConfiguration( aws_pca_authority_arn="awsPcaAuthorityArn", kms_key=key, role=role ) )
Attributes
- discovery_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.
- Default:
port mapping name
- dns_name
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.
- Default:
No alias is created. The service is reachable at
portMappingName.namespace:port
.
- idle_timeout
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 thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
.- Default:
Duration.minutes(5) for HTTP/HTTP2/GRPC, Duration.hours(1) for TCP.
- ingress_port_override
Optional.
The port on the Service Connect agent container to use for traffic ingress to this service.
- Default:
none
- per_request_timeout
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 theappProtocol
for the application container is HTTP/HTTP2/GRPC.If
idleTimeout
is set to a time that is less thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
.- Default:
Duration.seconds(15)
- port
The port for clients to use to communicate with this service via Service Connect.
- Default:
the container port specified by the port mapping in portMappingName.
- port_mapping_name
portMappingName specifies which port and protocol combination should be used for this service connect service.
- tls
A reference to an object that represents a Transport Layer Security (TLS) configuration.
- Default:
none