{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-retriever-request-schema.json",
  "title": "CreateRetrieverRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-retrievers-api-openapi.yml#/components/schemas/CreateRetrieverRequest",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of your Amazon Q Business application."
    },
    "type": {
      "type": "string",
      "enum": [
        "NATIVE_INDEX",
        "KENDRA_INDEX"
      ],
      "description": "The type of retriever you are using."
    },
    "displayName": {
      "type": "string",
      "description": "The name of your retriever."
    },
    "configuration": {
      "$ref": "#/$defs/RetrieverConfiguration"
    },
    "roleArn": {
      "type": "string",
      "description": "The ARN of an IAM role used by Amazon Q Business to access the basic authentication credentials stored in a Secrets Manager secret."
    },
    "clientToken": {
      "type": "string",
      "description": "A token that you provide to identify the request to create your Amazon Q Business application retriever."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of key-value pairs that identify or categorize the retriever. You can also use tags to help control access to the retriever. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @."
    }
  },
  "required": [
    "applicationId",
    "type",
    "displayName",
    "configuration"
  ],
  "$defs": {
    "DateAttributeBoostingConfiguration": {
      "type": "object",
      "properties": {
        "boostingLevel": {
          "type": "string",
          "enum": [
            "NONE",
            "LOW",
            "MEDIUM",
            "HIGH",
            "VERY_HIGH",
            "ONE",
            "TWO"
          ],
          "description": "Specifies the priority tier ranking of boosting applied to document attributes. For version 2, this parameter indicates the relative ranking between boosted fields (ONE being highest priority, TWO being second highest, etc.) and determines the order in which attributes influence document ranking in search results. For version 1, this parameter specifies the boosting intensity. For version 2, boosting intensity (VERY HIGH, HIGH, MEDIUM, LOW, NONE) are not supported. Note that in version 2, you are not allowed to boost on only one field and make this value TWO."
        },
        "boostingDurationInSeconds": {
          "type": "integer",
          "description": "Specifies the duration, in seconds, of a boost applies to a DATE type document attribute."
        }
      },
      "required": [
        "boostingLevel"
      ]
    },
    "DocumentAttributeBoostingConfiguration": {
      "type": "object",
      "properties": {
        "numberConfiguration": {
          "$ref": "#/$defs/NumberAttributeBoostingConfiguration"
        },
        "stringConfiguration": {
          "$ref": "#/$defs/StringAttributeBoostingConfiguration"
        },
        "dateConfiguration": {
          "$ref": "#/$defs/DateAttributeBoostingConfiguration"
        },
        "stringListConfiguration": {
          "$ref": "#/$defs/StringListAttributeBoostingConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "KendraIndexConfiguration": {
      "type": "object",
      "properties": {
        "indexId": {
          "type": "string",
          "description": "The identifier of the Amazon Kendra index."
        }
      },
      "required": [
        "indexId"
      ]
    },
    "NativeIndexConfiguration": {
      "type": "object",
      "properties": {
        "indexId": {
          "type": "string",
          "description": "The identifier for the Amazon Q Business index."
        },
        "version": {
          "type": "integer",
          "description": "A read-only field that specifies the version of the NativeIndexConfiguration. Amazon Q Business introduces enhanced document retrieval capabilities in version 2 of NativeIndexConfiguration, focusing on streamlined metadata boosting that prioritizes recency and source relevance to deliver more accurate responses to your queries. Version 2 has the following differences from version 1: Version 2 supports a single Date field (created_at OR last_updated_at) for recency boosting Version 2 supports a single String field with an ordered list of up to 5 values Version 2 introduces number-based boost le"
        },
        "boostingOverride": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/DocumentAttributeBoostingConfiguration"
          },
          "description": "Overrides the default boosts applied by Amazon Q Business to supported document attribute data types."
        }
      },
      "required": [
        "indexId"
      ]
    },
    "NumberAttributeBoostingConfiguration": {
      "type": "object",
      "properties": {
        "boostingLevel": {
          "type": "string",
          "enum": [
            "NONE",
            "LOW",
            "MEDIUM",
            "HIGH",
            "VERY_HIGH",
            "ONE",
            "TWO"
          ],
          "description": "Specifies the priority of boosted document attributes in relation to other boosted attributes. This parameter determines how strongly the attribute influences document ranking in search results. NUMBER attributes can serve as additional boosting factors when needed, but are not supported when using NativeIndexConfiguration version 2."
        },
        "boostingType": {
          "type": "string",
          "enum": [
            "PRIORITIZE_LARGER_VALUES",
            "PRIORITIZE_SMALLER_VALUES"
          ],
          "description": "Specifies whether higher or lower numeric values should be prioritized when boosting. Valid values are ASCENDING (higher numbers are more important) and DESCENDING (lower numbers are more important)."
        }
      },
      "required": [
        "boostingLevel"
      ]
    },
    "RetrieverConfiguration": {
      "type": "object",
      "properties": {
        "nativeIndexConfiguration": {
          "$ref": "#/$defs/NativeIndexConfiguration"
        },
        "kendraIndexConfiguration": {
          "$ref": "#/$defs/KendraIndexConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "StringAttributeBoostingConfiguration": {
      "type": "object",
      "properties": {
        "boostingLevel": {
          "type": "string",
          "enum": [
            "NONE",
            "LOW",
            "MEDIUM",
            "HIGH",
            "VERY_HIGH",
            "ONE",
            "TWO"
          ],
          "description": "Specifies the priority tier ranking of boosting applied to document attributes. For version 2, this parameter indicates the relative ranking between boosted fields (ONE being highest priority, TWO being second highest, etc.) and determines the order in which attributes influence document ranking in search results. For version 1, this parameter specifies the boosting intensity. For version 2, boosting intensity (VERY HIGH, HIGH, MEDIUM, LOW, NONE) are not supported. Note that in version 2, you are not allowed to boost on only one field and make this value TWO."
        },
        "attributeValueBoosting": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "VERY_HIGH",
              "ONE",
              "TWO",
              "THREE",
              "FOUR",
              "FIVE"
            ]
          },
          "description": "Specifies specific values of a STRING type document attribute being boosted. When using NativeIndexConfiguration version 2, you can specify up to five values in order of priority."
        }
      },
      "required": [
        "boostingLevel"
      ]
    },
    "StringListAttributeBoostingConfiguration": {
      "type": "object",
      "properties": {
        "boostingLevel": {
          "type": "string",
          "enum": [
            "NONE",
            "LOW",
            "MEDIUM",
            "HIGH",
            "VERY_HIGH",
            "ONE",
            "TWO"
          ],
          "description": "Specifies the priority of boosted document attributes in relation to other boosted attributes. This parameter determines how strongly the attribute influences document ranking in search results. STRING_LIST attributes can serve as additional boosting factors when needed, but are not supported when using NativeIndexConfiguration version 2."
        }
      },
      "required": [
        "boostingLevel"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q Business application or data source."
        },
        "value": {
          "type": "string",
          "description": "The value associated with the tag. The value may be an empty string but it can't be null."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}