{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datazone/json-schema/amazon-datazone-create-data-source-input-schema.json",
  "title": "CreateDataSourceInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-datazone-data-sources-api-openapi.yml#/components/schemas/CreateDataSourceInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the data source."
    },
    "description": {
      "type": "string",
      "description": "The description of the data source."
    },
    "domainIdentifier": {
      "type": "string",
      "description": "The ID of the Amazon DataZone domain where the data source is created."
    },
    "projectIdentifier": {
      "type": "string",
      "description": "The identifier of the Amazon DataZone project in which you want to add this data source."
    },
    "environmentIdentifier": {
      "type": "string",
      "description": "The unique identifier of the Amazon DataZone environment to which the data source publishes assets."
    },
    "connectionIdentifier": {
      "type": "string",
      "description": "The ID of the connection."
    },
    "type": {
      "type": "string",
      "description": "The type of the data source. In Amazon DataZone, you can use data sources to import technical metadata of assets (data) from the source databases or data warehouses into Amazon DataZone. In the current release of Amazon DataZone, you can create and run data sources for Amazon Web Services Glue and Amazon Redshift."
    },
    "configuration": {
      "$ref": "#/$defs/DataSourceConfigurationInput"
    },
    "recommendation": {
      "$ref": "#/$defs/RecommendationConfiguration"
    },
    "enableSetting": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "Specifies whether the data source is enabled."
    },
    "schedule": {
      "$ref": "#/$defs/ScheduleConfiguration"
    },
    "publishOnImport": {
      "type": "boolean",
      "description": "Specifies whether the assets that this data source creates in the inventory are to be also automatically published to the catalog."
    },
    "assetFormsInput": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FormInput"
      },
      "description": "The metadata forms that are to be attached to the assets that this data source works with."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that is provided to ensure the idempotency of the request."
    }
  },
  "required": [
    "name",
    "domainIdentifier",
    "projectIdentifier",
    "type"
  ],
  "$defs": {
    "DataSourceConfigurationInput": {
      "type": "object",
      "properties": {
        "glueRunConfiguration": {
          "$ref": "#/$defs/GlueRunConfigurationInput"
        },
        "redshiftRunConfiguration": {
          "$ref": "#/$defs/RedshiftRunConfigurationInput"
        },
        "sageMakerRunConfiguration": {
          "$ref": "#/$defs/SageMakerRunConfigurationInput"
        }
      },
      "description": "Exactly one member is set."
    },
    "FilterExpression": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "INCLUDE",
            "EXCLUDE"
          ],
          "description": "The search filter explresison type."
        },
        "expression": {
          "type": "string",
          "description": "The search filter expression."
        }
      },
      "required": [
        "type",
        "expression"
      ]
    },
    "FormInput": {
      "type": "object",
      "properties": {
        "formName": {
          "type": "string",
          "description": "The name of the metadata form."
        },
        "typeIdentifier": {
          "type": "string",
          "description": "The ID of the metadata form type."
        },
        "typeRevision": {
          "type": "string",
          "description": "The revision of the metadata form type."
        },
        "content": {
          "type": "string",
          "description": "The content of the metadata form."
        }
      },
      "required": [
        "formName"
      ]
    },
    "GlueRunConfigurationInput": {
      "type": "object",
      "properties": {
        "dataAccessRole": {
          "type": "string",
          "description": "The data access role included in the configuration details of the Amazon Web Services Glue data source."
        },
        "relationalFilterConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RelationalFilterConfiguration"
          },
          "description": "The relational filter configurations included in the configuration details of the Amazon Web Services Glue data source."
        },
        "autoImportDataQualityResult": {
          "type": "boolean",
          "description": "Specifies whether to automatically import data quality metrics as part of the data source run."
        },
        "catalogName": {
          "type": "string",
          "description": "The catalog name in the Amazon Web Services Glue run configuration."
        }
      },
      "required": [
        "relationalFilterConfigurations"
      ]
    },
    "RecommendationConfiguration": {
      "type": "object",
      "properties": {
        "enableBusinessNameGeneration": {
          "type": "boolean",
          "description": "Specifies whether automatic business name generation is to be enabled or not as part of the recommendation configuration."
        }
      }
    },
    "RedshiftClusterStorage": {
      "type": "object",
      "properties": {
        "clusterName": {
          "type": "string",
          "description": "The name of an Amazon Redshift cluster."
        }
      },
      "required": [
        "clusterName"
      ]
    },
    "RedshiftCredentialConfiguration": {
      "type": "object",
      "properties": {
        "secretManagerArn": {
          "type": "string",
          "description": "The ARN of a secret manager for an Amazon Redshift cluster."
        }
      },
      "required": [
        "secretManagerArn"
      ]
    },
    "RedshiftRunConfigurationInput": {
      "type": "object",
      "properties": {
        "dataAccessRole": {
          "type": "string",
          "description": "The data access role included in the configuration details of the Amazon Redshift data source."
        },
        "relationalFilterConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RelationalFilterConfiguration"
          },
          "description": "The relational filger configurations included in the configuration details of the Amazon Redshift data source."
        },
        "redshiftCredentialConfiguration": {
          "$ref": "#/$defs/RedshiftCredentialConfiguration"
        },
        "redshiftStorage": {
          "$ref": "#/$defs/RedshiftStorage"
        }
      },
      "required": [
        "relationalFilterConfigurations"
      ]
    },
    "RedshiftServerlessStorage": {
      "type": "object",
      "properties": {
        "workgroupName": {
          "type": "string",
          "description": "The name of the Amazon Redshift Serverless workgroup."
        }
      },
      "required": [
        "workgroupName"
      ]
    },
    "RedshiftStorage": {
      "type": "object",
      "properties": {
        "redshiftClusterSource": {
          "$ref": "#/$defs/RedshiftClusterStorage"
        },
        "redshiftServerlessSource": {
          "$ref": "#/$defs/RedshiftServerlessStorage"
        }
      },
      "description": "Exactly one member is set."
    },
    "RelationalFilterConfiguration": {
      "type": "object",
      "properties": {
        "databaseName": {
          "type": "string",
          "description": "The database name specified in the relational filter configuration for the data source."
        },
        "schemaName": {
          "type": "string",
          "description": "The schema name specified in the relational filter configuration for the data source."
        },
        "filterExpressions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FilterExpression"
          },
          "description": "The filter expressions specified in the relational filter configuration for the data source."
        }
      },
      "required": [
        "databaseName"
      ]
    },
    "SageMakerRunConfigurationInput": {
      "type": "object",
      "properties": {
        "trackingAssets": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "The tracking assets of the Amazon SageMaker run."
        }
      },
      "required": [
        "trackingAssets"
      ]
    },
    "ScheduleConfiguration": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "enum": [
            "UTC",
            "AFRICA_JOHANNESBURG",
            "AMERICA_MONTREAL",
            "AMERICA_SAO_PAULO",
            "ASIA_BAHRAIN",
            "ASIA_BANGKOK",
            "ASIA_CALCUTTA",
            "ASIA_DUBAI",
            "ASIA_HONG_KONG",
            "ASIA_JAKARTA",
            "ASIA_KUALA_LUMPUR",
            "ASIA_SEOUL",
            "ASIA_SHANGHAI",
            "ASIA_SINGAPORE",
            "ASIA_TAIPEI",
            "ASIA_TOKYO",
            "AUSTRALIA_MELBOURNE",
            "AUSTRALIA_SYDNEY",
            "CANADA_CENTRAL",
            "CET",
            "CST6CDT",
            "ETC_GMT",
            "ETC_GMT0",
            "ETC_GMT_ADD_0",
            "ETC_GMT_ADD_1",
            "ETC_GMT_ADD_10",
            "ETC_GMT_ADD_11",
            "ETC_GMT_ADD_12",
            "ETC_GMT_ADD_2",
            "ETC_GMT_ADD_3",
            "ETC_GMT_ADD_4",
            "ETC_GMT_ADD_5",
            "ETC_GMT_ADD_6",
            "ETC_GMT_ADD_7",
            "ETC_GMT_ADD_8",
            "ETC_GMT_ADD_9",
            "ETC_GMT_NEG_0",
            "ETC_GMT_NEG_1",
            "ETC_GMT_NEG_10",
            "ETC_GMT_NEG_11",
            "ETC_GMT_NEG_12",
            "ETC_GMT_NEG_13",
            "ETC_GMT_NEG_14",
            "ETC_GMT_NEG_2",
            "ETC_GMT_NEG_3",
            "ETC_GMT_NEG_4",
            "ETC_GMT_NEG_5",
            "ETC_GMT_NEG_6",
            "ETC_GMT_NEG_7",
            "ETC_GMT_NEG_8",
            "ETC_GMT_NEG_9",
            "EUROPE_DUBLIN",
            "EUROPE_LONDON",
            "EUROPE_PARIS",
            "EUROPE_STOCKHOLM",
            "EUROPE_ZURICH",
            "ISRAEL",
            "MEXICO_GENERAL",
            "MST7MDT",
            "PACIFIC_AUCKLAND",
            "US_CENTRAL",
            "US_EASTERN",
            "US_MOUNTAIN",
            "US_PACIFIC"
          ],
          "description": "The timezone of the data source run."
        },
        "schedule": {
          "type": "string",
          "description": "The schedule of the data source runs."
        }
      }
    }
  }
}