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

The Amazon CloudWatch configuration for monitoring logs. You can configure * your jobs to send log information to CloudWatch.

See Also:

AWS * API Reference

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

Enables CloudWatch logging.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Enables CloudWatch logging.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Enables CloudWatch logging.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Enables CloudWatch logging.

*/ inline CloudWatchLoggingConfiguration& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; } /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); } /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline CloudWatchLoggingConfiguration& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline CloudWatchLoggingConfiguration& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;} /** *

The name of the log group in Amazon CloudWatch Logs where you want to publish * your logs.

*/ inline CloudWatchLoggingConfiguration& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} /** *

Prefix for the CloudWatch log stream name.

*/ inline const Aws::String& GetLogStreamNamePrefix() const{ return m_logStreamNamePrefix; } /** *

Prefix for the CloudWatch log stream name.

*/ inline bool LogStreamNamePrefixHasBeenSet() const { return m_logStreamNamePrefixHasBeenSet; } /** *

Prefix for the CloudWatch log stream name.

*/ inline void SetLogStreamNamePrefix(const Aws::String& value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix = value; } /** *

Prefix for the CloudWatch log stream name.

*/ inline void SetLogStreamNamePrefix(Aws::String&& value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix = std::move(value); } /** *

Prefix for the CloudWatch log stream name.

*/ inline void SetLogStreamNamePrefix(const char* value) { m_logStreamNamePrefixHasBeenSet = true; m_logStreamNamePrefix.assign(value); } /** *

Prefix for the CloudWatch log stream name.

*/ inline CloudWatchLoggingConfiguration& WithLogStreamNamePrefix(const Aws::String& value) { SetLogStreamNamePrefix(value); return *this;} /** *

Prefix for the CloudWatch log stream name.

*/ inline CloudWatchLoggingConfiguration& WithLogStreamNamePrefix(Aws::String&& value) { SetLogStreamNamePrefix(std::move(value)); return *this;} /** *

Prefix for the CloudWatch log stream name.

*/ inline CloudWatchLoggingConfiguration& WithLogStreamNamePrefix(const char* value) { SetLogStreamNamePrefix(value); return *this;} /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline const Aws::String& GetEncryptionKeyArn() const{ return m_encryptionKeyArn; } /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline bool EncryptionKeyArnHasBeenSet() const { return m_encryptionKeyArnHasBeenSet; } /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline void SetEncryptionKeyArn(const Aws::String& value) { m_encryptionKeyArnHasBeenSet = true; m_encryptionKeyArn = value; } /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline void SetEncryptionKeyArn(Aws::String&& value) { m_encryptionKeyArnHasBeenSet = true; m_encryptionKeyArn = std::move(value); } /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline void SetEncryptionKeyArn(const char* value) { m_encryptionKeyArnHasBeenSet = true; m_encryptionKeyArn.assign(value); } /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline CloudWatchLoggingConfiguration& WithEncryptionKeyArn(const Aws::String& value) { SetEncryptionKeyArn(value); return *this;} /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline CloudWatchLoggingConfiguration& WithEncryptionKeyArn(Aws::String&& value) { SetEncryptionKeyArn(std::move(value)); return *this;} /** *

The Key Management Service (KMS) key ARN to encrypt the logs that you store * in CloudWatch Logs.

*/ inline CloudWatchLoggingConfiguration& WithEncryptionKeyArn(const char* value) { SetEncryptionKeyArn(value); return *this;} /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline const Aws::Map>& GetLogTypes() const{ return m_logTypes; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline bool LogTypesHasBeenSet() const { return m_logTypesHasBeenSet; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline void SetLogTypes(const Aws::Map>& value) { m_logTypesHasBeenSet = true; m_logTypes = value; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline void SetLogTypes(Aws::Map>&& value) { m_logTypesHasBeenSet = true; m_logTypes = std::move(value); } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& WithLogTypes(const Aws::Map>& value) { SetLogTypes(value); return *this;} /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& WithLogTypes(Aws::Map>&& value) { SetLogTypes(std::move(value)); return *this;} /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(const Aws::String& key, const Aws::Vector& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(key, value); return *this; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(Aws::String&& key, const Aws::Vector& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(std::move(key), value); return *this; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(const Aws::String& key, Aws::Vector&& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(key, std::move(value)); return *this; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(Aws::String&& key, Aws::Vector&& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(std::move(key), std::move(value)); return *this; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(const char* key, Aws::Vector&& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(key, std::move(value)); return *this; } /** *

The types of logs that you want to publish to CloudWatch. If you don't * specify any log types, driver STDOUT and STDERR logs will be published to * CloudWatch Logs by default. For more information including the supported worker * types for Hive and Spark, see Logging * for EMR Serverless with CloudWatch.

  • Key Valid * Values: SPARK_DRIVER, SPARK_EXECUTOR, * HIVE_DRIVER, TEZ_TASK

  • Array * Members Valid Values: STDOUT, STDERR, * HIVE_LOG, TEZ_AM, SYSTEM_LOGS

  • *
*/ inline CloudWatchLoggingConfiguration& AddLogTypes(const char* key, const Aws::Vector& value) { m_logTypesHasBeenSet = true; m_logTypes.emplace(key, value); return *this; } private: bool m_enabled; bool m_enabledHasBeenSet = false; Aws::String m_logGroupName; bool m_logGroupNameHasBeenSet = false; Aws::String m_logStreamNamePrefix; bool m_logStreamNamePrefixHasBeenSet = false; Aws::String m_encryptionKeyArn; bool m_encryptionKeyArnHasBeenSet = false; Aws::Map> m_logTypes; bool m_logTypesHasBeenSet = false; }; } // namespace Model } // namespace EMRServerless } // namespace Aws