{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fraud-detector/json-schema/amazon-fraud-detector-get-external-models-result-schema.json",
  "title": "GetExternalModelsResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fraud-detector-external-model-api-openapi.yml#/components/schemas/GetExternalModelsResult",
  "type": "object",
  "properties": {
    "externalModels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExternalModel"
      },
      "description": "Gets the Amazon SageMaker models."
    },
    "nextToken": {
      "type": "string",
      "description": "The next page token to be used in subsequent requests."
    }
  },
  "$defs": {
    "ExternalModel": {
      "type": "object",
      "properties": {
        "modelEndpoint": {
          "type": "string",
          "description": "The Amazon SageMaker model endpoints."
        },
        "modelSource": {
          "type": "string",
          "enum": [
            "SAGEMAKER"
          ],
          "description": "The source of the model."
        },
        "invokeModelEndpointRoleArn": {
          "type": "string",
          "description": "The role used to invoke the model."
        },
        "inputConfiguration": {
          "$ref": "#/$defs/ModelInputConfiguration"
        },
        "outputConfiguration": {
          "$ref": "#/$defs/ModelOutputConfiguration"
        },
        "modelEndpointStatus": {
          "type": "string",
          "enum": [
            "ASSOCIATED",
            "DISSOCIATED"
          ],
          "description": "The Amazon Fraud Detector status for the external model endpoint"
        },
        "lastUpdatedTime": {
          "type": "string",
          "description": "Timestamp of when the model was last updated."
        },
        "createdTime": {
          "type": "string",
          "description": "Timestamp of when the model was last created."
        },
        "arn": {
          "type": "string",
          "description": "The model ARN."
        }
      }
    },
    "ModelInputConfiguration": {
      "type": "object",
      "properties": {
        "eventTypeName": {
          "type": "string",
          "description": "The event type name."
        },
        "format": {
          "type": "string",
          "enum": [
            "TEXT_CSV",
            "APPLICATION_JSON"
          ],
          "description": "The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector."
        },
        "useEventVariables": {
          "type": "boolean",
          "description": "The event variables."
        },
        "jsonInputTemplate": {
          "type": "string",
          "description": "Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker."
        },
        "csvInputTemplate": {
          "type": "string",
          "description": "Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker."
        }
      },
      "required": [
        "useEventVariables"
      ]
    },
    "ModelOutputConfiguration": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "TEXT_CSV",
            "APPLICATION_JSONLINES"
          ],
          "description": "The format of the model output configuration."
        },
        "jsonKeyToVariableMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables."
        },
        "csvIndexToVariableMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables."
        }
      },
      "required": [
        "format"
      ]
    }
  }
}