ServiceConnectProps
- class aws_cdk.aws_ecs.ServiceConnectProps(*, access_log_configuration=None, log_driver=None, namespace=None, services=None)
Bases:
objectInterface for Service Connect configuration.
- Parameters:
access_log_configuration (
Union[ServiceConnectAccessLogConfiguration,Dict[str,Any],None]) – The configuration for Service Connect access logs. Access logs provide detailed telemetry about individual requests processed by the Service Connect proxy. Default: undefined - AWS ECS default is disabled, which means that access logs are not recordedlog_driver (
Optional[LogDriver]) – The log driver configuration to use for the Service Connect agent logs. Default: - nonenamespace (
Optional[str]) – The cloudmap namespace to register this service into. Default: the cloudmap namespace specified on the cluster.services (
Optional[Sequence[Union[ServiceConnectService,Dict[str,Any]]]]) – 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. Default: none
- ExampleMetadata:
infused
Example:
# cluster: ecs.Cluster # task_definition: ecs.TaskDefinition # container_options: ecs.ContainerDefinitionOptions container = task_definition.add_container("MyContainer", container_options) container.add_port_mappings( name="api", container_port=8080 ) cluster.add_default_cloud_map_namespace( name="local" ) service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100, service_connect_configuration=ecs.ServiceConnectProps( services=[ecs.ServiceConnectService( port_mapping_name="api", dns_name="http-api", port=80 ) ] ) )
Attributes
- access_log_configuration
The configuration for Service Connect access logs.
Access logs provide detailed telemetry about individual requests processed by the Service Connect proxy.
- Default:
undefined - AWS ECS default is disabled, which means that access logs are not recorded
- log_driver
The log driver configuration to use for the Service Connect agent logs.
- Default:
none
- namespace
The cloudmap namespace to register this service into.
- Default:
the cloudmap namespace specified on the cluster.
- services
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.
- Default:
none