Class: AWSCDK::CloudTrail::CfnEventDataStore::AdvancedFieldSelectorProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudTrail::CfnEventDataStore::AdvancedFieldSelectorProperty
- Defined in:
- cloud_trail/cfn_event_data_store.rb
Overview
A single selector statement in an advanced event selector.
Instance Attribute Summary collapse
-
#ends_with ⇒ Array<String>?
readonly
An operator that includes events that match the last few characters of the event record field specified as the value of
Field. -
#equal_to ⇒ Array<String>?
readonly
An operator that includes events that match the exact value of the event record field specified as the value of
Field. -
#field ⇒ String
readonly
A field in a CloudTrail event record on which to filter events to be logged.
-
#not_ends_with ⇒ Array<String>?
readonly
An operator that excludes events that match the last few characters of the event record field specified as the value of
Field. -
#not_equals ⇒ Array<String>?
readonly
An operator that excludes events that match the exact value of the event record field specified as the value of
Field. -
#not_starts_with ⇒ Array<String>?
readonly
An operator that excludes events that match the first few characters of the event record field specified as the value of
Field. -
#starts_with ⇒ Array<String>?
readonly
An operator that includes events that match the first few characters of the event record field specified as the value of
Field.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(field:, ends_with: nil, equal_to: nil, not_ends_with: nil, not_equals: nil, not_starts_with: nil, starts_with: nil) ⇒ AdvancedFieldSelectorProperty
constructor
A new instance of AdvancedFieldSelectorProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(field:, ends_with: nil, equal_to: nil, not_ends_with: nil, not_equals: nil, not_starts_with: nil, starts_with: nil) ⇒ AdvancedFieldSelectorProperty
Returns a new instance of AdvancedFieldSelectorProperty.
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
# File 'cloud_trail/cfn_event_data_store.rb', line 824 def initialize(field:, ends_with: nil, equal_to: nil, not_ends_with: nil, not_equals: nil, not_starts_with: nil, starts_with: nil) @field = field Jsii::Type.check_type(@field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "field") @ends_with = ends_with Jsii::Type.check_type(@ends_with, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "endsWith") unless @ends_with.nil? @equal_to = equal_to Jsii::Type.check_type(@equal_to, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "equalTo") unless @equal_to.nil? @not_ends_with = not_ends_with Jsii::Type.check_type(@not_ends_with, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notEndsWith") unless @not_ends_with.nil? @not_equals = not_equals Jsii::Type.check_type(@not_equals, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notEquals") unless @not_equals.nil? @not_starts_with = not_starts_with Jsii::Type.check_type(@not_starts_with, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notStartsWith") unless @not_starts_with.nil? @starts_with = starts_with Jsii::Type.check_type(@starts_with, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "startsWith") unless @starts_with.nil? end |
Instance Attribute Details
#ends_with ⇒ Array<String>? (readonly)
An operator that includes events that match the last few characters of the event record field specified as the value of Field .
903 904 905 |
# File 'cloud_trail/cfn_event_data_store.rb', line 903 def ends_with @ends_with end |
#equal_to ⇒ Array<String>? (readonly)
An operator that includes events that match the exact value of the event record field specified as the value of Field .
This is the only valid operator that you can use with the read_only , event_category , and resources.type fields.
910 911 912 |
# File 'cloud_trail/cfn_event_data_store.rb', line 910 def equal_to @equal_to end |
#field ⇒ String (readonly)
A field in a CloudTrail event record on which to filter events to be logged.
For event data stores for CloudTrail Insights events, AWS Config configuration items, Audit Manager evidence, or events outside of AWS , the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include event_category (required), event_source , and read_only . The following additional fields are available for event data stores: event_name , event_type , session_credential_from_console , and userIdentity.arn .
For CloudTrail data events, supported fields include event_category (required), event_name , event_source , event_type , resources.type (required), read_only , resources.ARN , session_credential_from_console , and userIdentity.arn .
For CloudTrail network activity events, supported fields include event_category (required), event_source (required), event_name , error_code , and 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 .
Selectors don't support the use of wildcards like
*. To match multiple values with a single condition, you may useStartsWith,EndsWith,NotStartsWith, orNotEndsWithto explicitly match the beginning or end of the event field.
read_only- This is an optional field that is only used for management events and data events. This field can be set toEqualswith a value oftrueorfalse. If you do not add this field, CloudTrail logs bothreadandwriteevents. A value oftruelogs onlyreadevents. A value offalselogs onlywriteevents.event_source- This field is only used for management events, data events, and network activity events.
For management events for trails, this is an optional field that can be set to NotEquals kms.amazonaws.com to exclude KMS management events, or NotEquals rdsdata.amazonaws.com to exclude RDS management events.
For data events for trails, this is an optional field that you can use to include or exclude any event source and can use any operator.
For management and data events for event data stores, this is an optional field that you can use to include or exclude any event source and can use any operator.
For network activity events, this is a required field that only uses the Equals operator. Set this field to the event source for which you want to log network activity events. If you want to log network activity events for multiple event sources, you must create a separate field selector for each event source. For a list of services supporting network activity events, see Logging network activity events in the AWS CloudTrail User Guide .
event_name- This is an optional field that is only used for data events, management events (for event data stores only), and network activity events. You can use any operator withevent_name. You can use it to filter in or filter out specific events. You can have multiple values for this field, separated by commas.event_category- This field is required and must be set toEquals.- For CloudTrail management events, the value must be
Management. - For CloudTrail data events, the value must be
Data. - For CloudTrail network activity events, the value must be
NetworkActivity.
The following are used only for event data stores:
- For CloudTrail Insights events, the value must be
Insight. - For AWS Config configuration items, the value must be
ConfigurationItem. - For Audit Manager evidence, the value must be
Evidence. - For events outside of AWS , the value must be
ActivityAuditLog. event_type- For event data stores, this is an optional field available for event data stores to filter management and data events on the event type. For trails, this is an optional field to filter data events on the event type. For information about available event types, see CloudTrail record contents in the AWS CloudTrail user guide .error_code- This field is only used to filter CloudTrail network activity events and is optional. This is the error code to filter on. Currently, the only validerror_codeisVpceAccessDenied.error_codecan only use theEqualsoperator.session_credential_from_console- For event data stores, this is an optional field used to filter management and data events based on whether the events originated from an AWS Management Console session. For trails, this is an optional field used to filter data events.session_credential_from_consolecan only use theEqualsandNotEqualsoperators.resources.type- This field is required for CloudTrail data events.resources.typecan only use theEqualsoperator.
For a list of available resource types for data events, see Data events in the AWS CloudTrail User Guide .
You can have only one resources.type field per selector. To log events on more than one resource type, add another selector.
resources.ARN- Theresources.ARNis an optional field for data events. You can use any operator withresources.ARN, but if you useEqualsorNotEquals, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type. To log all data events for all objects in a specific S3 bucket, use theStartsWithoperator, and include only the bucket ARN as the matching value.
For more information about the ARN formats of data event resources, see Actions, resources, and condition keys for AWS services in the Service Authorization Reference .
You can't use the
resources.ARNfield to filter resource types that do not have ARNs.
userIdentity.arn- For event data stores, this is an optional field used to filter management and data events for actions taken by specific IAM identities. For trails, this is an optional field used to filter data events. You can use any operator withuserIdentity.arn. For more information on the userIdentity element, see CloudTrail userIdentity element in the AWS CloudTrail User Guide .vpc_endpoint_id- This field is only used to filter CloudTrail network activity events and is optional. This field identifies the VPC endpoint that the request passed through. You can use any operator withvpc_endpoint_id.
898 899 900 |
# File 'cloud_trail/cfn_event_data_store.rb', line 898 def field @field end |
#not_ends_with ⇒ Array<String>? (readonly)
An operator that excludes events that match the last few characters of the event record field specified as the value of Field .
915 916 917 |
# File 'cloud_trail/cfn_event_data_store.rb', line 915 def not_ends_with @not_ends_with end |
#not_equals ⇒ Array<String>? (readonly)
An operator that excludes events that match the exact value of the event record field specified as the value of Field .
920 921 922 |
# File 'cloud_trail/cfn_event_data_store.rb', line 920 def not_equals @not_equals end |
#not_starts_with ⇒ Array<String>? (readonly)
An operator that excludes events that match the first few characters of the event record field specified as the value of Field .
925 926 927 |
# File 'cloud_trail/cfn_event_data_store.rb', line 925 def not_starts_with @not_starts_with end |
#starts_with ⇒ Array<String>? (readonly)
An operator that includes events that match the first few characters of the event record field specified as the value of Field .
930 931 932 |
# File 'cloud_trail/cfn_event_data_store.rb', line 930 def starts_with @starts_with end |
Class Method Details
.jsii_properties ⇒ Object
932 933 934 935 936 937 938 939 940 941 942 |
# File 'cloud_trail/cfn_event_data_store.rb', line 932 def self.jsii_properties { :field => "field", :ends_with => "endsWith", :equal_to => "equalTo", :not_ends_with => "notEndsWith", :not_equals => "notEquals", :not_starts_with => "notStartsWith", :starts_with => "startsWith", } end |
Instance Method Details
#to_jsii ⇒ Object
944 945 946 947 948 949 950 951 952 953 954 955 956 |
# File 'cloud_trail/cfn_event_data_store.rb', line 944 def to_jsii result = {} result.merge!({ "field" => @field, "endsWith" => @ends_with, "equalTo" => @equal_to, "notEndsWith" => @not_ends_with, "notEquals" => @not_equals, "notStartsWith" => @not_starts_with, "startsWith" => @starts_with, }) result.compact end |