CfnLoggerDefinitionPropsMixin
- class aws_cdk.mixins_preview.aws_greengrass.mixins.CfnLoggerDefinitionPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Greengrass::LoggerDefinitionresource 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:
- 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:
props (
Union[CfnLoggerDefinitionMixinProps,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 = ['initialVersion', 'name', 'tags']
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
LoggerDefinitionVersionProperty
- class CfnLoggerDefinitionPropsMixin.LoggerDefinitionVersionProperty(*, loggers=None)
Bases:
objectA 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,
LoggerDefinitionVersionis the property type of theInitialVersionproperty 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:
- 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
LoggerProperty
- class CfnLoggerDefinitionPropsMixin.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`LoggerDefinitionVersion<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html>`_ property type 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.CfnLoggerDefinitionPropsMixin.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.