Greengrass / Client / create_logger_definition

create_logger_definition#

Greengrass.Client.create_logger_definition(**kwargs)#

Creates a logger definition. You may provide the initial version of the logger definition now or use ‘’CreateLoggerDefinitionVersion’’ at a later time.

See also: AWS API Documentation

Request Syntax

response = client.create_logger_definition(
    AmznClientToken='string',
    InitialVersion={
        'Loggers': [
            {
                'Component': 'GreengrassSystem'|'Lambda',
                'Id': 'string',
                'Level': 'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL',
                'Space': 123,
                'Type': 'FileSystem'|'AWSCloudWatch'
            },
        ]
    },
    Name='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • AmznClientToken (string) – A client token used to correlate requests and responses.

  • InitialVersion (dict) –

    Information about the initial version of the logger definition.

    • Loggers (list) – A list of loggers.

      • (dict) – Information about a logger

        • Component (string) – [REQUIRED] The component that will be subject to logging.

        • Id (string) – [REQUIRED] A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ‘’[a-zA-Z0-9:_-]+’’.

        • Level (string) – [REQUIRED] The level of the logs.

        • Space (integer) – The amount of file space, in KB, to use if the local file system is used for logging purposes.

        • Type (string) – [REQUIRED] The type of log output which will be used.

  • Name (string) – The name of the logger definition.

  • tags (dict) –

    Tag(s) to add to the new resource.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'Arn': 'string',
    'CreationTimestamp': 'string',
    'Id': 'string',
    'LastUpdatedTimestamp': 'string',
    'LatestVersion': 'string',
    'LatestVersionArn': 'string',
    'Name': 'string'
}

Response Structure

  • (dict) –

    • Arn (string) – The ARN of the definition.

    • CreationTimestamp (string) – The time, in milliseconds since the epoch, when the definition was created.

    • Id (string) – The ID of the definition.

    • LastUpdatedTimestamp (string) – The time, in milliseconds since the epoch, when the definition was last updated.

    • LatestVersion (string) – The ID of the latest version associated with the definition.

    • LatestVersionArn (string) – The ARN of the latest version associated with the definition.

    • Name (string) – The name of the definition.

Exceptions