Class CfnLoggerDefinitionVersion.LoggerProperty.Builder
java.lang.Object
software.amazon.awscdk.services.greengrass.CfnLoggerDefinitionVersion.LoggerProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLoggerDefinitionVersion.LoggerProperty>
- Enclosing interface:
CfnLoggerDefinitionVersion.LoggerProperty
@Stability(Stable)
public static final class CfnLoggerDefinitionVersion.LoggerProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLoggerDefinitionVersion.LoggerProperty>
A builder for
CfnLoggerDefinitionVersion.LoggerProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getComponent()
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getId()
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getLevel()
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getSpace()
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
component
@Stability(Stable) public CfnLoggerDefinitionVersion.LoggerProperty.Builder component(String component) Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getComponent()
- Parameters:
component
- The source of the log event. This parameter is required. Valid values areGreengrassSystem
orLambda
. WhenGreengrassSystem
is used, events from Greengrass system components are logged. WhenLambda
is used, events from user-defined Lambda functions are logged.- Returns:
this
-
id
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getId()
- Parameters:
id
- A descriptive or arbitrary ID for the logger. This parameter is required. This value must be unique within the logger definition version. Maximum length is 128 characters with pattern[a-zA-Z0-9:_-]+
.- Returns:
this
-
level
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getLevel()
- Parameters:
level
- The log-level threshold. This parameter is required. Log events below this threshold are filtered out and aren't stored. Valid values areDEBUG
,INFO
(recommended),WARN
,ERROR
, orFATAL
.- Returns:
this
-
type
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getType()
- Parameters:
type
- The storage mechanism for log events. This parameter is required. Valid values areFileSystem
orAWSCloudWatch
. WhenAWSCloudWatch
is used, log events are sent to CloudWatch Logs . WhenFileSystem
is used, log events are stored on the local file system.- Returns:
this
-
space
Sets the value ofCfnLoggerDefinitionVersion.LoggerProperty.getSpace()
- Parameters:
space
- The amount of file space (in KB) to use when writing logs to the local file system. This property does not apply for CloudWatch Logs .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLoggerDefinitionVersion.LoggerProperty>
- Returns:
- a new instance of
CfnLoggerDefinitionVersion.LoggerProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-