You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudTrail::Types::EventSelector

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-cloudtrail/lib/aws-sdk-cloudtrail/types.rb

Overview

Note:

When making an API call, you may pass EventSelector data as a hash:

{
  read_write_type: "ReadOnly", # accepts ReadOnly, WriteOnly, All
  include_management_events: false,
  data_resources: [
    {
      type: "String",
      values: ["String"],
    },
  ],
}

Use event selectors to specify whether you want your trail to log management and/or data events. When an event occurs in your account, CloudTrail evaluates the event selector for all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event.

You can configure up to five event selectors for a trail.

Instance Attribute Summary collapse

Instance Attribute Details

#data_resourcesArray<Types::DataResource>

CloudTrail supports logging only data events for S3 objects. You can specify up to 250 S3 buckets and object prefixes for a trail.

For more information, see Data Events in the AWS CloudTrail User Guide.

Returns:



527
528
529
530
531
532
# File 'gems/aws-sdk-cloudtrail/lib/aws-sdk-cloudtrail/types.rb', line 527

class EventSelector < Struct.new(
  :read_write_type,
  :include_management_events,
  :data_resources)
  include Aws::Structure
end

#include_management_eventsBoolean

Specify if you want your event selector to include management events for your trail.

For more information, see Management Events in the AWS CloudTrail User Guide.

By default, the value is true.

Returns:

  • (Boolean)


527
528
529
530
531
532
# File 'gems/aws-sdk-cloudtrail/lib/aws-sdk-cloudtrail/types.rb', line 527

class EventSelector < Struct.new(
  :read_write_type,
  :include_management_events,
  :data_resources)
  include Aws::Structure
end

#read_write_typeString

Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2 GetConsoleOutput is a read-only API operation and RunInstances is a write-only API operation.

By default, the value is All.

Returns:

  • (String)


527
528
529
530
531
532
# File 'gems/aws-sdk-cloudtrail/lib/aws-sdk-cloudtrail/types.rb', line 527

class EventSelector < Struct.new(
  :read_write_type,
  :include_management_events,
  :data_resources)
  include Aws::Structure
end