ip_sets
Creates, updates, deletes or gets an ip_set
resource or lists ip_sets
in a region
Overview
Name | ip_sets |
Type | Resource |
Description | Resource Type definition for AWS::GuardDuty::IPSet |
Id | aws.guardduty.ip_sets |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
format | string | |
activate | boolean | |
detector_id | string | |
name | string | |
location | string | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Format, Location, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.guardduty.ip_sets (
Format,
Location,
region
)
SELECT
'{{ Format }}',
'{{ Location }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.guardduty.ip_sets (
Format,
Activate,
DetectorId,
Name,
Location,
Tags,
region
)
SELECT
'{{ Format }}',
'{{ Activate }}',
'{{ DetectorId }}',
'{{ Name }}',
'{{ Location }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ip_set
props:
- name: Format
value: '{{ Format }}'
- name: Activate
value: '{{ Activate }}'
- name: DetectorId
value: '{{ DetectorId }}'
- name: Name
value: '{{ Name }}'
- name: Location
value: '{{ Location }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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