---
title: "PUT /rules/{InstanceId}/{RuleId}"
method: PUT
path: "/rules/{InstanceId}/{RuleId}"
---

# PUT /rules/{InstanceId}/{RuleId}

`PUT /rules/{InstanceId}/{RuleId}`

Updates a rule for the specified Amazon Connect instance.

Use the [Rules Function language](https://docs.aws.amazon.com/connect/latest/APIReference/connect-rules-language.html) to code conditions for the rule.

## Path parameters

- `RuleId` string, required
- `InstanceId` string, required

## Request body

- object
  - `Name` string, required — The name of the rule. You can change the name only if <code>TriggerEventSource</code> is one of the following values: <code>OnZendeskTicketCreate</code> | <code>OnZendeskTicketStatusUpdate</code> | <code>OnSalesforceCaseCreate</code>
  - `Function` string, required — The conditions of the rule.
  - `Actions` RuleAction[], required — A list of actions to be run when the rule is triggered.
    - `ActionType` 'CREATE_TASK' | 'ASSIGN_CONTACT_CATEGORY' | 'GENERATE_EVENTBRIDGE_EVENT' | 'SEND_NOTIFICATION', required — The type of action that creates a rule.
    - `TaskAction` object — Information about the task action. This field is required if <code>TriggerEventSource</code> is one of the following values: <code>OnZendeskTicketCreate</code> | <code>OnZendeskTicketStatusUpdate</code> | <code>OnSalesforceCaseCreate</code>
      - `Name` string, required — The name. Supports variable injection. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-variable-injection.html">JSONPath reference</a> in the <i>Amazon Connect Administrators Guide</i>.
      - `Description` string — The description. Supports variable injection. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-variable-injection.html">JSONPath reference</a> in the <i>Amazon Connect Administrators Guide</i>.
      - `ContactFlowId` string, required — The identifier of the flow.
      - `References` object — Information about the reference when the <code>referenceType</code> is <code>URL</code>. Otherwise, null. (Supports variable injection in the <code>Value</code> field.)
    - `EventBridgeAction` object — Information about the EventBridge action.
      - `Name` string, required — The name.
    - `AssignContactCategoryAction` object — Information about the contact category action.
    - `SendNotificationAction` object — Information about the send notification action.
      - `DeliveryMethod` 'EMAIL', required — Notification delivery method.
      - `Subject` string — The subject of the email if the delivery method is <code>EMAIL</code>. Supports variable injection. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-variable-injection.html">JSONPath reference</a> in the <i>Amazon Connect Administrators Guide</i>.
      - `Content` string, required — Notification content. Supports variable injection. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-variable-injection.html">JSONPath reference</a> in the <i>Amazon Connect Administrators Guide</i>.
      - `ContentType` 'PLAIN_TEXT', required — Content type format.
      - `Recipient` object, required — Notification recipient.
        - `UserTags` object — 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.
        - `UserIds` UserId[] — A list of user IDs.
  - `PublishStatus` 'DRAFT' | 'PUBLISHED', required — The publish status of the rule.

## Response `200`

Success

## Other responses

- `480` — InvalidRequestException
- `481` — ResourceNotFoundException
- `482` — InternalServiceException
- `483` — ThrottlingException
- `484` — AccessDeniedException
- `485` — ResourceConflictException

---

[API](https://skmtc.net/aws/apis/connect.md) · [All operations](https://skmtc.net/aws/apis/connect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/connect/versions/fbcf0a4faed2/schema)
