Interface LogConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LogConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:04.472Z") @Stability(Stable) public interface LogConfig extends software.amazon.jsii.JsiiSerializable
Logging configuration for AppSync.

Example:

 import software.amazon.awscdk.services.logs.*;
 GraphqlApi.Builder.create(this, "api")
         .authorizationConfig(AuthorizationConfig.builder().build())
         .name("myApi")
         .definition(Definition.fromFile(join(__dirname, "myApi.graphql")))
         .logConfig(LogConfig.builder()
                 .fieldLogLevel(FieldLogLevel.INFO)
                 .retention(RetentionDays.ONE_WEEK)
                 .build())
         .build();
 
  • Method Details

    • getExcludeVerboseContent

      @Stability(Stable) @Nullable default Object getExcludeVerboseContent()
      exclude verbose content.

      Default: false

    • getFieldLogLevel

      @Stability(Stable) @Nullable default FieldLogLevel getFieldLogLevel()
      log level for fields.

      Default: - Use AppSync default

    • getRetention

      @Stability(Stable) @Nullable default RetentionDays getRetention()
      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

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The role for CloudWatch Logs.

      Default: - None

    • builder

      @Stability(Stable) static LogConfig.Builder builder()
      Returns:
      a LogConfig.Builder of LogConfig