Class CfnDetector

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:59.879Z") @Stability(Stable) public class CfnDetector extends CfnResource implements IInspectable, 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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The unique ID of the detector.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getEnable

      @Stability(Stable) @NotNull public Object getEnable()
      Specifies whether the detector is to be enabled on creation.
    • setEnable

      @Stability(Stable) public void setEnable(@NotNull Boolean value)
      Specifies whether the detector is to be enabled on creation.
    • setEnable

      @Stability(Stable) public void setEnable(@NotNull IResolvable value)
      Specifies whether the detector is to be enabled on creation.
    • getDataSources

      @Stability(Stable) @Nullable public Object getDataSources()
      Describes which data sources will be enabled for the detector.
    • setDataSources

      @Stability(Stable) public void setDataSources(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getFeatures()
      A list of features that will be configured for the detector.
    • setFeatures

      @Stability(Stable) public void setFeatures(@Nullable IResolvable value)
      A list of features that will be configured for the detector.
    • setFeatures

      @Stability(Stable) public void setFeatures(@Nullable List<Object> value)
      A list of features that will be configured for the detector.
    • getFindingPublishingFrequency

      @Stability(Stable) @Nullable public String getFindingPublishingFrequency()
      Specifies how frequently updated findings are exported.
    • setFindingPublishingFrequency

      @Stability(Stable) public void setFindingPublishingFrequency(@Nullable String value)
      Specifies how frequently updated findings are exported.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnDetector.TagItemProperty> getTagsRaw()
      Specifies tags added to a new detector resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnDetector.TagItemProperty> value)
      Specifies tags added to a new detector resource.