Connect / Client / update_rule
update_rule#
- Connect.Client.update_rule(**kwargs)#
Updates a rule for the specified Amazon Connect instance.
Use the Rules Function language to code conditions for the rule.
See also: AWS API Documentation
Request Syntax
response = client.update_rule( RuleId='string', InstanceId='string', Name='string', Function='string', Actions=[ { 'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION', 'TaskAction': { 'Name': 'string', 'Description': 'string', 'ContactFlowId': 'string', 'References': { 'string': { 'Value': 'string', 'Type': 'URL'|'ATTACHMENT'|'NUMBER'|'STRING'|'DATE'|'EMAIL' } } }, 'EventBridgeAction': { 'Name': 'string' }, 'AssignContactCategoryAction': {} , 'SendNotificationAction': { 'DeliveryMethod': 'EMAIL', 'Subject': 'string', 'Content': 'string', 'ContentType': 'PLAIN_TEXT', 'Recipient': { 'UserTags': { 'string': 'string' }, 'UserIds': [ 'string', ] } } }, ], PublishStatus='DRAFT'|'PUBLISHED' )
- Parameters:
RuleId (string) –
[REQUIRED]
A unique identifier for the rule.
InstanceId (string) –
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Name (string) –
[REQUIRED]
The name of the rule. You can change the name only if
TriggerEventSource
is one of the following values:OnZendeskTicketCreate
|OnZendeskTicketStatusUpdate
|OnSalesforceCaseCreate
Function (string) –
[REQUIRED]
The conditions of the rule.
Actions (list) –
[REQUIRED]
A list of actions to be run when the rule is triggered.
(dict) –
Information about the action to be performed when a rule is triggered.
ActionType (string) – [REQUIRED]
The type of action that creates a rule.
TaskAction (dict) –
Information about the task action. This field is required if
TriggerEventSource
is one of the following values:OnZendeskTicketCreate
|OnZendeskTicketStatusUpdate
|OnSalesforceCaseCreate
Name (string) – [REQUIRED]
The name. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide.
Description (string) –
The description. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide.
ContactFlowId (string) – [REQUIRED]
The identifier of the flow.
References (dict) –
Information about the reference when the
referenceType
isURL
. Otherwise, null. (Supports variable injection in theValue
field.)(string) –
(dict) –
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) – [REQUIRED]
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) – [REQUIRED]
The type of the reference.
DATE
must be of type Epoch timestamp.
EventBridgeAction (dict) –
Information about the EventBridge action.
Supported only for
TriggerEventSource
values:OnPostCallAnalysisAvailable
|OnRealTimeCallAnalysisAvailable
|OnPostChatAnalysisAvailable
|OnContactEvaluationSubmit
|OnMetricDataUpdate
Name (string) – [REQUIRED]
The name.
AssignContactCategoryAction (dict) –
Information about the contact category action.
Supported only for
TriggerEventSource
values:OnPostCallAnalysisAvailable
|OnRealTimeCallAnalysisAvailable
|OnPostChatAnalysisAvailable
|OnZendeskTicketCreate
|OnZendeskTicketStatusUpdate
|OnSalesforceCaseCreate
SendNotificationAction (dict) –
Information about the send notification action.
Supported only for
TriggerEventSource
values:OnPostCallAnalysisAvailable
|OnRealTimeCallAnalysisAvailable
|OnPostChatAnalysisAvailable
|OnContactEvaluationSubmit
|OnMetricDataUpdate
DeliveryMethod (string) – [REQUIRED]
Notification delivery method.
Subject (string) –
The subject of the email if the delivery method is
EMAIL
. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide.Content (string) – [REQUIRED]
Notification content. Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators Guide.
ContentType (string) – [REQUIRED]
Content type format.
Recipient (dict) – [REQUIRED]
Notification recipient.
UserTags (dict) –
The tags used to organize, track, or control access for this resource. For example, { “tags”: {“key1”:”value1”, “key2”:”value2”} }. Amazon Connect users with the specified tags will be notified.
(string) –
(string) –
UserIds (list) –
A list of user IDs.
(string) –
PublishStatus (string) –
[REQUIRED]
The publish status of the rule.
- Returns:
None
Exceptions
Connect.Client.exceptions.InvalidRequestException
Connect.Client.exceptions.ResourceNotFoundException
Connect.Client.exceptions.InternalServiceException
Connect.Client.exceptions.ThrottlingException
Connect.Client.exceptions.AccessDeniedException
Connect.Client.exceptions.ResourceConflictException