Show / Hide Table of Contents

Class AppSyncLogConfig

Logging configuration for AppSync.

Inheritance
object
AppSyncLogConfig
Implements
IAppSyncLogConfig
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AppSyncLogConfig : IAppSyncLogConfig
Syntax (vb)
Public Class AppSyncLogConfig Implements 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

Constructors

AppSyncLogConfig()

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

AppSyncLogConfig()

Logging configuration for AppSync.

public AppSyncLogConfig()
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");

Properties

ExcludeVerboseContent

exclude verbose content.

public bool? ExcludeVerboseContent { get; set; }
Property Value

bool?

Remarks

Default: false

FieldLogLevel

log level for fields.

public AppSyncFieldLogLevel? FieldLogLevel { get; set; }
Property Value

AppSyncFieldLogLevel?

Remarks

Default: - Use AppSync default

Retention

The number of days log events are kept in CloudWatch Logs.

public RetentionDays? Retention { get; set; }
Property Value

RetentionDays?

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

IRoleRef

Remarks

Default: - None

Implements

IAppSyncLogConfig
Back to top Generated by DocFX