Class DetectorFeature


  • public class DetectorFeature
    extends com.pulumi.resources.CustomResource
    Provides a resource to manage a single Amazon GuardDuty [detector feature](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty-features-activation-model.html#guardduty-features). > **NOTE:** Deleting this resource does not disable the detector feature, the resource in simply removed from state instead. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.guardduty.Detector;
     import com.pulumi.aws.guardduty.DetectorArgs;
     import com.pulumi.aws.guardduty.DetectorFeature;
     import com.pulumi.aws.guardduty.DetectorFeatureArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new Detector("example", DetectorArgs.builder()
                 .enable(true)
                 .build());
     
             var s3Protection = new DetectorFeature("s3Protection", DetectorFeatureArgs.builder()
                 .detectorId(example.id())
                 .name("S3_DATA_EVENTS")
                 .status("ENABLED")
                 .build());
     
         }
     }
     
     
    ### Extended Threat Detection for EKS To enable GuardDuty [Extended Threat Detection](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty-extended-threat-detection.html) for EKS, you need at least one of these features enabled: [EKS Protection](https://docs.aws.amazon.com/guardduty/latest/ug/kubernetes-protection.html) or [Runtime Monitoring](https://docs.aws.amazon.com/guardduty/latest/ug/runtime-monitoring-configuration.html). For maximum detection coverage, enabling both is recommended to enhance detection capabilities.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.guardduty.Detector;
     import com.pulumi.aws.guardduty.DetectorArgs;
     import com.pulumi.aws.guardduty.DetectorFeature;
     import com.pulumi.aws.guardduty.DetectorFeatureArgs;
     import com.pulumi.aws.guardduty.inputs.DetectorFeatureAdditionalConfigurationArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var example = new Detector("example", DetectorArgs.builder()
                 .enable(true)
                 .build());
     
             var eksProtection = new DetectorFeature("eksProtection", DetectorFeatureArgs.builder()
                 .detectorId(example.id())
                 .name("EKS_AUDIT_LOGS")
                 .status("ENABLED")
                 .build());
     
             var eksRuntimeMonitoring = new DetectorFeature("eksRuntimeMonitoring", DetectorFeatureArgs.builder()
                 .additionalConfigurations(DetectorFeatureAdditionalConfigurationArgs.builder()
                     .name("EKS_ADDON_MANAGEMENT")
                     .status("ENABLED")
                     .build())
                 .detectorId(example.id())
                 .name("EKS_RUNTIME_MONITORING")
                 .status("ENABLED")
                 .build());
     
         }
     }
     
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.List<DetectorFeatureAdditionalConfiguration>> additionalConfigurations()  
      com.pulumi.core.Output<java.lang.String> detectorId()  
      static DetectorFeature get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DetectorFeatureState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> status()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DetectorFeature

        public DetectorFeature​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • DetectorFeature

        public DetectorFeature​(java.lang.String name,
                               DetectorFeatureArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • DetectorFeature

        public DetectorFeature​(java.lang.String name,
                               DetectorFeatureArgs args,
                               @Nullable
                               com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • additionalConfigurations

        public com.pulumi.core.Output<java.util.List<DetectorFeatureAdditionalConfiguration>> additionalConfigurations()
        Returns:
        Additional feature configuration block for features `EKS_RUNTIME_MONITORING`, `RUNTIME_MONITORING` or `RDS_LOGIN_EVENTS`. If omitted, Terraform does not track changes to additional configurations that AWS manages for the feature. Removing a previously declared `additionalConfiguration` block leaves the setting unchanged in AWS; to change a setting, update its `status` instead. See below.
      • detectorId

        public com.pulumi.core.Output<java.lang.String> detectorId()
        Returns:
        Amazon GuardDuty detector ID.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the detector feature. Valid values: `S3_DATA_EVENTS`, `EKS_AUDIT_LOGS`, `EBS_MALWARE_PROTECTION`, `RDS_LOGIN_EVENTS`, `EKS_RUNTIME_MONITORING`, `LAMBDA_NETWORK_LOGS`, `RUNTIME_MONITORING`, `AI_PROTECTION`, `AI_ANALYST`. Only one of two features `EKS_RUNTIME_MONITORING` or `RUNTIME_MONITORING` can be added, adding both features will cause an error. Refer to the [AWS Documentation](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DetectorFeatureConfiguration.html) for the current list of supported values.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        Status of the detector feature. Valid values: `ENABLED`, `DISABLED`.
      • get

        public static DetectorFeature get​(java.lang.String name,
                                          com.pulumi.core.Output<java.lang.String> id,
                                          @Nullable
                                          DetectorFeatureState state,
                                          @Nullable
                                          com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.