{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-update-data-source-request-schema.json",
  "title": "UpdateDataSourceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-data-sources-api-openapi.yml#/components/schemas/UpdateDataSourceRequest",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the Amazon Q Business application the data source is attached to."
    },
    "indexId": {
      "type": "string",
      "description": "The identifier of the index attached to the data source connector."
    },
    "dataSourceId": {
      "type": "string",
      "description": "The identifier of the data source connector."
    },
    "displayName": {
      "type": "string",
      "description": "A name of the data source connector."
    },
    "configuration": {
      "type": "object"
    },
    "vpcConfiguration": {
      "$ref": "#/$defs/DataSourceVpcConfiguration"
    },
    "description": {
      "type": "string",
      "description": "The description of the data source connector."
    },
    "syncSchedule": {
      "type": "string",
      "description": "The chosen update frequency for your data source."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources."
    },
    "documentEnrichmentConfiguration": {
      "$ref": "#/$defs/DocumentEnrichmentConfiguration"
    },
    "mediaExtractionConfiguration": {
      "$ref": "#/$defs/MediaExtractionConfiguration"
    }
  },
  "required": [
    "applicationId",
    "indexId",
    "dataSourceId"
  ],
  "$defs": {
    "AudioExtractionConfiguration": {
      "type": "object",
      "properties": {
        "audioExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of audio extraction (ENABLED or DISABLED) for processing audio content from files."
        }
      },
      "required": [
        "audioExtractionStatus"
      ]
    },
    "DataSourceVpcConfiguration": {
      "type": "object",
      "properties": {
        "subnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device."
        },
        "securityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q Business to connect to the data source."
        }
      },
      "required": [
        "subnetIds",
        "securityGroupIds"
      ]
    },
    "DocumentAttributeCondition": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The identifier of the document attribute used for the condition. For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents. Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition."
        },
        "operator": {
          "type": "string",
          "enum": [
            "GREATER_THAN",
            "GREATER_THAN_OR_EQUALS",
            "LESS_THAN",
            "LESS_THAN_OR_EQUALS",
            "EQUALS",
            "NOT_EQUALS",
            "CONTAINS",
            "NOT_CONTAINS",
            "EXISTS",
            "NOT_EXISTS",
            "BEGINS_WITH"
          ],
          "description": "The identifier of the document attribute used for the condition. For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents. Amazon Q Business currently does not support _document_body as an attribute key used for the condition."
        },
        "value": {
          "$ref": "#/$defs/DocumentAttributeValue"
        }
      },
      "required": [
        "key",
        "operator"
      ]
    },
    "DocumentAttributeTarget": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents."
        },
        "value": {
          "$ref": "#/$defs/DocumentAttributeValue"
        },
        "attributeValueOperator": {
          "type": "string",
          "enum": [
            "DELETE"
          ],
          "description": "TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE."
        }
      },
      "required": [
        "key"
      ]
    },
    "DocumentAttributeValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "A string."
        },
        "stringListValue": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of strings."
        },
        "longValue": {
          "type": "integer",
          "description": "A long integer value."
        },
        "dateValue": {
          "type": "string",
          "format": "date-time",
          "description": "A date expressed as an ISO 8601 string. It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time."
        }
      },
      "description": "Exactly one member is set."
    },
    "DocumentEnrichmentConfiguration": {
      "type": "object",
      "properties": {
        "inlineConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InlineDocumentEnrichmentConfiguration"
          },
          "description": "Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business."
        },
        "preExtractionHookConfiguration": {
          "$ref": "#/$defs/HookConfiguration"
        },
        "postExtractionHookConfiguration": {
          "$ref": "#/$defs/HookConfiguration"
        }
      }
    },
    "HookConfiguration": {
      "type": "object",
      "properties": {
        "invocationCondition": {
          "$ref": "#/$defs/DocumentAttributeCondition"
        },
        "lambdaArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Lambda function during ingestion. For more information, see Using Lambda functions for Amazon Q Business document enrichment."
        },
        "s3BucketName": {
          "type": "string",
          "description": "Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions."
        },
        "roleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process."
        }
      }
    },
    "ImageExtractionConfiguration": {
      "type": "object",
      "properties": {
        "imageExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Specify whether to extract semantic meaning from images and visuals from documents."
        }
      },
      "required": [
        "imageExtractionStatus"
      ]
    },
    "InlineDocumentEnrichmentConfiguration": {
      "type": "object",
      "properties": {
        "condition": {
          "$ref": "#/$defs/DocumentAttributeCondition"
        },
        "target": {
          "$ref": "#/$defs/DocumentAttributeTarget"
        },
        "documentContentOperator": {
          "type": "string",
          "enum": [
            "DELETE"
          ],
          "description": "TRUE to delete content if the condition used for the target attribute is met."
        }
      }
    },
    "MediaExtractionConfiguration": {
      "type": "object",
      "properties": {
        "imageExtractionConfiguration": {
          "$ref": "#/$defs/ImageExtractionConfiguration"
        },
        "audioExtractionConfiguration": {
          "$ref": "#/$defs/AudioExtractionConfiguration"
        },
        "videoExtractionConfiguration": {
          "$ref": "#/$defs/VideoExtractionConfiguration"
        }
      }
    },
    "VideoExtractionConfiguration": {
      "type": "object",
      "properties": {
        "videoExtractionStatus": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The status of video extraction (ENABLED or DISABLED) for processing video content from files."
        }
      },
      "required": [
        "videoExtractionStatus"
      ]
    }
  }
}