Class CfnDetector
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.guardduty.CfnDetector
- All Implemented Interfaces:
IInspectable,ITaggable,IDetectorRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:12.019Z")
@Stability(Stable)
public class CfnDetector
extends CfnResource
implements IInspectable, IDetectorRef, ITaggable
The
AWS::GuardDuty::Detector resource specifies a new GuardDuty detector.
A detector is an object that represents the GuardDuty service. A detector is required for GuardDuty to become operational.
Make sure you use either DataSources or Features in a one request, and not both.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.guardduty.*;
CfnDetector cfnDetector = CfnDetector.Builder.create(this, "MyCfnDetector")
.enable(false)
// the properties below are optional
.dataSources(CFNDataSourceConfigurationsProperty.builder()
.kubernetes(CFNKubernetesConfigurationProperty.builder()
.auditLogs(CFNKubernetesAuditLogsConfigurationProperty.builder()
.enable(false)
.build())
.build())
.malwareProtection(CFNMalwareProtectionConfigurationProperty.builder()
.scanEc2InstanceWithFindings(CFNScanEc2InstanceWithFindingsConfigurationProperty.builder()
.ebsVolumes(false)
.build())
.build())
.s3Logs(CFNS3LogsConfigurationProperty.builder()
.enable(false)
.build())
.build())
.features(List.of(CFNFeatureConfigurationProperty.builder()
.name("name")
.status("status")
// the properties below are optional
.additionalConfiguration(List.of(CFNFeatureAdditionalConfigurationProperty.builder()
.name("name")
.status("status")
.build()))
.build()))
.findingPublishingFrequency("findingPublishingFrequency")
.tags(List.of(TagItemProperty.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDetector.static interfaceDescribes whether S3 data event logs, Kubernetes audit logs, or Malware Protection will be enabled as a data source when the detector is created.static interfaceInformation about the additional configuration of a feature in your account.static interfaceInformation about the configuration of a feature in your account.static interfaceDescribes which optional data sources are enabled for a detector.static interfaceDescribes which Kubernetes protection data sources are enabled for the detector.static interfaceDescribes whether Malware Protection will be enabled as a data source.static interfaceDescribes whether S3 data event logs will be enabled as a data source when the detector is created.static interfaceDescribes whether Malware Protection for EC2 instances with findings will be enabled as a data source.static interfaceDescribes a tag.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.guardduty.IDetectorRef
IDetectorRef.Jsii$Default, IDetectorRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDetector(software.amazon.jsii.JsiiObjectRef objRef) CfnDetector(software.constructs.Construct scope, String id, CfnDetectorProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IDetectorReffromDetectorId(software.constructs.Construct scope, String id, String detectorId) Creates a new IDetectorRef from a detectorId.The unique ID of the detector.Describes which data sources will be enabled for the detector.A reference to a Detector resource.Specifies whether the detector is to be enabled on creation.A list of features that will be configured for the detector.Specifies how frequently updated findings are exported.getTags()Tag Manager which manages the tags for this resource.Specifies tags added to a new detector resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDataSources(IResolvable value) Describes which data sources will be enabled for the detector.voidDescribes which data sources will be enabled for the detector.voidSpecifies whether the detector is to be enabled on creation.voidsetEnable(IResolvable value) Specifies whether the detector is to be enabled on creation.voidsetFeatures(List<Object> value) A list of features that will be configured for the detector.voidsetFeatures(IResolvable value) A list of features that will be configured for the detector.voidSpecifies how frequently updated findings are exported.voidSpecifies tags added to a new detector resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDetector
protected CfnDetector(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDetector
protected CfnDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDetector
@Stability(Stable) public CfnDetector(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDetectorProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromDetectorId
@Stability(Stable) @NotNull public static IDetectorRef fromDetectorId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String detectorId) Creates a new IDetectorRef from a detectorId.- Parameters:
scope- This parameter is required.id- This parameter is required.detectorId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
The unique ID of the detector. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDetectorRef
A reference to a Detector resource.- Specified by:
getDetectorRefin interfaceIDetectorRef
-
getTags
Tag Manager which manages the tags for this resource. -
getEnable
Specifies whether the detector is to be enabled on creation. -
setEnable
Specifies whether the detector is to be enabled on creation. -
setEnable
Specifies whether the detector is to be enabled on creation. -
getDataSources
Describes which data sources will be enabled for the detector. -
setDataSources
Describes which data sources will be enabled for the detector. -
setDataSources
@Stability(Stable) public void setDataSources(@Nullable CfnDetector.CFNDataSourceConfigurationsProperty value) Describes which data sources will be enabled for the detector. -
getFeatures
A list of features that will be configured for the detector. -
setFeatures
A list of features that will be configured for the detector. -
setFeatures
A list of features that will be configured for the detector. -
getFindingPublishingFrequency
Specifies how frequently updated findings are exported. -
setFindingPublishingFrequency
Specifies how frequently updated findings are exported. -
getTagsRaw
Specifies tags added to a new detector resource. -
setTagsRaw
Specifies tags added to a new detector resource.
-