Skip to content

Create Detector

guardduty_create_detector R Documentation

Creates a single GuardDuty detector

Description

Creates a single GuardDuty detector. A detector is a resource that represents the GuardDuty service. To start using GuardDuty, you must create a detector in each Region where you enable the service. You can have only one detector per account per Region. All data sources are enabled in a new detector by default.

  • When you don't specify any features, with an exception to RUNTIME_MONITORING, all the optional features are enabled by default.

  • When you specify some of the features, any feature that is not specified in the API call gets enabled by default, with an exception to RUNTIME_MONITORING.

Specifying both EKS Runtime Monitoring (EKS_RUNTIME_MONITORING) and Runtime Monitoring (RUNTIME_MONITORING) will cause an error. You can add only one of these two features because Runtime Monitoring already includes the threat detection for Amazon EKS resources. For more information, see Runtime Monitoring.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

Usage

guardduty_create_detector(Enable, ClientToken,
  FindingPublishingFrequency, DataSources, Tags, Features)

Arguments

Enable

[required] A Boolean value that specifies whether the detector is to be enabled.

ClientToken

The idempotency token for the create request.

FindingPublishingFrequency

A value that specifies how frequently updated findings are exported.

DataSources

Describes which data sources will be enabled for the detector.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

Tags

The tags to be added to a new detector resource.

Features

A list of features that will be configured for the detector.

Value

A list with the following syntax:

list(
  DetectorId = "string",
  UnprocessedDataSources = list(
    MalwareProtection = list(
      ScanEc2InstanceWithFindings = list(
        EbsVolumes = list(
          Status = "ENABLED"|"DISABLED",
          Reason = "string"
        )
      ),
      ServiceRole = "string"
    )
  )
)

Request syntax

svc$create_detector(
  Enable = TRUE|FALSE,
  ClientToken = "string",
  FindingPublishingFrequency = "FIFTEEN_MINUTES"|"ONE_HOUR"|"SIX_HOURS",
  DataSources = list(
    S3Logs = list(
      Enable = TRUE|FALSE
    ),
    Kubernetes = list(
      AuditLogs = list(
        Enable = TRUE|FALSE
      )
    ),
    MalwareProtection = list(
      ScanEc2InstanceWithFindings = list(
        EbsVolumes = TRUE|FALSE
      )
    )
  ),
  Tags = list(
    "string"
  ),
  Features = list(
    list(
      Name = "S3_DATA_EVENTS"|"EKS_AUDIT_LOGS"|"EBS_MALWARE_PROTECTION"|"RDS_LOGIN_EVENTS"|"EKS_RUNTIME_MONITORING"|"LAMBDA_NETWORK_LOGS"|"RUNTIME_MONITORING",
      Status = "ENABLED"|"DISABLED",
      AdditionalConfiguration = list(
        list(
          Name = "EKS_ADDON_MANAGEMENT"|"ECS_FARGATE_AGENT_MANAGEMENT"|"EC2_AGENT_MANAGEMENT",
          Status = "ENABLED"|"DISABLED"
        )
      )
    )
  )
)