

# LogPublishingOption


Specifies whether the Amazon OpenSearch Service domain publishes the OpenSearch application and slow logs to Amazon CloudWatch. For more information, see [Monitoring OpenSearch logs with Amazon CloudWatch Logs](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createdomain-configure-slow-logs.html).

**Note**  
After you enable log publishing, you still have to enable the collection of slow logs using the OpenSearch REST API.

## Contents


 ** CloudWatchLogsLogGroupArn **   <a name="opensearchservice-Type-LogPublishingOption-CloudWatchLogsLogGroupArn"></a>
The Amazon Resource Name (ARN) of the CloudWatch Logs group to publish logs to.  
Type: String  
Length Constraints: Minimum length of 20. Maximum length of 2048.  
Pattern: `.*`   
Required: No

 ** Enabled **   <a name="opensearchservice-Type-LogPublishingOption-Enabled"></a>
Whether the log should be published.  
Type: Boolean  
Required: No

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/opensearch-2021-01-01/LogPublishingOption) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/opensearch-2021-01-01/LogPublishingOption) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/opensearch-2021-01-01/LogPublishingOption) 