Class LogConfig
Logging configuration for AppSync.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LogConfig : ILogConfig
Syntax (vb)
Public Class LogConfig Implements ILogConfig
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Logs;
new GraphqlApi(this, "api", new GraphqlApiProps {
AuthorizationConfig = new AuthorizationConfig { },
Name = "myApi",
Definition = Definition.FromFile(Join(__dirname, "myApi.graphql")),
LogConfig = new LogConfig {
FieldLogLevel = FieldLogLevel.INFO,
Retention = RetentionDays.ONE_WEEK
}
});
Synopsis
Constructors
| LogConfig() | Logging configuration for AppSync. |
Properties
| ExcludeVerboseContent | exclude verbose content. |
| FieldLogLevel | log level for fields. |
| Retention | The number of days log events are kept in CloudWatch Logs. |
| Role | The role for CloudWatch Logs. |
Constructors
LogConfig()
Logging configuration for AppSync.
public LogConfig()
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Logs;
new GraphqlApi(this, "api", new GraphqlApiProps {
AuthorizationConfig = new AuthorizationConfig { },
Name = "myApi",
Definition = Definition.FromFile(Join(__dirname, "myApi.graphql")),
LogConfig = new LogConfig {
FieldLogLevel = FieldLogLevel.INFO,
Retention = RetentionDays.ONE_WEEK
}
});
Properties
ExcludeVerboseContent
exclude verbose content.
public object? ExcludeVerboseContent { get; set; }
Property Value
Remarks
Default: false
Type union: either bool or IResolvable
FieldLogLevel
log level for fields.
public FieldLogLevel? FieldLogLevel { get; set; }
Property Value
Remarks
Default: - Use AppSync default
Retention
The number of days log events are kept in CloudWatch Logs.
public RetentionDays? Retention { get; set; }
Property Value
Remarks
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.
public IRoleRef? Role { get; set; }
Property Value
Remarks
Default: - None