LogConfig
- class aws_cdk.aws_appsync.LogConfig(*, exclude_verbose_content=None, field_log_level=None, retention=None, role=None)
Bases:
object
Logging configuration for AppSync.
- Parameters:
exclude_verbose_content (
Union
[bool
,IResolvable
,None
]) – exclude verbose content. Default: falsefield_log_level (
Optional
[FieldLogLevel
]) – log level for fields. Default: - Use AppSync defaultretention (
Optional
[RetentionDays
]) – The number of days log events are kept in CloudWatch Logs. By default AppSync keeps the logs infinitely. When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value toINFINITE
Default: RetentionDays.INFINITErole (
Optional
[IRole
]) – The role for CloudWatch Logs. Default: - None
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_logs as logs appsync.GraphqlApi(self, "api", authorization_config=appsync.AuthorizationConfig(), name="myApi", definition=appsync.Definition.from_file(path.join(__dirname, "myApi.graphql")), log_config=appsync.LogConfig( field_log_level=appsync.FieldLogLevel.INFO, retention=logs.RetentionDays.ONE_WEEK ) )
Attributes
- exclude_verbose_content
exclude verbose content.
- Default:
false
- field_log_level
log level for fields.
- Default:
Use AppSync default
- retention
The number of days log events are kept in CloudWatch Logs.
By default AppSync keeps the logs infinitely. When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to
INFINITE
- Default:
RetentionDays.INFINITE
- role
The role for CloudWatch Logs.
- Default:
None