Class: AWSCDK::Elasticsearch::CfnDomain::LogPublishingOptionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elasticsearch/cfn_domain.rb

Overview

The AWS::Elasticsearch::Domain resource is being replaced by the AWS::OpenSearchService::Domain resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see New resource types in the Amazon OpenSearch Service Developer Guide .

Specifies whether the OpenSearch Service domain publishes the Elasticsearch application, search slow logs, or index slow logs to Amazon CloudWatch. Each option must be an object of name SEARCH_SLOW_LOGS , ES_APPLICATION_LOGS , INDEX_SLOW_LOGS , or AUDIT_LOGS depending on the type of logs you want to publish.

If you enable a slow log, you still have to enable the collection of slow logs using the Configuration API. To learn more, see Enabling log publishing ( AWS CLI) .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cloud_watch_logs_log_group_arn: nil, enabled: nil) ⇒ LogPublishingOptionProperty

Returns a new instance of LogPublishingOptionProperty.

Parameters:

  • cloud_watch_logs_log_group_arn (String, nil) (defaults to: nil)

    Specifies the CloudWatch log group to publish to.

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If true , enables the publishing of logs to CloudWatch.



1296
1297
1298
1299
1300
1301
# File 'elasticsearch/cfn_domain.rb', line 1296

def initialize(cloud_watch_logs_log_group_arn: nil, enabled: nil)
  @cloud_watch_logs_log_group_arn = cloud_watch_logs_log_group_arn
  Jsii::Type.check_type(@cloud_watch_logs_log_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cloudWatchLogsLogGroupArn") unless @cloud_watch_logs_log_group_arn.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
end

Instance Attribute Details

#cloud_watch_logs_log_group_arnString? (readonly)

Specifies the CloudWatch log group to publish to.

Required if you enable log publishing for the domain.



1309
1310
1311
# File 'elasticsearch/cfn_domain.rb', line 1309

def cloud_watch_logs_log_group_arn
  @cloud_watch_logs_log_group_arn
end

#enabledBoolean, ... (readonly)

If true , enables the publishing of logs to CloudWatch.

Default: false .



1316
1317
1318
# File 'elasticsearch/cfn_domain.rb', line 1316

def enabled
  @enabled
end

Class Method Details

.jsii_propertiesObject



1318
1319
1320
1321
1322
1323
# File 'elasticsearch/cfn_domain.rb', line 1318

def self.jsii_properties
  {
    :cloud_watch_logs_log_group_arn => "cloudWatchLogsLogGroupArn",
    :enabled => "enabled",
  }
end

Instance Method Details

#to_jsiiObject



1325
1326
1327
1328
1329
1330
1331
1332
# File 'elasticsearch/cfn_domain.rb', line 1325

def to_jsii
  result = {}
  result.merge!({
    "cloudWatchLogsLogGroupArn" => @cloud_watch_logs_log_group_arn,
    "enabled" => @enabled,
  })
  result.compact
end