GuardDuty / Client / get_detector

get_detector#

GuardDuty.Client.get_detector(**kwargs)#

Retrieves an 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.get_detector(
    DetectorId='string'
)
Parameters:

DetectorId (string) –

[REQUIRED]

The unique ID of the detector that you want to get.

Return type:

dict

Returns:

Response Syntax

{
    'CreatedAt': 'string',
    'FindingPublishingFrequency': 'FIFTEEN_MINUTES'|'ONE_HOUR'|'SIX_HOURS',
    'ServiceRole': 'string',
    'Status': 'ENABLED'|'DISABLED',
    'UpdatedAt': 'string',
    'DataSources': {
        'CloudTrail': {
            'Status': 'ENABLED'|'DISABLED'
        },
        'DNSLogs': {
            'Status': 'ENABLED'|'DISABLED'
        },
        'FlowLogs': {
            'Status': 'ENABLED'|'DISABLED'
        },
        'S3Logs': {
            'Status': 'ENABLED'|'DISABLED'
        },
        'Kubernetes': {
            'AuditLogs': {
                'Status': 'ENABLED'|'DISABLED'
            }
        },
        'MalwareProtection': {
            'ScanEc2InstanceWithFindings': {
                'EbsVolumes': {
                    'Status': 'ENABLED'|'DISABLED',
                    'Reason': 'string'
                }
            },
            'ServiceRole': 'string'
        }
    },
    'Tags': {
        'string': 'string'
    },
    'Features': [
        {
            'Name': 'FLOW_LOGS'|'CLOUD_TRAIL'|'DNS_LOGS'|'S3_DATA_EVENTS'|'EKS_AUDIT_LOGS'|'EBS_MALWARE_PROTECTION'|'RDS_LOGIN_EVENTS'|'EKS_RUNTIME_MONITORING',
            'Status': 'ENABLED'|'DISABLED',
            'UpdatedAt': datetime(2015, 1, 1),
            'AdditionalConfiguration': [
                {
                    'Name': 'EKS_ADDON_MANAGEMENT',
                    'Status': 'ENABLED'|'DISABLED',
                    'UpdatedAt': datetime(2015, 1, 1)
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • CreatedAt (string) –

      The timestamp of when the detector was created.

    • FindingPublishingFrequency (string) –

      The publishing frequency of the finding.

    • ServiceRole (string) –

      The GuardDuty service role.

    • Status (string) –

      The detector status.

    • UpdatedAt (string) –

      The last-updated timestamp for the detector.

    • DataSources (dict) –

      Describes which data sources are enabled for the detector.

      • CloudTrail (dict) –

        An object that contains information on the status of CloudTrail as a data source.

        • Status (string) –

          Describes whether CloudTrail is enabled as a data source for the detector.

      • DNSLogs (dict) –

        An object that contains information on the status of DNS logs as a data source.

        • Status (string) –

          Denotes whether DNS logs is enabled as a data source.

      • FlowLogs (dict) –

        An object that contains information on the status of VPC flow logs as a data source.

        • Status (string) –

          Denotes whether VPC flow logs is enabled as a data source.

      • S3Logs (dict) –

        An object that contains information on the status of S3 Data event logs as a data source.

        • Status (string) –

          A value that describes whether S3 data event logs are automatically enabled for new members of the organization.

      • Kubernetes (dict) –

        An object that contains information on the status of all Kubernetes data sources.

        • AuditLogs (dict) –

          Describes whether Kubernetes audit logs are enabled as a data source.

          • Status (string) –

            A value that describes whether Kubernetes audit logs are enabled as a data source.

      • MalwareProtection (dict) –

        Describes the configuration of Malware Protection data sources.

        • ScanEc2InstanceWithFindings (dict) –

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

          • EbsVolumes (dict) –

            Describes the configuration of scanning EBS volumes as a data source.

            • Status (string) –

              Describes whether scanning EBS volumes is enabled as a data source.

            • Reason (string) –

              Specifies the reason why scanning EBS volumes (Malware Protection) was not enabled as a data source.

        • ServiceRole (string) –

          The GuardDuty Malware Protection service role.

    • Tags (dict) –

      The tags of the detector resource.

      • (string) –

        • (string) –

    • Features (list) –

      Describes the features that have been enabled for the detector.

      • (dict) –

        Contains information about a GuardDuty feature.

        • Name (string) –

          Indicates the name of the feature that can be enabled for the detector.

        • Status (string) –

          Indicates the status of the feature that is enabled for the detector.

        • UpdatedAt (datetime) –

          The timestamp at which the feature object was updated.

        • AdditionalConfiguration (list) –

          Additional configuration for a resource.

          • (dict) –

            Information about the additional configuration.

            • Name (string) –

              Name of the additional configuration.

            • Status (string) –

              Status of the additional configuration.

            • UpdatedAt (datetime) –

              The timestamp at which the additional configuration was last updated. This is in UTC format.

Exceptions

  • GuardDuty.Client.exceptions.BadRequestException

  • GuardDuty.Client.exceptions.InternalServerErrorException