AWS::Greengrass::LoggerDefinitionVersion - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The AWS::Greengrass::LoggerDefinitionVersion resource represents a logger definition version for Amazon IoT Greengrass. A logger definition version contains a list of loggers.


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.

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.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::Greengrass::LoggerDefinitionVersion", "Properties" : { "LoggerDefinitionId" : String, "Loggers" : [ Logger, ... ] } }


Type: AWS::Greengrass::LoggerDefinitionVersion Properties: LoggerDefinitionId: String Loggers: - Logger



The ID of the logger definition associated with this version. This value is a GUID.

Required: Yes

Type: String

Update requires: Replacement


The loggers in this version.

Required: Yes

Type: Array of Logger

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the logger definition version, such as arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/loggers/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2.

For more information about using the Ref function, see Ref.



Logger Definition Version Snippet

The following snippet defines logger definition and logger definition version resources. The logger definition version references the logger definition and contains a logger.

For an example of a complete template, see the AWS::Greengrass::Group resource.


"TestLoggerDefinition": { "Type": "AWS::Greengrass::LoggerDefinition", "Properties": { "Name": "DemoTestLoggerDefinition" } }, "TestLoggerDefinitionVersion": { "Type": "AWS::Greengrass::LoggerDefinitionVersion", "Properties": { "LoggerDefinitionId": { "Ref": "TestLoggerDefinition" }, "Loggers": [ { "Id": "TestLogger1", "Type": "FileSystem", "Component": "GreengrassSystem", "Level": "INFO", "Space": "128" } ] } }


TestLoggerDefinition: Type: 'AWS::Greengrass::LoggerDefinition' Properties: Name: DemoTestLoggerDefinition TestLoggerDefinitionVersion: Type: 'AWS::Greengrass::LoggerDefinitionVersion' Properties: LoggerDefinitionId: !Ref TestLoggerDefinition Loggers: - Id: TestLogger1 Type: FileSystem Component: GreengrassSystem Level: INFO Space: '128'

See also