/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Lambda
{
namespace Model
{
/**
* The function's Amazon CloudWatch Logs configuration settings.
See
* Also:
AWS
* API Reference
*/
class LoggingConfig
{
public:
AWS_LAMBDA_API LoggingConfig();
AWS_LAMBDA_API LoggingConfig(Aws::Utils::Json::JsonView jsonValue);
AWS_LAMBDA_API LoggingConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_LAMBDA_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* The format in which Lambda sends your function's application and system logs
* to CloudWatch. Select between plain text and structured JSON.
*/
inline const LogFormat& GetLogFormat() const{ return m_logFormat; }
inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
inline void SetLogFormat(const LogFormat& value) { m_logFormatHasBeenSet = true; m_logFormat = value; }
inline void SetLogFormat(LogFormat&& value) { m_logFormatHasBeenSet = true; m_logFormat = std::move(value); }
inline LoggingConfig& WithLogFormat(const LogFormat& value) { SetLogFormat(value); return *this;}
inline LoggingConfig& WithLogFormat(LogFormat&& value) { SetLogFormat(std::move(value)); return *this;}
///@}
///@{
/**
* Set this property to filter the application logs for your function that
* Lambda sends to CloudWatch. Lambda only sends application logs at the selected
* level of detail and lower, where TRACE is the highest level and
* FATAL is the lowest.
*/
inline const ApplicationLogLevel& GetApplicationLogLevel() const{ return m_applicationLogLevel; }
inline bool ApplicationLogLevelHasBeenSet() const { return m_applicationLogLevelHasBeenSet; }
inline void SetApplicationLogLevel(const ApplicationLogLevel& value) { m_applicationLogLevelHasBeenSet = true; m_applicationLogLevel = value; }
inline void SetApplicationLogLevel(ApplicationLogLevel&& value) { m_applicationLogLevelHasBeenSet = true; m_applicationLogLevel = std::move(value); }
inline LoggingConfig& WithApplicationLogLevel(const ApplicationLogLevel& value) { SetApplicationLogLevel(value); return *this;}
inline LoggingConfig& WithApplicationLogLevel(ApplicationLogLevel&& value) { SetApplicationLogLevel(std::move(value)); return *this;}
///@}
///@{
/**
* Set this property to filter the system logs for your function that Lambda
* sends to CloudWatch. Lambda only sends system logs at the selected level of
* detail and lower, where DEBUG is the highest level and
* WARN is the lowest.
*/
inline const SystemLogLevel& GetSystemLogLevel() const{ return m_systemLogLevel; }
inline bool SystemLogLevelHasBeenSet() const { return m_systemLogLevelHasBeenSet; }
inline void SetSystemLogLevel(const SystemLogLevel& value) { m_systemLogLevelHasBeenSet = true; m_systemLogLevel = value; }
inline void SetSystemLogLevel(SystemLogLevel&& value) { m_systemLogLevelHasBeenSet = true; m_systemLogLevel = std::move(value); }
inline LoggingConfig& WithSystemLogLevel(const SystemLogLevel& value) { SetSystemLogLevel(value); return *this;}
inline LoggingConfig& WithSystemLogLevel(SystemLogLevel&& value) { SetSystemLogLevel(std::move(value)); return *this;}
///@}
///@{
/**
* The name of the Amazon CloudWatch log group the function sends logs to. By
* default, Lambda functions send logs to a default log group named
* /aws/lambda/<function name>. To use a different log group,
* enter an existing log group or enter a new log group name.
*/
inline const Aws::String& GetLogGroup() const{ return m_logGroup; }
inline bool LogGroupHasBeenSet() const { return m_logGroupHasBeenSet; }
inline void SetLogGroup(const Aws::String& value) { m_logGroupHasBeenSet = true; m_logGroup = value; }
inline void SetLogGroup(Aws::String&& value) { m_logGroupHasBeenSet = true; m_logGroup = std::move(value); }
inline void SetLogGroup(const char* value) { m_logGroupHasBeenSet = true; m_logGroup.assign(value); }
inline LoggingConfig& WithLogGroup(const Aws::String& value) { SetLogGroup(value); return *this;}
inline LoggingConfig& WithLogGroup(Aws::String&& value) { SetLogGroup(std::move(value)); return *this;}
inline LoggingConfig& WithLogGroup(const char* value) { SetLogGroup(value); return *this;}
///@}
private:
LogFormat m_logFormat;
bool m_logFormatHasBeenSet = false;
ApplicationLogLevel m_applicationLogLevel;
bool m_applicationLogLevelHasBeenSet = false;
SystemLogLevel m_systemLogLevel;
bool m_systemLogLevelHasBeenSet = false;
Aws::String m_logGroup;
bool m_logGroupHasBeenSet = false;
};
} // namespace Model
} // namespace Lambda
} // namespace Aws