Skip to main content

rules

Creates, updates, deletes or gets a rule resource or lists rules in a region

Overview

Namerules
TypeResource
DescriptionCreates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions.
Idaws.vpclattice.rules

Fields

NameDatatypeDescription
actionobject
arnstring
idstring
listener_identifierstring
matchobject
namestring
priorityinteger
service_identifierstring
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAction, Match, Priority, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all rules in a region.

SELECT
region,
action,
arn,
id,
listener_identifier,
match,
name,
priority,
service_identifier,
tags
FROM aws.vpclattice.rules
WHERE region = 'us-east-1';

Gets all properties from an individual rule.

SELECT
region,
action,
arn,
id,
listener_identifier,
match,
name,
priority,
service_identifier,
tags
FROM aws.vpclattice.rules
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.vpclattice.rules (
Action,
Match,
Priority,
region
)
SELECT
'{{ Action }}',
'{{ Match }}',
'{{ Priority }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.vpclattice.rules
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

vpc-lattice:CreateRule,
vpc-lattice:GetRule,
vpc-lattice:ListTagsForResource,
vpc-lattice:TagResource

Read

vpc-lattice:GetRule,
vpc-lattice:ListTagsForResource

Update

vpc-lattice:UpdateRule,
vpc-lattice:GetRule,
vpc-lattice:TagResource,
vpc-lattice:UntagResource

Delete

vpc-lattice:DeleteRule

List

vpc-lattice:ListRules