Interface IAppSyncLogConfig
Logging configuration for AppSync.
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAppSyncLogConfig
Syntax (vb)
Public Interface IAppSyncLogConfig
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Logs;
var apiKeyProvider = new AppSyncAuthProvider {
AuthorizationType = AppSyncAuthorizationType.API_KEY
};
var api = new EventApi(this, "api", new EventApiProps {
ApiName = "Api",
OwnerContact = "OwnerContact",
AuthorizationConfig = new EventApiAuthConfig {
AuthProviders = new [] { apiKeyProvider },
ConnectionAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
DefaultPublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
DefaultSubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY }
},
LogConfig = new AppSyncLogConfig {
FieldLogLevel = AppSyncFieldLogLevel.INFO,
Retention = RetentionDays.ONE_WEEK
}
});
api.AddChannelNamespace("default");
Synopsis
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. |
Properties
ExcludeVerboseContent
exclude verbose content.
bool? ExcludeVerboseContent { get; }
Property Value
bool?
Remarks
Default: false
FieldLogLevel
log level for fields.
AppSyncFieldLogLevel? FieldLogLevel { get; }
Property Value
Remarks
Default: - Use AppSync default
Retention
The number of days log events are kept in CloudWatch Logs.
RetentionDays? Retention { get; }
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.
IRoleRef? Role { get; }
Property Value
Remarks
Default: - None