Class: AWSCDK::AppSync::CfnGraphQLAPI::LogConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/cfn_graph_qlapi.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cloud_watch_logs_role_arn:, field_log_level:, exclude_verbose_content: nil) ⇒ LogConfigProperty

Returns a new instance of LogConfigProperty.

Parameters:

  • cloud_watch_logs_role_arn (String)

    The service role that AWS AppSync will assume to publish to Amazon CloudWatch Logs in your account.

  • field_log_level (String)

    The field logging level. Values can be NONE, ERROR, INFO, DEBUG, or ALL.

  • exclude_verbose_content (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.



1058
1059
1060
1061
1062
1063
1064
1065
# File 'app_sync/cfn_graph_qlapi.rb', line 1058

def initialize(cloud_watch_logs_role_arn:, field_log_level:, exclude_verbose_content: nil)
  @cloud_watch_logs_role_arn = cloud_watch_logs_role_arn
  Jsii::Type.check_type(@cloud_watch_logs_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cloudWatchLogsRoleArn")
  @field_log_level = field_log_level
  Jsii::Type.check_type(@field_log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fieldLogLevel")
  @exclude_verbose_content = exclude_verbose_content
  Jsii::Type.check_type(@exclude_verbose_content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "excludeVerboseContent") unless @exclude_verbose_content.nil?
end

Instance Attribute Details

#cloud_watch_logs_role_arnString (readonly)

The service role that AWS AppSync will assume to publish to Amazon CloudWatch Logs in your account.



1071
1072
1073
# File 'app_sync/cfn_graph_qlapi.rb', line 1071

def cloud_watch_logs_role_arn
  @cloud_watch_logs_role_arn
end

#exclude_verbose_contentBoolean, ... (readonly)

Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.



1098
1099
1100
# File 'app_sync/cfn_graph_qlapi.rb', line 1098

def exclude_verbose_content
  @exclude_verbose_content
end

#field_log_levelString (readonly)

The field logging level. Values can be NONE, ERROR, INFO, DEBUG, or ALL.

  • 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.info and console.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 , and console.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.


1093
1094
1095
# File 'app_sync/cfn_graph_qlapi.rb', line 1093

def field_log_level
  @field_log_level
end

Class Method Details

.jsii_propertiesObject



1100
1101
1102
1103
1104
1105
1106
# File 'app_sync/cfn_graph_qlapi.rb', line 1100

def self.jsii_properties
  {
    :cloud_watch_logs_role_arn => "cloudWatchLogsRoleArn",
    :field_log_level => "fieldLogLevel",
    :exclude_verbose_content => "excludeVerboseContent",
  }
end

Instance Method Details

#to_jsiiObject



1108
1109
1110
1111
1112
1113
1114
1115
1116
# File 'app_sync/cfn_graph_qlapi.rb', line 1108

def to_jsii
  result = {}
  result.merge!({
    "cloudWatchLogsRoleArn" => @cloud_watch_logs_role_arn,
    "fieldLogLevel" => @field_log_level,
    "excludeVerboseContent" => @exclude_verbose_content,
  })
  result.compact
end