{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-get-data-source-response-schema.json",
  "title": "GetDataSourceResponse",
  "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/GetDataSourceResponse",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the Amazon Q Business application."
    },
    "indexId": {
      "type": "string",
      "description": "The identifier of the index linked to the data source connector."
    },
    "dataSourceId": {
      "type": "string",
      "description": "The identifier of the data source connector."
    },
    "dataSourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the data source."
    },
    "displayName": {
      "type": "string",
      "description": "The name for the data source connector."
    },
    "type": {
      "type": "string",
      "description": "The type of the data source connector. For example, S3."
    },
    "configuration": {
      "type": "object",
      "description": "The details of how the data source connector is configured."
    },
    "vpcConfiguration": {
      "$ref": "#/$defs/DataSourceVpcConfiguration"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The Unix timestamp when the data source connector was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The Unix timestamp when the data source connector was last updated."
    },
    "description": {
      "type": "string",
      "description": "The description for the data source connector."
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING_CREATION",
        "CREATING",
        "ACTIVE",
        "DELETING",
        "FAILED",
        "UPDATING"
      ],
      "description": "The current status of the data source connector. When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail."
    },
    "syncSchedule": {
      "type": "string",
      "description": "The schedule for Amazon Q Business to update the index."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the role with permission to access the data source and required resources."
    },
    "error": {
      "$ref": "#/$defs/ErrorDetail"
    },
    "documentEnrichmentConfiguration": {
      "$ref": "#/$defs/DocumentEnrichmentConfiguration"
    },
    "mediaExtractionConfiguration": {
      "$ref": "#/$defs/MediaExtractionConfiguration"
    }
  },
  "$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"
        }
      }
    },
    "ErrorDetail": {
      "type": "object",
      "properties": {
        "errorMessage": {
          "type": "string",
          "description": "The message explaining the Amazon Q Business request error."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "InternalError",
            "InvalidRequest",
            "ResourceInactive",
            "ResourceNotFound"
          ],
          "description": "The code associated with the Amazon Q Business request error."
        }
      }
    },
    "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"
      ]
    }
  }
}