Skip to main content

rules

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

Overview

Namerules
TypeResource
DescriptionResource Type definition for AWS:Connect::Rule
Idaws.connect.rules

Fields

NameDatatypeDescription
namestringThe name of the rule.
rule_arnstringThe Amazon Resource Name (ARN) of the rule.
instance_arnstringThe Amazon Resource Name (ARN) of the instance.
trigger_event_sourceobjectThe event source that triggers the rule.
functionstringThe conditions of a rule.
actionsobjectThe list of actions that will be executed when a rule is triggered.
publish_statusstringThe publish status of a rule, either draft or published.
tagsarrayOne or more tags.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, InstanceArn, TriggerEventSource, Function, Actions, PublishStatus, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual rule.

SELECT
region,
name,
rule_arn,
instance_arn,
trigger_event_source,
function,
actions,
publish_status,
tags
FROM aws.connect.rules
WHERE region = 'us-east-1' AND data__Identifier = '<RuleArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.connect.rules (
Name,
InstanceArn,
TriggerEventSource,
Function,
Actions,
PublishStatus,
region
)
SELECT
'{{ Name }}',
'{{ InstanceArn }}',
'{{ TriggerEventSource }}',
'{{ Function }}',
'{{ Actions }}',
'{{ PublishStatus }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

connect:CreateRule,
cases:GetTemplate,
cases:ListFields,
cases:ListFieldOptions

Read

connect:DescribeRule

Delete

connect:DeleteRule,
connect:UntagResource

Update

connect:UpdateRule,
cases:GetTemplate,
cases:ListFields,
cases:ListFieldOptions,
connect:TagResource,
connect:UntagResource