{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-forecast/json-schema/amazon-forecast-create-explainability-request-schema.json",
  "title": "CreateExplainabilityRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-forecast-explainability-api-openapi.yml#/components/schemas/CreateExplainabilityRequest",
  "type": "object",
  "properties": {
    "ExplainabilityName": {
      "type": "string",
      "description": "A unique name for the Explainability."
    },
    "ResourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Predictor or Forecast used to create the Explainability."
    },
    "ExplainabilityConfig": {
      "$ref": "#/$defs/ExplainabilityConfig"
    },
    "DataSource": {
      "$ref": "#/$defs/DataSource"
    },
    "Schema": {
      "$ref": "#/$defs/Schema"
    },
    "EnableVisualization": {
      "type": "boolean",
      "description": "Create an Explainability visualization that is viewable within the Amazon Web Services console."
    },
    "StartDateTime": {
      "type": "string",
      "description": "If TimePointGranularity is set to SPECIFIC, define the first point for the Explainability. Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)"
    },
    "EndDateTime": {
      "type": "string",
      "description": "If TimePointGranularity is set to SPECIFIC, define the last time point for the Explainability. Use the following timestamp format: yyyy-MM-ddTHH:mm:ss (example: 2015-01-01T20:00:00)"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive. The following restrictions apply to tags: For each resource, each tag key must be unique and each tag key must have one value. Maximum number of tags per resource: 50. Maximum key length: 128 Unicode characters in UTF-8. Maximum value length: 256 Unicode characters in UTF-8. Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across ot"
    }
  },
  "required": [
    "ExplainabilityName",
    "ResourceArn",
    "ExplainabilityConfig"
  ],
  "$defs": {
    "DataSource": {
      "type": "object",
      "properties": {
        "S3Config": {
          "$ref": "#/$defs/S3Config"
        }
      },
      "required": [
        "S3Config"
      ]
    },
    "ExplainabilityConfig": {
      "type": "object",
      "properties": {
        "TimeSeriesGranularity": {
          "type": "string",
          "enum": [
            "ALL",
            "SPECIFIC"
          ],
          "description": "To create an Explainability for all time series in your datasets, use ALL. To create an Explainability for specific time series in your datasets, use SPECIFIC. Specify time series by uploading a CSV or Parquet file to an Amazon S3 bucket and set the location within the DataDestination data type."
        },
        "TimePointGranularity": {
          "type": "string",
          "enum": [
            "ALL",
            "SPECIFIC"
          ],
          "description": "To create an Explainability for all time points in your forecast horizon, use ALL. To create an Explainability for specific time points in your forecast horizon, use SPECIFIC. Specify time points with the StartDateTime and EndDateTime parameters within the CreateExplainability operation."
        }
      },
      "required": [
        "TimeSeriesGranularity",
        "TimePointGranularity"
      ]
    },
    "S3Config": {
      "type": "object",
      "properties": {
        "Path": {
          "type": "string",
          "description": "The path to an Amazon Simple Storage Service (Amazon S3) bucket or file(s) in an Amazon S3 bucket."
        },
        "RoleArn": {
          "type": "string",
          "description": "The ARN of the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket or files. If you provide a value for the KMSKeyArn key, the role must allow access to the key. Passing a role across Amazon Web Services accounts is not allowed. If you pass a role that isn't in your account, you get an InvalidInputException error."
        },
        "KMSKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an Key Management Service (KMS) key."
        }
      },
      "required": [
        "Path",
        "RoleArn"
      ]
    },
    "Schema": {
      "type": "object",
      "properties": {
        "Attributes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SchemaAttribute"
          },
          "description": "An array of attributes specifying the name and type of each field in a dataset."
        }
      }
    },
    "SchemaAttribute": {
      "type": "object",
      "properties": {
        "AttributeName": {
          "type": "string",
          "description": "The name of the dataset field."
        },
        "AttributeType": {
          "type": "string",
          "enum": [
            "string",
            "integer",
            "float",
            "timestamp",
            "geolocation"
          ],
          "description": "The data type of the field. For a related time series dataset, other than date, item_id, and forecast dimensions attributes, all attributes should be of numerical type (integer/float)."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "Value": {
          "type": "string",
          "description": "The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key)."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}