CfnLoggerDefinitionPropsMixin

class aws_cdk.mixins_preview.aws_greengrass.mixins.CfnLoggerDefinitionPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Greengrass::LoggerDefinition resource represents a logger definition for AWS IoT Greengrass .

Logger definitions are used to organize your logger definition versions.

Logger definitions can reference multiple logger definition versions. All logger definition versions must be associated with a logger definition. Each logger definition version can contain one or more loggers. .. epigraph:

When you create a logger definition, you can optionally include an initial logger definition version. To associate a logger definition version later, create an ```AWS::Greengrass::LoggerDefinitionVersion`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html>`_ resource and specify the ID of this logger definition.

After you create the logger definition version that contains the loggers you want to deploy, you must add it to your group version. For more information, see ```AWS::Greengrass::Group`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinition.html

CloudformationResource:

AWS::Greengrass::LoggerDefinition

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# tags: Any

cfn_logger_definition_props_mixin = greengrass_mixins.CfnLoggerDefinitionPropsMixin(greengrass_mixins.CfnLoggerDefinitionMixinProps(
    initial_version=greengrass_mixins.CfnLoggerDefinitionPropsMixin.LoggerDefinitionVersionProperty(
        loggers=[greengrass_mixins.CfnLoggerDefinitionPropsMixin.LoggerProperty(
            component="component",
            id="id",
            level="level",
            space=123,
            type="type"
        )]
    ),
    name="name",
    tags=tags
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Greengrass::LoggerDefinition.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['initialVersion', 'name', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

LoggerDefinitionVersionProperty

class CfnLoggerDefinitionPropsMixin.LoggerDefinitionVersionProperty(*, loggers=None)

Bases: object

A logger definition version contains a list of loggers .

After you create a logger definition version that contains the loggers you want to deploy, you must add it to your group version. For more information, see `AWS::Greengrass::Group <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html>`_ .

In an CloudFormation template, LoggerDefinitionVersion is the property type of the InitialVersion property in the `AWS::Greengrass::LoggerDefinition <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinition.html>`_ resource.

Parameters:

loggers (Union[IResolvable, Sequence[Union[IResolvable, LoggerProperty, Dict[str, Any]]], None]) – The loggers in this version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

logger_definition_version_property = greengrass_mixins.CfnLoggerDefinitionPropsMixin.LoggerDefinitionVersionProperty(
    loggers=[greengrass_mixins.CfnLoggerDefinitionPropsMixin.LoggerProperty(
        component="component",
        id="id",
        level="level",
        space=123,
        type="type"
    )]
)

Attributes

loggers

The loggers in this version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html#cfn-greengrass-loggerdefinition-loggerdefinitionversion-loggers

LoggerProperty

class CfnLoggerDefinitionPropsMixin.LoggerProperty(*, component=None, id=None, level=None, space=None, type=None)

Bases: object

A logger represents logging settings for the AWS IoT Greengrass group, which can be stored in CloudWatch and the local file system of your core device.

All log entries include a timestamp, log level, and information about the event. For more information, see Monitoring with AWS IoT Greengrass Logs in the Developer Guide .

In an CloudFormation template, the Loggers property of the `LoggerDefinitionVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html>`_ property type contains a list of Logger property types.

Parameters:
  • component (Optional[str]) – The source of the log event. Valid values are GreengrassSystem or Lambda . When GreengrassSystem is used, events from Greengrass system components are logged. When Lambda is used, events from user-defined Lambda functions are logged.

  • id (Optional[str]) – A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .

  • level (Optional[str]) – The log-level threshold. Log events below this threshold are filtered out and aren’t stored. Valid values are DEBUG , INFO (recommended), WARN , ERROR , or FATAL .

  • space (Union[int, float, None]) – 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 .

  • type (Optional[str]) – The storage mechanism for log events. Valid values are FileSystem or AWSCloudWatch . When AWSCloudWatch is used, log events are sent to CloudWatch Logs . When FileSystem is used, log events are stored on the local file system.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

logger_property = greengrass_mixins.CfnLoggerDefinitionPropsMixin.LoggerProperty(
    component="component",
    id="id",
    level="level",
    space=123,
    type="type"
)

Attributes

component

The source of the log event.

Valid values are GreengrassSystem or Lambda . When GreengrassSystem is used, events from Greengrass system components are logged. When Lambda is used, events from user-defined Lambda functions are logged.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html#cfn-greengrass-loggerdefinition-logger-component

id

A descriptive or arbitrary ID for the logger.

This value must be unique within the logger definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html#cfn-greengrass-loggerdefinition-logger-id

level

The log-level threshold.

Log events below this threshold are filtered out and aren’t stored. Valid values are DEBUG , INFO (recommended), WARN , ERROR , or FATAL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html#cfn-greengrass-loggerdefinition-logger-level

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html#cfn-greengrass-loggerdefinition-logger-space

type

The storage mechanism for log events.

Valid values are FileSystem or AWSCloudWatch . When AWSCloudWatch is used, log events are sent to CloudWatch Logs . When FileSystem is used, log events are stored on the local file system.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html#cfn-greengrass-loggerdefinition-logger-type