Skip to main content

threat_entity_sets

Creates, updates, deletes, gets or lists a threat_entity_sets resource.

Overview

Namethreat_entity_sets
TypeResource
Idaws.guardduty.threat_entity_sets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp when the associated threat entity set was created.
error_detailsstringThe error details when the status is shown as ERROR.
expected_bucket_ownerstringThe Amazon Web Services account ID that owns the Amazon S3 bucket specified in the location parameter. (pattern: <code>[0-9]+</code>)
formatstringThe format of the file that contains the threat entity set. (TXT, STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, FIRE_EYE)
locationstringThe URI of the file that contains the threat entity set.
namestringThe name of the threat entity set associated with the specified threatEntitySetId.
statusstringThe status of the associated threat entity set. (INACTIVE, ACTIVATING, ACTIVE, DEACTIVATING, ERROR, DELETE_PENDING, DELETED)
tagsobjectThe tags associated with the threat entity set resource.
updated_atstring (date-time)The timestamp when the associated threat entity set was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_threat_entity_setselectdetector_id, threat_entity_set_id, regionRetrieves the threat entity set associated with the specified threatEntitySetId.
list_threat_entity_setsselectdetector_id, regionmaxResults, nextTokenLists the threat entity sets associated with the specified GuardDuty detector ID. If you use this operation from a member account, the threat entity sets that are returned as a response, belong to the administrator account.
create_threat_entity_setinsertdetector_id, region, ActivateCreates a new threat entity set. In a threat entity set, you can provide known malicious threat entities for your Amazon Web Services environment. GuardDuty generates findings based on the entries in the threat entity sets. Only users of the administrator account can manage entity sets, which automatically apply to member accounts.
update_threat_entity_setupdatedetector_id, threat_entity_set_id, regionUpdates the threat entity set associated with the specified threatEntitySetId.
delete_threat_entity_setdeletedetector_id, threat_entity_set_id, regionDeletes the threat entity set that is associated with the specified threatEntitySetId.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
detector_idstringThe unique ID of the detector associated with the threat entity set resource. To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
regionstringAWS region (default: us-east-1)
threat_entity_set_idstringThe unique ID that helps GuardDuty identify which threat entity set needs to be deleted.
maxResultsintegerYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 50.
nextTokenstringYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data.

SELECT examples

Retrieves the threat entity set associated with the specified threatEntitySetId.

SELECT
created_at,
error_details,
expected_bucket_owner,
format,
location,
name,
status,
tags,
updated_at
FROM aws.guardduty.threat_entity_sets
WHERE detector_id = '{{ detector_id }}' -- required
AND threat_entity_set_id = '{{ threat_entity_set_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new threat entity set. In a threat entity set, you can provide known malicious threat entities for your Amazon Web Services environment. GuardDuty generates findings based on the entries in the threat entity sets. Only users of the administrator account can manage entity sets, which automatically apply to member accounts.

INSERT INTO aws.guardduty.threat_entity_sets (
Name,
Format,
Location,
ExpectedBucketOwner,
Activate,
ClientToken,
Tags,
detector_id,
region
)
SELECT
'{{ Name }}',
'{{ Format }}',
'{{ Location }}',
'{{ ExpectedBucketOwner }}',
{{ Activate }} /* required */,
'{{ ClientToken }}',
'{{ Tags }}',
'{{ detector_id }}',
'{{ region }}'
RETURNING
threat_entity_set_id
;

UPDATE examples

Updates the threat entity set associated with the specified threatEntitySetId.

UPDATE aws.guardduty.threat_entity_sets
SET
Name = '{{ Name }}',
Location = '{{ Location }}',
ExpectedBucketOwner = '{{ ExpectedBucketOwner }}',
Activate = {{ Activate }}
WHERE
detector_id = '{{ detector_id }}' --required
AND threat_entity_set_id = '{{ threat_entity_set_id }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes the threat entity set that is associated with the specified threatEntitySetId.

DELETE FROM aws.guardduty.threat_entity_sets
WHERE detector_id = '{{ detector_id }}' --required
AND threat_entity_set_id = '{{ threat_entity_set_id }}' --required
AND region = '{{ region }}' --required
;