Skip to content

create_detector

Operation

create_detector

create_detector(request: CreateDetectorInput | CreateDetectorInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDetectorInputDict]) -> CreateDetectorOutput

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.

Parameters:

Name Type Description Default
request CreateDetectorInput | CreateDetectorInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateDetectorInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateDetectorOutput

An instance of CreateDetectorOutput.

create_detector async

create_detector(request: CreateDetectorInput | CreateDetectorInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDetectorInputDict]) -> CreateDetectorOutput

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.

Parameters:

Name Type Description Default
request CreateDetectorInput | CreateDetectorInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateDetectorInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateDetectorOutput

An instance of CreateDetectorOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateDetectorInputDict

Bases: TypedDict

Dictionary form of CreateDetectorInput.

Attributes

client_token instance-attribute
client_token: str | None

The idempotency token for the create request.

This field is autopopulated if not provided.

data_sources instance-attribute

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.

enable instance-attribute
enable: Required[bool]

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

features instance-attribute

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

finding_publishing_frequency instance-attribute
finding_publishing_frequency: str | None

A value that specifies how frequently updated findings are exported.

tags instance-attribute
tags: Mapping[str, str] | None

The tags to be added to a new detector resource.

CreateDetectorInput dataclass

Bases: _SerdeShape

Dataclass for CreateDetectorInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

The idempotency token for the create request.

This field is autopopulated if not provided.

data_sources class-attribute instance-attribute
data_sources: DataSourceConfigurations | None = ...

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.

enable class-attribute instance-attribute
enable: bool | None = ...

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

features class-attribute instance-attribute
features: list[DetectorFeatureConfiguration] | None = ...

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

finding_publishing_frequency class-attribute instance-attribute
finding_publishing_frequency: str | None = ...

A value that specifies how frequently updated findings are exported.

tags class-attribute instance-attribute
tags: dict[str, str] | None = ...

The tags to be added to a new detector resource.

Output

CreateDetectorOutput dataclass

Bases: _SerdeShape

Dataclass for CreateDetectorOutput structure.

Attributes

detector_id class-attribute instance-attribute
detector_id: str | None = ...

The unique ID of the created detector.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

unprocessed_data_sources class-attribute instance-attribute
unprocessed_data_sources: UnprocessedDataSourcesResult | None = ...

Specifies the data sources that couldn't be enabled when GuardDuty was enabled for the first time.