CfnLoggerDefinitionVersionPropsMixin
- class aws_cdk.mixins_preview.aws_greengrass.mixins.CfnLoggerDefinitionVersionPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Greengrass::LoggerDefinitionVersionresource 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:
- 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:
props (
Union[CfnLoggerDefinitionVersionMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
LoggerProperty
- class CfnLoggerDefinitionVersionPropsMixin.LoggerProperty(*, component=None, id=None, level=None, space=None, type=None)
Bases:
objectA 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
Loggersproperty of the`AWS::Greengrass::LoggerDefinitionVersion<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html>`_ resource contains a list ofLoggerproperty types.- Parameters:
component (
Optional[str]) – The source of the log event. Valid values areGreengrassSystemorLambda. WhenGreengrassSystemis used, events from Greengrass system components are logged. WhenLambdais 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 areDEBUG,INFO(recommended),WARN,ERROR, orFATAL.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 areFileSystemorAWSCloudWatch. WhenAWSCloudWatchis used, log events are sent to CloudWatch Logs . WhenFileSystemis used, log events are stored on the local file system.
- See:
- 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
GreengrassSystemorLambda. WhenGreengrassSystemis used, events from Greengrass system components are logged. WhenLambdais used, events from user-defined Lambda functions are logged.
- 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:_-]+.
- 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, orFATAL.
- 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 .
- type
The storage mechanism for log events.
Valid values are
FileSystemorAWSCloudWatch. WhenAWSCloudWatchis used, log events are sent to CloudWatch Logs . WhenFileSystemis used, log events are stored on the local file system.