Class: AWSCDK::OpenSearchService::CfnDomain::LogPublishingOptionProperty

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

Overview

Specifies whether the OpenSearch Service domain publishes 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. For the full syntax, see the examples .

Before you enable log publishing, you need to create a CloudWatch log group and provide OpenSearch Service the correct permissions to write to it. To learn more, see Enabling log publishing ( AWS CloudFormation) .

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.



1908
1909
1910
1911
1912
1913
# File 'open_search_service/cfn_domain.rb', line 1908

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.



1921
1922
1923
# File 'open_search_service/cfn_domain.rb', line 1921

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 .



1928
1929
1930
# File 'open_search_service/cfn_domain.rb', line 1928

def enabled
  @enabled
end

Class Method Details

.jsii_propertiesObject



1930
1931
1932
1933
1934
1935
# File 'open_search_service/cfn_domain.rb', line 1930

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

Instance Method Details

#to_jsiiObject



1937
1938
1939
1940
1941
1942
1943
1944
# File 'open_search_service/cfn_domain.rb', line 1937

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