Class: AWSCDK::CloudTrail::CfnTrail::AdvancedEventSelectorProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_trail/cfn_trail.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:



803
804
805
806
807
808
# File 'cloud_trail/cfn_trail.rb', line 803

def initialize(field_selectors:, name: nil)
  @field_selectors = field_selectors
  Jsii::Type.check_type(@field_selectors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR0cmFpbC5DZm5UcmFpbC5BZHZhbmNlZEZpZWxkU2VsZWN0b3JQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "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".



819
820
821
# File 'cloud_trail/cfn_trail.rb', line 819

def name
  @name
end

Class Method Details

.jsii_propertiesObject



821
822
823
824
825
826
# File 'cloud_trail/cfn_trail.rb', line 821

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

Instance Method Details

#to_jsiiObject



828
829
830
831
832
833
834
835
# File 'cloud_trail/cfn_trail.rb', line 828

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