/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace FSx { namespace Model { /** *

The Lustre logging configuration used when creating or updating an Amazon FSx * for Lustre file system. An Amazon File Cache is created with Lustre logging * enabled by default, with a setting of WARN_ERROR for the logging * events. which can't be changed.

Lustre logging writes the enabled logging * events for your file system or cache to Amazon CloudWatch Logs.

See * Also:

AWS * API Reference

*/ class LustreLogCreateConfiguration { public: AWS_FSX_API LustreLogCreateConfiguration(); AWS_FSX_API LustreLogCreateConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_FSX_API LustreLogCreateConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_FSX_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline const LustreAccessAuditLogLevel& GetLevel() const{ return m_level; } /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline bool LevelHasBeenSet() const { return m_levelHasBeenSet; } /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline void SetLevel(const LustreAccessAuditLogLevel& value) { m_levelHasBeenSet = true; m_level = value; } /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline void SetLevel(LustreAccessAuditLogLevel&& value) { m_levelHasBeenSet = true; m_level = std::move(value); } /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline LustreLogCreateConfiguration& WithLevel(const LustreAccessAuditLogLevel& value) { SetLevel(value); return *this;} /** *

Sets which data repository events are logged by Amazon FSx.

  • * WARN_ONLY - only warning events are logged.

  • * ERROR_ONLY - only error events are logged.

  • * WARN_ERROR - both warning events and error events are logged.

    *
  • DISABLED - logging of data repository events is * turned off.

*/ inline LustreLogCreateConfiguration& WithLevel(LustreAccessAuditLogLevel&& value) { SetLevel(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline const Aws::String& GetDestination() const{ return m_destination; } /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline bool DestinationHasBeenSet() const { return m_destinationHasBeenSet; } /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline void SetDestination(const Aws::String& value) { m_destinationHasBeenSet = true; m_destination = value; } /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline void SetDestination(Aws::String&& value) { m_destinationHasBeenSet = true; m_destination = std::move(value); } /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline void SetDestination(const char* value) { m_destinationHasBeenSet = true; m_destination.assign(value); } /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline LustreLogCreateConfiguration& WithDestination(const Aws::String& value) { SetDestination(value); return *this;} /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline LustreLogCreateConfiguration& WithDestination(Aws::String&& value) { SetDestination(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) that specifies the destination of the * logs.

The destination can be any Amazon CloudWatch Logs log group ARN, * with the following requirements:

  • The destination ARN that you * provide must be in the same Amazon Web Services partition, Amazon Web Services * Region, and Amazon Web Services account as your Amazon FSx file system.

    *
  • The name of the Amazon CloudWatch Logs log group must begin with * the /aws/fsx prefix.

  • If you do not provide a * destination, Amazon FSx will create and use a log stream in the CloudWatch Logs * /aws/fsx/lustre log group (for Amazon FSx for Lustre) or * /aws/fsx/filecache (for Amazon File Cache).

  • If * Destination is provided and the resource does not exist, the * request will fail with a BadRequest error.

  • If * Level is set to DISABLED, you cannot specify a * destination in Destination.

*/ inline LustreLogCreateConfiguration& WithDestination(const char* value) { SetDestination(value); return *this;} private: LustreAccessAuditLogLevel m_level; bool m_levelHasBeenSet = false; Aws::String m_destination; bool m_destinationHasBeenSet = false; }; } // namespace Model } // namespace FSx } // namespace Aws