Class CfnTrail.AdvancedFieldSelectorProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTrail.AdvancedFieldSelectorProperty>
- Enclosing interface:
CfnTrail.AdvancedFieldSelectorProperty
CfnTrail.AdvancedFieldSelectorProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getEndsWith()Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getEqualTo()Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getField()notEndsWith(List<String> notEndsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotEndsWith()Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotEquals()notStartsWith(List<String> notStartsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotStartsWith()startsWith(List<String> startsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getStartsWith()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getField()- Parameters:
field- A field in a CloudTrail event record on which to filter events to be logged. This parameter is required. 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
readOnly,eventCategory, andeventSource.For CloudTrail data events, supported fields include
readOnly,eventCategory,eventName,resources.type, andresources.ARN.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
eventCategory.readOnly- Optional. Can be set toEqualsa value oftrueorfalse. If you do not add this field, CloudTrail logs bothreadandwriteevents. A value oftruelogs onlyreadevents. A value offalselogs onlywriteevents.eventSource- For filtering management events only. This can be set toNotEqualskms.amazonaws.comorNotEqualsrdsdata.amazonaws.com.eventName- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucketorGetSnapshotBlock. You can have multiple values for this field, separated by commas.eventCategory- This 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.
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 non- AWS events, the value must be
ActivityAuditLog. resources.type- This field is required for CloudTrail data events.resources.typecan only use theEqualsoperator, and the value can be one of the following:AWS::AppConfig::ConfigurationAWS::B2BI::TransformerAWS::Bedrock::AgentAliasAWS::Bedrock::FlowAliasAWS::Bedrock::GuardrailAWS::Bedrock::KnowledgeBaseAWS::Cassandra::TableAWS::CloudFront::KeyValueStoreAWS::CloudTrail::ChannelAWS::CloudWatch::MetricAWS::CodeWhisperer::CustomizationAWS::CodeWhisperer::ProfileAWS::Cognito::IdentityPoolAWS::DynamoDB::StreamAWS::DynamoDB::TableAWS::EC2::SnapshotAWS::EMRWAL::WorkspaceAWS::FinSpace::EnvironmentAWS::Glue::TableAWS::GreengrassV2::ComponentVersionAWS::GreengrassV2::DeploymentAWS::GuardDuty::DetectorAWS::IoT::CertificateAWS::IoT::ThingAWS::IoTSiteWise::AssetAWS::IoTSiteWise::TimeSeriesAWS::IoTTwinMaker::EntityAWS::IoTTwinMaker::WorkspaceAWS::KendraRanking::ExecutionPlanAWS::Kinesis::StreamAWS::Kinesis::StreamConsumerAWS::KinesisVideo::StreamAWS::Lambda::FunctionAWS::MachineLearning::MlModelAWS::ManagedBlockchain::NetworkAWS::ManagedBlockchain::NodeAWS::MedicalImaging::DatastoreAWS::NeptuneGraph::GraphAWS::One::UKeyAWS::One::UserAWS::PaymentCryptography::AliasAWS::PaymentCryptography::KeyAWS::PCAConnectorAD::ConnectorAWS::PCAConnectorSCEP::ConnectorAWS::QApps:QAppAWS::QBusiness::ApplicationAWS::QBusiness::DataSourceAWS::QBusiness::IndexAWS::QBusiness::WebExperienceAWS::RDS::DBClusterAWS::RUM::AppMonitorAWS::S3::AccessPointAWS::S3::ObjectAWS::S3Express::ObjectAWS::S3ObjectLambda::AccessPointAWS::S3Outposts::ObjectAWS::SageMaker::EndpointAWS::SageMaker::ExperimentTrialComponentAWS::SageMaker::FeatureGroupAWS::ServiceDiscovery::NamespaceAWS::ServiceDiscovery::ServiceAWS::SCN::InstanceAWS::SNS::PlatformEndpointAWS::SNS::TopicAWS::SQS::QueueAWS::SSM::ManagedNodeAWS::SSMMessages::ControlChannelAWS::StepFunctions::StateMachineAWS::SWF::DomainAWS::ThinClient::DeviceAWS::ThinClient::EnvironmentAWS::Timestream::DatabaseAWS::Timestream::TableAWS::VerifiedPermissions::PolicyStoreAWS::XRay::Trace
You can have only one
resources.typefield per selector. To log data events on more than one resource type, add another selector.resources.ARN- 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 information about filtering on theresources.ARNfield, see Filtering data events by resources.ARN in the AWS CloudTrail User Guide .
You can't use the
resources.ARNfield to filter resource types that do not have ARNs.- Returns:
this
-
endsWith
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder endsWith(List<String> endsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getEndsWith()- Parameters:
endsWith- An operator that includes events that match the last few characters of the event record field specified as the value ofField.- Returns:
this
-
equalTo
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder equalTo(List<String> equalTo) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getEqualTo()- Parameters:
equalTo- An operator that includes events that match the exact value of the event record field specified as the value ofField. This is the only valid operator that you can use with thereadOnly,eventCategory, andresources.typefields.- Returns:
this
-
notEndsWith
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder notEndsWith(List<String> notEndsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotEndsWith()- Parameters:
notEndsWith- An operator that excludes events that match the last few characters of the event record field specified as the value ofField.- Returns:
this
-
notEquals
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder notEquals(List<String> notEquals) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotEquals()- Parameters:
notEquals- An operator that excludes events that match the exact value of the event record field specified as the value ofField.- Returns:
this
-
notStartsWith
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder notStartsWith(List<String> notStartsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getNotStartsWith()- Parameters:
notStartsWith- An operator that excludes events that match the first few characters of the event record field specified as the value ofField.- Returns:
this
-
startsWith
@Stability(Stable) public CfnTrail.AdvancedFieldSelectorProperty.Builder startsWith(List<String> startsWith) Sets the value ofCfnTrail.AdvancedFieldSelectorProperty.getStartsWith()- Parameters:
startsWith- An operator that includes events that match the first few characters of the event record field specified as the value ofField.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTrail.AdvancedFieldSelectorProperty>- Returns:
- a new instance of
CfnTrail.AdvancedFieldSelectorProperty - Throws:
NullPointerException- if any required attribute was not provided
-