AWS::Connect::Rule - AWS CloudFormation

AWS::Connect::Rule

Creates a rule for the specified Amazon Connect instance.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Connect::Rule", "Properties" : { "Actions" : Actions, "Function" : String, "InstanceArn" : String, "Name" : String, "PublishStatus" : String, "Tags" : [ Tag, ... ], "TriggerEventSource" : RuleTriggerEventSource } }

YAML

Type: AWS::Connect::Rule Properties: Actions: Actions Function: String InstanceArn: String Name: String PublishStatus: String Tags: - Tag TriggerEventSource: RuleTriggerEventSource

Properties

Actions

A list of actions to be run when the rule is triggered.

Required: Yes

Type: Actions

Update requires: No interruption

Function

The conditions of the rule.

Required: Yes

Type: String

Update requires: No interruption

InstanceArn

The Amazon Resource Name (ARN) of the instance.

Required: Yes

Type: String

Update requires: Replacement

Name

The name of the rule.

Required: Yes

Type: String

Update requires: No interruption

PublishStatus

The publish status of the rule.

Allowed values: DRAFT | PUBLISHED

Required: Yes

Type: String

Update requires: No interruption

Tags

The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Required: No

Type: List of Tag

Update requires: No interruption

TriggerEventSource

The event source to trigger the rule.

Required: Yes

Type: RuleTriggerEventSource

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the quick rule name. For example:

{ "Ref": "myRuleName" }

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

RuleArn

The Amazon Resource Name (ARN) of the rule.

Examples

Specify a rule resource

The following example specifies a rule resource for an Amazon Connect instance.

JSON

{ "Name": "ExampleRule", "InstanceArn": "arn:aws:connect:region-name:aws-account-id:instance/instance-arn", "TriggerEventSource": { "EventSourceName": "OnPostCallAnalysisAvailable" }, "Function": "Example function using Amazon Connect Rules Function Language.", "Actions": { "AssignContactCategoryActions": [{}], "EventBridgeActions": [ { "Name": "Name of the event bridge action" } ], "SendNotificationActions": [ { "DeliveryMethod": "EMAIL", "Subject": "Email subject", "Content": "Email content", "ContentType": "PLAIN_TEXT", "Recipient": { "UserArns": ["arn:aws:connect:region-name:aws-account-id:instance/instance-arn/agent/user-arn"] } } ], "TaskActions": [ { "Name": "Name of the task action", "ContactFlowArn": "arn:aws:connect:region-name:aws-account-id:instance/instance-arn/contact-flow/contact-flow-arn", "References": { "reference1": { "Type": "URL", "Value": "URL of the reference" } }, "Description": "Task description" } ] }, "PublishStatus": "DRAFT" }