GuardDuty / Client / update_detector

update_detector#

GuardDuty.Client.update_detector(**kwargs)#

Updates the Amazon GuardDuty detector specified by the detectorId.

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.

See also: AWS API Documentation

Request Syntax

response = client.update_detector(
    DetectorId='string',
    Enable=True|False,
    FindingPublishingFrequency='FIFTEEN_MINUTES'|'ONE_HOUR'|'SIX_HOURS',
    DataSources={
        'S3Logs': {
            'Enable': True|False
        },
        'Kubernetes': {
            'AuditLogs': {
                'Enable': True|False
            }
        },
        'MalwareProtection': {
            'ScanEc2InstanceWithFindings': {
                'EbsVolumes': True|False
            }
        }
    },
    Features=[
        {
            'Name': 'S3_DATA_EVENTS'|'EKS_AUDIT_LOGS'|'EBS_MALWARE_PROTECTION'|'RDS_LOGIN_EVENTS'|'EKS_RUNTIME_MONITORING',
            'Status': 'ENABLED'|'DISABLED',
            'AdditionalConfiguration': [
                {
                    'Name': 'EKS_ADDON_MANAGEMENT',
                    'Status': 'ENABLED'|'DISABLED'
                },
            ]
        },
    ]
)
Parameters:
  • DetectorId (string) –

    [REQUIRED]

    The unique ID of the detector to update.

  • Enable (boolean) – Specifies whether the detector is enabled or not enabled.

  • FindingPublishingFrequency (string) – An enum value that specifies how frequently findings are exported, such as to CloudWatch Events.

  • DataSources (dict) –

    Describes which data sources will be updated.

    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.

    • S3Logs (dict) –

      Describes whether S3 data event logs are enabled as a data source.

      • Enable (boolean) – [REQUIRED]

        The status of S3 data event logs as a data source.

    • Kubernetes (dict) –

      Describes whether any Kubernetes logs are enabled as data sources.

      • AuditLogs (dict) – [REQUIRED]

        The status of Kubernetes audit logs as a data source.

        • Enable (boolean) – [REQUIRED]

          The status of Kubernetes audit logs as a data source.

    • MalwareProtection (dict) –

      Describes whether Malware Protection is enabled as a data source.

      • ScanEc2InstanceWithFindings (dict) –

        Describes the configuration of Malware Protection for EC2 instances with findings.

        • EbsVolumes (boolean) –

          Describes the configuration for scanning EBS volumes as data source.

  • Features (list) –

    Provides the features that will be updated for the detector.

    • (dict) –

      Contains information about a GuardDuty feature.

      • Name (string) –

        The name of the feature.

      • Status (string) –

        The status of the feature.

      • AdditionalConfiguration (list) –

        Additional configuration for a resource.

        • (dict) –

          Information about the additional configuration for a feature in your GuardDuty account.

          • Name (string) –

            Name of the additional configuration.

          • Status (string) –

            Status of the additional configuration.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • GuardDuty.Client.exceptions.BadRequestException

  • GuardDuty.Client.exceptions.InternalServerErrorException