Skip to content
v2.273.0

CfnRuleProps Struct ​

Properties for defining a CfnRule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_connect as connect } from 'aws-cdk-lib';

declare const assignContactCategoryActions: any;
declare const emptyValue: any;
declare const endAssociatedTasksActions: any;
const cfnRuleProps: connect.CfnRuleProps = {
  actions: {
    assignContactCategoryActions: [assignContactCategoryActions],
    assignSlaActions: [{
      caseSlaConfiguration: {
        name: 'name',
        targetSlaMinutes: 123,
        type: 'type',

        // the properties below are optional
        fieldId: 'fieldId',
        targetFieldValues: [{
          stringValue: 'stringValue',
        }],
      },
      slaAssignmentType: 'slaAssignmentType',
    }],
    createCaseActions: [{
      fields: [{
        id: 'id',
        value: {
          booleanValue: false,
          doubleValue: 123,
          emptyValue: emptyValue,
          stringValue: 'stringValue',
        },
      }],
      templateId: 'templateId',
    }],
    endAssociatedTasksActions: [endAssociatedTasksActions],
    eventBridgeActions: [{
      name: 'name',
    }],
    sendNotificationActions: [{
      content: 'content',
      contentType: 'contentType',
      deliveryMethod: 'deliveryMethod',
      recipient: {
        userArns: ['userArns'],
        userTags: {
          userTagsKey: 'userTags',
        },
      },

      // the properties below are optional
      exclusion: {
        userArns: ['userArns'],
        userTags: {
          userTagsKey: 'userTags',
        },
      },
      subject: 'subject',
    }],
    submitAutoEvaluationActions: [{
      evaluationFormArn: 'evaluationFormArn',
    }],
    taskActions: [{
      contactFlowArn: 'contactFlowArn',
      name: 'name',

      // the properties below are optional
      description: 'description',
      references: {
        referencesKey: {
          type: 'type',
          value: 'value',
        },
      },
    }],
    updateCaseActions: [{
      fields: [{
        id: 'id',
        value: {
          booleanValue: false,
          doubleValue: 123,
          emptyValue: emptyValue,
          stringValue: 'stringValue',
        },
      }],
    }],
  },
  function: 'function',
  instanceArn: 'instanceArn',
  name: 'name',
  publishStatus: 'publishStatus',
  triggerEventSource: {
    eventSourceName: 'eventSourceName',

    // the properties below are optional
    integrationAssociationArn: 'integrationAssociationArn',
  },

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties ​

actionsIResolvable | CfnRule.ActionsPropertyactionstyping.Union[IResolvable, ActionsProperty]actionsIResolvableActionsIResolvableActionsinterface{}required#
A list of actions to be run when the rule is triggered.
functionstringfunctionstrfunctionStringFunctionstringFunction*stringrequired#
The conditions of the rule.
instanceArnstringinstance_arnstrinstanceArnStringInstanceArnstringInstanceArn*stringrequired#
The Amazon Resource Name (ARN) of the instance.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the rule.
publishStatusstringpublish_statusstrpublishStatusStringPublishStatusstringPublishStatus*stringrequired#
The publish status of the rule.

Allowed values : DRAFT | PUBLISHED

tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
The tags used to organize, track, or control access for this resource.

For example, { "tags": {"key1":"value1", "key2":"value2"} }.

triggerEventSourceIResolvable | CfnRule.RuleTriggerEventSourcePropertytrigger_event_sourcetyping.Union[IResolvable, RuleTriggerEventSourceProperty]triggerEventSourceIResolvableTriggerEventSourceIResolvableTriggerEventSourceinterface{}required#
The event source to trigger the rule.

Used as props by ​