ServiceConnectAccessLogFormat
- class aws_cdk.aws_ecs.ServiceConnectAccessLogFormat(*values)
Bases:
EnumThe format of Service Connect access logs.
- See:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-envoy-access-logs.html
- ExampleMetadata:
infused
Example:
# cluster: ecs.Cluster # task_definition: ecs.TaskDefinition service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, service_connect_configuration=ecs.ServiceConnectProps( services=[ecs.ServiceConnectService( port_mapping_name="api" ) ], access_log_configuration=ecs.ServiceConnectAccessLogConfiguration( format=ecs.ServiceConnectAccessLogFormat.JSON, include_query_parameters=True ), # When configuring access log, # you also need to configure the log driver accordingly. log_driver=ecs.LogDrivers.aws_logs( stream_prefix="prefix" ) ) )
Attributes
- JSON
Structured JSON format for access logs.
This format is well-suited for integration with log analysis tools.
- TEXT
Human-readable text format for access logs.