Skip to main content

ip_sets

Creates, updates, deletes or gets an ip_set resource or lists ip_sets in a region

Overview

Nameip_sets
TypeResource
DescriptionResource Type definition for AWS::GuardDuty::IPSet
Idaws.guardduty.ip_sets

Fields

NameDatatypeDescription
idstring
formatstring
activateboolean
detector_idstring
namestring
locationstring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTFormat, Location, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all ip_sets in a region.

SELECT
region,
id,
format,
activate,
detector_id,
name,
location,
tags
FROM aws.guardduty.ip_sets
WHERE region = 'us-east-1';

Gets all properties from an individual ip_set.

SELECT
region,
id,
format,
activate,
detector_id,
name,
location,
tags
FROM aws.guardduty.ip_sets
WHERE region = 'us-east-1' AND data__Identifier = '<Id>|<DetectorId>';

INSERT example

Use the following StackQL query and manifest file to create a new ip_set resource, using stack-deploy.

/*+ create */
INSERT INTO aws.guardduty.ip_sets (
Format,
Location,
region
)
SELECT
'{{ Format }}',
'{{ Location }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.guardduty.ip_sets
WHERE data__Identifier = '<Id|DetectorId>'
AND region = 'us-east-1';

Permissions

To operate on the ip_sets resource, the following permissions are required:

Create

guardduty:CreateIPSet,
guardduty:GetIPSet,
guardduty:TagResource,
iam:PutRolePolicy

Read

guardduty:GetIPSet

Delete

guardduty:GetDetector,
guardduty:ListDetectors,
guardduty:ListIPSets,
guardduty:GetIPSet,
guardduty:DeleteIPSet,
iam:DeleteRolePolicy

Update

guardduty:UpdateIPSet,
guardduty:GetIPSet,
guardduty:ListIPSets,
iam:PutRolePolicy

List

guardduty:ListIPSets