{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datazone/json-schema/amazon-datazone-delete-data-source-output-schema.json",
  "title": "DeleteDataSourceOutput",
  "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/DeleteDataSourceOutput",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the data source that is deleted."
    },
    "status": {
      "type": "string",
      "enum": [
        "CREATING",
        "FAILED_CREATION",
        "READY",
        "UPDATING",
        "FAILED_UPDATE",
        "RUNNING",
        "DELETING",
        "FAILED_DELETION"
      ],
      "description": "The status of this data source."
    },
    "type": {
      "type": "string",
      "description": "The type of this data source."
    },
    "name": {
      "type": "string",
      "description": "The name of the data source that is deleted."
    },
    "description": {
      "type": "string",
      "description": "The description of the data source that is deleted."
    },
    "domainId": {
      "type": "string",
      "description": "The ID of the Amazon DataZone domain in which the data source is deleted."
    },
    "projectId": {
      "type": "string",
      "description": "The ID of the project in which this data source exists and from which it's deleted."
    },
    "environmentId": {
      "type": "string",
      "description": "The ID of the environemnt associated with this data source."
    },
    "connectionId": {
      "type": "string",
      "description": "The ID of the connection that is deleted."
    },
    "configuration": {
      "$ref": "#/$defs/DataSourceConfigurationOutput"
    },
    "enableSetting": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "The enable setting of the data source that specifies whether the data source is enabled or disabled."
    },
    "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."
    },
    "assetFormsOutput": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FormOutput"
      },
      "description": "The asset data forms associated with this data source."
    },
    "schedule": {
      "$ref": "#/$defs/ScheduleConfiguration"
    },
    "lastRunStatus": {
      "type": "string",
      "enum": [
        "REQUESTED",
        "RUNNING",
        "FAILED",
        "PARTIALLY_SUCCEEDED",
        "SUCCESS"
      ],
      "description": "The status of the last run of this data source."
    },
    "lastRunAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when the data source was last run."
    },
    "lastRunErrorMessage": {
      "$ref": "#/$defs/DataSourceErrorMessage"
    },
    "errorMessage": {
      "$ref": "#/$defs/DataSourceErrorMessage"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when this data source was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when this data source was updated."
    },
    "selfGrantStatus": {
      "$ref": "#/$defs/SelfGrantStatusOutput"
    },
    "retainPermissionsOnRevokeFailure": {
      "type": "boolean",
      "description": "Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source."
    }
  },
  "required": [
    "id",
    "name",
    "domainId",
    "projectId"
  ],
  "$defs": {
    "DataSourceConfigurationOutput": {
      "type": "object",
      "properties": {
        "glueRunConfiguration": {
          "$ref": "#/$defs/GlueRunConfigurationOutput"
        },
        "redshiftRunConfiguration": {
          "$ref": "#/$defs/RedshiftRunConfigurationOutput"
        },
        "sageMakerRunConfiguration": {
          "$ref": "#/$defs/SageMakerRunConfigurationOutput"
        }
      },
      "description": "Exactly one member is set."
    },
    "DataSourceErrorMessage": {
      "type": "object",
      "properties": {
        "errorType": {
          "type": "string",
          "enum": [
            "ACCESS_DENIED_EXCEPTION",
            "CONFLICT_EXCEPTION",
            "INTERNAL_SERVER_EXCEPTION",
            "RESOURCE_NOT_FOUND_EXCEPTION",
            "SERVICE_QUOTA_EXCEEDED_EXCEPTION",
            "THROTTLING_EXCEPTION",
            "VALIDATION_EXCEPTION"
          ],
          "description": "The type of the error message that is returned if the operation cannot be successfully completed."
        },
        "errorDetail": {
          "type": "string",
          "description": "The details of the error message that is returned if the operation cannot be successfully completed."
        }
      },
      "required": [
        "errorType"
      ]
    },
    "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"
      ]
    },
    "FormOutput": {
      "type": "object",
      "properties": {
        "formName": {
          "type": "string",
          "description": "The name of the metadata form."
        },
        "typeName": {
          "type": "string",
          "description": "The name 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"
      ]
    },
    "GlueRunConfigurationOutput": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID included in the configuration details of the Amazon Web Services Glue data source."
        },
        "region": {
          "type": "string",
          "description": "The Amazon Web Services region included in the configuration details of the Amazon Web Services Glue data source."
        },
        "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"
      ]
    },
    "GlueSelfGrantStatusOutput": {
      "type": "object",
      "properties": {
        "selfGrantStatusDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SelfGrantStatusDetail"
          },
          "description": "The details for the self granting status for a Glue data source."
        }
      },
      "required": [
        "selfGrantStatusDetails"
      ]
    },
    "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"
      ]
    },
    "RedshiftRunConfigurationOutput": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The ID of the Amazon Web Services account included in the configuration details of the Amazon Redshift data source."
        },
        "region": {
          "type": "string",
          "description": "The Amazon Web Services region included in the configuration details of the Amazon Redshift data source."
        },
        "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",
        "redshiftStorage"
      ]
    },
    "RedshiftSelfGrantStatusOutput": {
      "type": "object",
      "properties": {
        "selfGrantStatusDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SelfGrantStatusDetail"
          },
          "description": "The details for the self granting status for an Amazon Redshift data source."
        }
      },
      "required": [
        "selfGrantStatusDetails"
      ]
    },
    "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"
      ]
    },
    "SageMakerRunConfigurationOutput": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The Amazon SageMaker account ID."
        },
        "region": {
          "type": "string",
          "description": "The Amazon SageMaker Region."
        },
        "trackingAssets": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "The tracking assets of the Amazon SageMaker."
        }
      },
      "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."
        }
      }
    },
    "SelfGrantStatusDetail": {
      "type": "object",
      "properties": {
        "databaseName": {
          "type": "string",
          "description": "The name of the database used for the data source."
        },
        "schemaName": {
          "type": "string",
          "description": "The name of the schema used in the data source."
        },
        "status": {
          "type": "string",
          "enum": [
            "GRANT_PENDING",
            "REVOKE_PENDING",
            "GRANT_IN_PROGRESS",
            "REVOKE_IN_PROGRESS",
            "GRANTED",
            "GRANT_FAILED",
            "REVOKE_FAILED"
          ],
          "description": "The self granting status of the data source."
        },
        "failureCause": {
          "type": "string",
          "description": "The reason for why the operation failed."
        }
      },
      "required": [
        "databaseName",
        "status"
      ]
    },
    "SelfGrantStatusOutput": {
      "type": "object",
      "properties": {
        "glueSelfGrantStatus": {
          "$ref": "#/$defs/GlueSelfGrantStatusOutput"
        },
        "redshiftSelfGrantStatus": {
          "$ref": "#/$defs/RedshiftSelfGrantStatusOutput"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}