CfnLoggerDefinitionVersionPropsMixin

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

Bases: Mixin

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

A logger definition version contains a list of loggers. .. epigraph:

To create a logger definition version, you must specify the ID of the logger definition that you want to associate with the version. For information about creating a logger definition, see ```AWS::Greengrass::LoggerDefinition`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinition.html>`_ .

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>`_ .
See:

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

CloudformationResource:

AWS::Greengrass::LoggerDefinitionVersion

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

cfn_logger_definition_version_props_mixin = greengrass_mixins.CfnLoggerDefinitionVersionPropsMixin(greengrass_mixins.CfnLoggerDefinitionVersionMixinProps(
    logger_definition_id="loggerDefinitionId",
    loggers=[greengrass_mixins.CfnLoggerDefinitionVersionPropsMixin.LoggerProperty(
        component="component",
        id="id",
        level="level",
        space=123,
        type="type"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

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

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 = ['loggerDefinitionId', 'loggers']

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

LoggerProperty

class CfnLoggerDefinitionVersionPropsMixin.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 `AWS::Greengrass::LoggerDefinitionVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html>`_ resource 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-loggerdefinitionversion-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.CfnLoggerDefinitionVersionPropsMixin.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-loggerdefinitionversion-logger.html#cfn-greengrass-loggerdefinitionversion-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-loggerdefinitionversion-logger.html#cfn-greengrass-loggerdefinitionversion-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-loggerdefinitionversion-logger.html#cfn-greengrass-loggerdefinitionversion-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-loggerdefinitionversion-logger.html#cfn-greengrass-loggerdefinitionversion-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-loggerdefinitionversion-logger.html#cfn-greengrass-loggerdefinitionversion-logger-type