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

Fields

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

For more information, see AWS::VpcLattice::Rule.

Methods

NameResourceAccessible byRequired Params
create_resourcerulesINSERTAction, Match, Priority, region
delete_resourcerulesDELETEIdentifier, region
update_resourcerulesUPDATEIdentifier, PatchDocument, region
list_resourcesrules_list_onlySELECTregion
get_resourcerulesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual rule.

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

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.vpclattice.rules
SET PatchDocument = string('{{ {
"Action": action,
"Match": match,
"Priority": priority,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.vpclattice.rules
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

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