Skip to main content

prefix_lists

Creates, updates, deletes or gets a prefix_list resource or lists prefix_lists in a region

Overview

Nameprefix_lists
TypeResource
DescriptionResource schema of AWS::EC2::PrefixList Type
Idaws.ec2.prefix_lists

Fields

NameDatatypeDescription
prefix_list_namestringName of Prefix List.
prefix_list_idstringId of Prefix List.
owner_idstringOwner Id of Prefix List.
address_familystringIp Version of Prefix List.
max_entriesintegerMax Entries of Prefix List.
versionintegerVersion of Prefix List.
tagsarrayTags for Prefix List
entriesarrayEntries of Prefix List.
arnstringThe Amazon Resource Name (ARN) of the Prefix List.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPrefixListName, AddressFamily, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all prefix_lists in a region.

SELECT
region,
prefix_list_name,
prefix_list_id,
owner_id,
address_family,
max_entries,
version,
tags,
entries,
arn
FROM aws.ec2.prefix_lists
WHERE region = 'us-east-1';

Gets all properties from an individual prefix_list.

SELECT
region,
prefix_list_name,
prefix_list_id,
owner_id,
address_family,
max_entries,
version,
tags,
entries,
arn
FROM aws.ec2.prefix_lists
WHERE region = 'us-east-1' AND data__Identifier = '<PrefixListId>';

INSERT example

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

/*+ create */
INSERT INTO aws.ec2.prefix_lists (
PrefixListName,
AddressFamily,
region
)
SELECT
'{{ PrefixListName }}',
'{{ AddressFamily }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ec2.prefix_lists
WHERE data__Identifier = '<PrefixListId>'
AND region = 'us-east-1';

Permissions

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

Create

EC2:CreateManagedPrefixList,
EC2:DescribeManagedPrefixLists,
EC2:CreateTags

Read

EC2:GetManagedPrefixListEntries,
EC2:DescribeManagedPrefixLists

Update

EC2:DescribeManagedPrefixLists,
EC2:GetManagedPrefixListEntries,
EC2:ModifyManagedPrefixList,
EC2:CreateTags,
EC2:DeleteTags

Delete

EC2:DeleteManagedPrefixList,
EC2:DescribeManagedPrefixLists

List

EC2:DescribeManagedPrefixLists,
EC2:GetManagedPrefixListEntries