Class: AWSCDK::CloudTrail::CfnEventDataStore::AdvancedEventSelectorProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_trail/cfn_event_data_store.rb

Overview

Advanced event selectors let you create fine-grained selectors for AWS CloudTrail management, data, and network activity events.

They help you control costs by logging only those events that are important to you. For more information about configuring advanced event selectors, see the Logging data events , Logging network activity events , and Logging management events topics in the AWS CloudTrail User Guide .

You cannot apply both event selectors and advanced event selectors to a trail.

Supported CloudTrail event record fields for management events

  • event_category (required)
  • event_source
  • read_only

The following additional fields are available for event data stores:

  • event_name
  • event_type
  • session_credential_from_console
  • userIdentity.arn

Supported CloudTrail event record fields for data events

  • event_category (required)
  • event_name
  • event_source
  • event_type
  • resources.ARN
  • resources.type (required)
  • read_only
  • session_credential_from_console
  • userIdentity.arn

Supported CloudTrail event record fields for network activity events

  • event_category (required)
  • event_source (required)
  • event_name
  • error_code - The only valid value for error_code is VpceAccessDenied .
  • vpc_endpoint_id

For event data stores for CloudTrail Insights events, AWS Config configuration items, Audit Manager evidence, or events outside of AWS , the only supported field is event_category .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field_selectors:, name: nil) ⇒ AdvancedEventSelectorProperty

Returns a new instance of AdvancedEventSelectorProperty.

Parameters:



776
777
778
779
780
781
# File 'cloud_trail/cfn_event_data_store.rb', line 776

def initialize(field_selectors:, name: nil)
  @field_selectors = field_selectors
  Jsii::Type.check_type(@field_selectors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR0cmFpbC5DZm5FdmVudERhdGFTdG9yZS5BZHZhbmNlZEZpZWxkU2VsZWN0b3JQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldSelectors")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#nameString? (readonly)

An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".



792
793
794
# File 'cloud_trail/cfn_event_data_store.rb', line 792

def name
  @name
end

Class Method Details

.jsii_propertiesObject



794
795
796
797
798
799
# File 'cloud_trail/cfn_event_data_store.rb', line 794

def self.jsii_properties
  {
    :field_selectors => "fieldSelectors",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



801
802
803
804
805
806
807
808
# File 'cloud_trail/cfn_event_data_store.rb', line 801

def to_jsii
  result = {}
  result.merge!({
    "fieldSelectors" => @field_selectors,
    "name" => @name,
  })
  result.compact
end