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 | Contains a list of IP addresses. This can be either IPV4 or IPV6. The list will be mutually |
Id | aws.wafv2.ip_sets |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
description | string | Description of the entity. |
name | string | Name of the WebACL. |
id | string | Id of the WebACL |
scope | string | Use CLOUDFRONT for CloudFront WebACL, use REGIONAL for Application Load Balancer and API Gateway. |
ip_address_version | string | Type of addresses in the IPSet, use IPV4 for IPV4 IP addresses, IPV6 for IPV6 address. |
addresses | array | List of IPAddresses. |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Addresses, IPAddressVersion, Scope, 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,
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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.wafv2.ip_sets (
Scope,
IPAddressVersion,
Addresses,
region
)
SELECT
'{{ Scope }}',
'{{ IPAddressVersion }}',
'{{ Addresses }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.wafv2.ip_sets (
Description,
Name,
Scope,
IPAddressVersion,
Addresses,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ Scope }}',
'{{ IPAddressVersion }}',
'{{ Addresses }}',
'{{ 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: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: Scope
value: '{{ Scope }}'
- name: IPAddressVersion
value: '{{ IPAddressVersion }}'
- name: Addresses
value:
- '{{ Addresses[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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