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
Idawscc.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.

For more information, see AWS::EC2::PrefixList.

Methods

NameResourceAccessible byRequired Params
create_resourceprefix_listsINSERTPrefixListName, AddressFamily, region
delete_resourceprefix_listsDELETEIdentifier, region
update_resourceprefix_listsUPDATEIdentifier, PatchDocument, region
list_resourcesprefix_lists_list_onlySELECTregion
get_resourceprefix_listsSELECTIdentifier, region

SELECT examples

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 awscc.ec2.prefix_lists
WHERE
region = 'us-east-1' AND
Identifier = '{{ prefix_list_id }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.prefix_lists
SET PatchDocument = string('{{ {
"PrefixListName": prefix_list_name,
"AddressFamily": address_family,
"MaxEntries": max_entries,
"Tags": tags,
"Entries": entries
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ prefix_list_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.prefix_lists
WHERE
Identifier = '{{ prefix_list_id }}' AND
region = 'us-east-1';

Permissions

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

EC2:CreateManagedPrefixList,
EC2:DescribeManagedPrefixLists,
EC2:CreateTags