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
DescriptionContains a list of IP addresses. This can be either IPV4 or IPV6. The list will be mutually
Idaws.wafv2.ip_sets

Fields

NameDatatypeDescription
arnstring
descriptionstringDescription of the entity.
namestringName of the WebACL.
idstringId of the WebACL
scopestringUse CLOUDFRONT for CloudFront WebACL, use REGIONAL for Application Load Balancer and API Gateway.
ip_address_versionstringType of addresses in the IPSet, use IPV4 for IPV4 IP addresses, IPV6 for IPV6 address.
addressesarrayList of IPAddresses.
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAddresses, IPAddressVersion, Scope, 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,
arn,
description,
name,
id,
scope,
ip_address_version,
addresses,
tags
FROM aws.wafv2.ip_sets
;

Gets all properties from an individual ip_set.

SELECT
region,
arn,
description,
name,
id,
scope,
ip_address_version,
addresses,
tags
FROM aws.wafv2.ip_sets
WHERE data__Identifier = '<Name>|<Id>|<Scope>';

INSERT example

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

/*+ create */
INSERT INTO aws.wafv2.ip_sets (
Scope,
IPAddressVersion,
Addresses,
region
)
SELECT
'{{ Scope }}',
'{{ IPAddressVersion }}',
'{{ Addresses }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

wafv2:CreateIPSet,
wafv2:GetIPSet,
wafv2:ListTagsForResource

Delete

wafv2:DeleteIPSet,
wafv2:GetIPSet

Read

wafv2:GetIPSet,
wafv2:ListTagsForResource

Update

wafv2:UpdateIPSet,
wafv2:GetIPSet,
wafv2:ListTagsForResource

List

wafv2:listIPSets