Class CfnFunction.LoggingConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.CfnFunction.LoggingConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunction.LoggingConfigProperty>
- Enclosing interface:
CfnFunction.LoggingConfigProperty
@Stability(Stable)
public static final class CfnFunction.LoggingConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunction.LoggingConfigProperty>
A builder for
CfnFunction.LoggingConfigProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplicationLogLevel
(String applicationLogLevel) Sets the value ofCfnFunction.LoggingConfigProperty.getApplicationLogLevel()
build()
Builds the configured instance.Sets the value ofCfnFunction.LoggingConfigProperty.getLogFormat()
Sets the value ofCfnFunction.LoggingConfigProperty.getLogGroup()
systemLogLevel
(String systemLogLevel) Sets the value ofCfnFunction.LoggingConfigProperty.getSystemLogLevel()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
applicationLogLevel
@Stability(Stable) public CfnFunction.LoggingConfigProperty.Builder applicationLogLevel(String applicationLogLevel) Sets the value ofCfnFunction.LoggingConfigProperty.getApplicationLogLevel()
- Parameters:
applicationLogLevel
- Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, whereTRACE
is the highest level andFATAL
is the lowest.- Returns:
this
-
logFormat
Sets the value ofCfnFunction.LoggingConfigProperty.getLogFormat()
- Parameters:
logFormat
- The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.- Returns:
this
-
logGroup
Sets the value ofCfnFunction.LoggingConfigProperty.getLogGroup()
- Parameters:
logGroup
- The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named/aws/lambda/<function name>
. To use a different log group, enter an existing log group or enter a new log group name.- Returns:
this
-
systemLogLevel
@Stability(Stable) public CfnFunction.LoggingConfigProperty.Builder systemLogLevel(String systemLogLevel) Sets the value ofCfnFunction.LoggingConfigProperty.getSystemLogLevel()
- Parameters:
systemLogLevel
- Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, whereDEBUG
is the highest level andWARN
is the lowest.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFunction.LoggingConfigProperty>
- Returns:
- a new instance of
CfnFunction.LoggingConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-