AWS::Greengrass::LoggerDefinitionVersion - AWS CloudFormation

AWS::Greengrass::LoggerDefinitionVersion

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

Note

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.

Syntax

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

JSON

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

YAML

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

Properties

LoggerDefinitionId

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

Required: Yes

Type: String

Update requires: Replacement

Loggers

The loggers in this version.

Required: Yes

Type: Array of Logger

Update requires: Replacement

Return values

Ref

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.

Fn::GetAtt

Examples

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.

JSON

"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" } ] } }

YAML

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