LogConfigProperty Struct
The LogConfig property type specifies the logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.
LogConfig is a property of the AWS::AppSync::GraphQLApi property type.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const logConfigProperty: appsync.CfnGraphQLApi.LogConfigProperty = {
cloudWatchLogsRoleArn: 'cloudWatchLogsRoleArn',
fieldLogLevel: 'fieldLogLevel',
// the properties below are optional
excludeVerboseContent: false,
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
log_config_property = appsync.CfnGraphQLApi.LogConfigProperty(
cloud_watch_logs_role_arn="cloudWatchLogsRoleArn",
field_log_level="fieldLogLevel",
# the properties below are optional
exclude_verbose_content=False
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
LogConfigProperty logConfigProperty = LogConfigProperty.builder()
.cloudWatchLogsRoleArn("cloudWatchLogsRoleArn")
.fieldLogLevel("fieldLogLevel")
// the properties below are optional
.excludeVerboseContent(false)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var logConfigProperty = new LogConfigProperty {
CloudWatchLogsRoleArn = "cloudWatchLogsRoleArn",
FieldLogLevel = "fieldLogLevel",
// the properties below are optional
ExcludeVerboseContent = false
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
logConfigProperty := &LogConfigProperty{
CloudWatchLogsRoleArn: jsii.String("cloudWatchLogsRoleArn"),
FieldLogLevel: jsii.String("fieldLogLevel"),
// the properties below are optional
ExcludeVerboseContent: jsii.Boolean(false),
}
Properties
cloudWatchLogsRoleArnstringcloud_watch_logs_role_arnstrcloudWatchLogsRoleArnStringCloudWatchLogsRoleArnstringCloudWatchLogsRoleArn*string required #excludeVerboseContentoptionalboolean | IResolvableexclude_verbose_contentoptionaltyping.Union[bool, IResolvable]excludeVerboseContentoptionalBooleanExcludeVerboseContentoptionalboolExcludeVerboseContentoptionalinterface{} #fieldLogLevelstringfield_log_levelstrfieldLogLevelStringFieldLogLevelstringFieldLogLevel*string required #notes
NONE : No field-level logs are captured.
ERROR : Logs the following information only for the fields that are in the error category:
The error section in the server response.
Field-level errors.
The generated request/response functions that got resolved for error fields.
INFO : Logs the following information only for the fields that are in the info and error categories:
Info-level messages.
The user messages sent through
$util.log.infoandconsole.log.Field-level tracing and mapping logs are not shown.
DEBUG : Logs the following information only for the fields that are in the debug, info, and error categories:
Debug-level messages.
The user messages sent through
$util.log.info,$util.log.debug,console.log, andconsole.debug.Field-level tracing and mapping logs are not shown.
ALL : The following information is logged for all fields in the query:
Field-level tracing information.
The generated request/response functions that were resolved for each field.