/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.emrserverless.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The Amazon CloudWatch configuration for monitoring logs. You can configure your jobs to send log information to * CloudWatch. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CloudWatchLoggingConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** Enables CloudWatch logging. *
*/ private Boolean enabled; /** ** The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. *
*/ private String logGroupName; /** ** Prefix for the CloudWatch log stream name. *
*/ private String logStreamNamePrefix; /** ** The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. *
*/ private String encryptionKeyArn; /** ** 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
*
* Enables CloudWatch logging. *
* * @param enabled * Enables CloudWatch logging. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** ** Enables CloudWatch logging. *
* * @return Enables CloudWatch logging. */ public Boolean getEnabled() { return this.enabled; } /** ** Enables CloudWatch logging. *
* * @param enabled * Enables CloudWatch logging. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchLoggingConfiguration withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** ** Enables CloudWatch logging. *
* * @return Enables CloudWatch logging. */ public Boolean isEnabled() { return this.enabled; } /** ** The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. *
* * @param logGroupName * The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** ** The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. *
* * @return The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. */ public String getLogGroupName() { return this.logGroupName; } /** ** The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. *
* * @param logGroupName * The name of the log group in Amazon CloudWatch Logs where you want to publish your logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchLoggingConfiguration withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** ** Prefix for the CloudWatch log stream name. *
* * @param logStreamNamePrefix * Prefix for the CloudWatch log stream name. */ public void setLogStreamNamePrefix(String logStreamNamePrefix) { this.logStreamNamePrefix = logStreamNamePrefix; } /** ** Prefix for the CloudWatch log stream name. *
* * @return Prefix for the CloudWatch log stream name. */ public String getLogStreamNamePrefix() { return this.logStreamNamePrefix; } /** ** Prefix for the CloudWatch log stream name. *
* * @param logStreamNamePrefix * Prefix for the CloudWatch log stream name. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchLoggingConfiguration withLogStreamNamePrefix(String logStreamNamePrefix) { setLogStreamNamePrefix(logStreamNamePrefix); return this; } /** ** The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. *
* * @param encryptionKeyArn * The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. */ public void setEncryptionKeyArn(String encryptionKeyArn) { this.encryptionKeyArn = encryptionKeyArn; } /** ** The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. *
* * @return The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. */ public String getEncryptionKeyArn() { return this.encryptionKeyArn; } /** ** The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. *
* * @param encryptionKeyArn * The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudWatchLoggingConfiguration withEncryptionKeyArn(String encryptionKeyArn) { setEncryptionKeyArn(encryptionKeyArn); 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
*
* Key Valid Values: SPARK_DRIVER
, SPARK_EXECUTOR
, HIVE_DRIVER
, TEZ_TASK
*
* Array Members Valid Values: STDOUT
, STDERR
, HIVE_LOG
,
* TEZ_AM
, SYSTEM_LOGS
*
* 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
*
* Key Valid Values: SPARK_DRIVER
, SPARK_EXECUTOR
, HIVE_DRIVER
,
* TEZ_TASK
*
* Array Members Valid Values: STDOUT
, STDERR
, HIVE_LOG
,
* TEZ_AM
, SYSTEM_LOGS
*
* 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
*
* Key Valid Values: SPARK_DRIVER
, SPARK_EXECUTOR
, HIVE_DRIVER
,
* TEZ_TASK
*
* Array Members Valid Values: STDOUT
, STDERR
, HIVE_LOG
,
* TEZ_AM
, SYSTEM_LOGS
*