{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-update-chat-controls-configuration-request-schema.json",
  "title": "UpdateChatControlsConfigurationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-chatcontrols-api-openapi.yml#/components/schemas/UpdateChatControlsConfigurationRequest",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the application for which the chat controls are configured."
    },
    "clientToken": {
      "type": "string",
      "description": "A token that you provide to identify the request to update a Amazon Q Business application chat configuration."
    },
    "responseScope": {
      "type": "string",
      "enum": [
        "ENTERPRISE_CONTENT_ONLY",
        "EXTENDED_KNOWLEDGE_ENABLED"
      ],
      "description": "The response scope configured for your application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat."
    },
    "orchestrationConfiguration": {
      "$ref": "#/$defs/OrchestrationConfiguration"
    },
    "blockedPhrasesConfigurationUpdate": {
      "$ref": "#/$defs/BlockedPhrasesConfigurationUpdate"
    },
    "topicConfigurationsToCreateOrUpdate": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TopicConfiguration"
      },
      "description": "The configured topic specific chat controls you want to update."
    },
    "topicConfigurationsToDelete": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TopicConfiguration"
      },
      "description": "The configured topic specific chat controls you want to delete."
    },
    "creatorModeConfiguration": {
      "$ref": "#/$defs/CreatorModeConfiguration"
    },
    "hallucinationReductionConfiguration": {
      "$ref": "#/$defs/HallucinationReductionConfiguration"
    }
  },
  "required": [
    "applicationId"
  ],
  "$defs": {
    "BlockedPhrasesConfigurationUpdate": {
      "type": "object",
      "properties": {
        "blockedPhrasesToCreateOrUpdate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Creates or updates a blocked phrases configuration in your Amazon Q Business application."
        },
        "blockedPhrasesToDelete": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Deletes a blocked phrases configuration in your Amazon Q Business application."
        },
        "systemMessageOverride": {
          "type": "string",
          "description": "The configured custom message displayed to your end user when they use blocked phrase during chat."
        }
      }
    },
    "ContentBlockerRule": {
      "type": "object",
      "properties": {
        "systemMessageOverride": {
          "type": "string",
          "description": "The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat."
        }
      }
    },
    "ContentRetrievalRule": {
      "type": "object",
      "properties": {
        "eligibleDataSources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EligibleDataSource"
          },
          "description": "Specifies data sources in a Amazon Q Business application to use for content generation."
        }
      }
    },
    "CreatorModeConfiguration": {
      "type": "object",
      "properties": {
        "creatorModeControl": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Status information about whether CREATOR_MODE has been enabled or disabled. The default status is DISABLED."
        }
      },
      "required": [
        "creatorModeControl"
      ]
    },
    "EligibleDataSource": {
      "type": "object",
      "properties": {
        "indexId": {
          "type": "string",
          "description": "The identifier of the index the data source is attached to."
        },
        "dataSourceId": {
          "type": "string",
          "description": "The identifier of the data source."
        }
      }
    },
    "HallucinationReductionConfiguration": {
      "type": "object",
      "properties": {
        "hallucinationReductionControl": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Controls whether hallucination reduction has been enabled or disabled for your application. The default status is DISABLED."
        }
      }
    },
    "OrchestrationConfiguration": {
      "type": "object",
      "properties": {
        "control": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Status information about whether chat orchestration is activated or deactivated for your Amazon Q Business application."
        }
      },
      "required": [
        "control"
      ]
    },
    "Rule": {
      "type": "object",
      "properties": {
        "includedUsersAndGroups": {
          "$ref": "#/$defs/UsersAndGroups"
        },
        "excludedUsersAndGroups": {
          "$ref": "#/$defs/UsersAndGroups"
        },
        "ruleType": {
          "type": "string",
          "enum": [
            "CONTENT_BLOCKER_RULE",
            "CONTENT_RETRIEVAL_RULE"
          ],
          "description": "The type of rule."
        },
        "ruleConfiguration": {
          "$ref": "#/$defs/RuleConfiguration"
        }
      },
      "required": [
        "ruleType"
      ]
    },
    "RuleConfiguration": {
      "type": "object",
      "properties": {
        "contentBlockerRule": {
          "$ref": "#/$defs/ContentBlockerRule"
        },
        "contentRetrievalRule": {
          "$ref": "#/$defs/ContentRetrievalRule"
        }
      },
      "description": "Exactly one member is set."
    },
    "TopicConfiguration": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A name for your topic control configuration."
        },
        "description": {
          "type": "string",
          "description": "A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration."
        },
        "exampleChatMessages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of example phrases that you expect the end user to use in relation to the topic."
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Rule"
          },
          "description": "Rules defined for a topic configuration."
        }
      },
      "required": [
        "name",
        "rules"
      ]
    },
    "UsersAndGroups": {
      "type": "object",
      "properties": {
        "userIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The user ids associated with a topic control rule."
        },
        "userGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The user group names associated with a topic control rule."
        }
      }
    }
  }
}