{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-billing-and-cost-management/json-schema/amazon-billing-and-cost-management-create-dashboard-request-schema.json",
  "title": "CreateDashboardRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-dashboard-api-openapi.yml#/components/schemas/CreateDashboardRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the dashboard. The name must be unique within your account."
    },
    "description": {
      "type": "string",
      "description": "A description of the dashboard's purpose or contents."
    },
    "widgets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Widget"
      },
      "description": "An array of widget configurations that define the visualizations to be displayed in the dashboard. Each dashboard can contain up to 20 widgets."
    },
    "resourceTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BcmDashboardsResourceTag"
      },
      "description": "The tags to apply to the dashboard resource for organization and management."
    }
  },
  "required": [
    "name",
    "widgets"
  ],
  "$defs": {
    "BcmDashboardsCostCategoryValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the cost category to filter on."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values to match for the specified cost category key."
        },
        "matchOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "EQUALS",
              "ABSENT",
              "STARTS_WITH",
              "ENDS_WITH",
              "CONTAINS",
              "GREATER_THAN_OR_EQUAL",
              "CASE_SENSITIVE",
              "CASE_INSENSITIVE"
            ]
          },
          "description": "The match options for cost category values, such as EQUALS, CONTAINS, STARTS_WITH, or ENDS_WITH."
        }
      }
    },
    "BcmDashboardsDimensionValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "enum": [
            "AZ",
            "INSTANCE_TYPE",
            "LINKED_ACCOUNT",
            "OPERATION",
            "PURCHASE_TYPE",
            "REGION",
            "SERVICE",
            "USAGE_TYPE",
            "USAGE_TYPE_GROUP",
            "RECORD_TYPE",
            "RESOURCE_ID",
            "SUBSCRIPTION_ID",
            "TAG_KEY",
            "OPERATING_SYSTEM",
            "TENANCY",
            "BILLING_ENTITY",
            "RESERVATION_ID",
            "COST_CATEGORY_NAME",
            "DATABASE_ENGINE",
            "LEGAL_ENTITY_NAME",
            "SAVINGS_PLANS_TYPE",
            "INSTANCE_TYPE_FAMILY",
            "CACHE_ENGINE",
            "DEPLOYMENT_OPTION",
            "SCOPE",
            "PLATFORM"
          ],
          "description": "The key of the dimension to filter on (for example, SERVICE, USAGE_TYPE, or OPERATION)."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values to match for the specified dimension key."
        },
        "matchOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "EQUALS",
              "ABSENT",
              "STARTS_WITH",
              "ENDS_WITH",
              "CONTAINS",
              "GREATER_THAN_OR_EQUAL",
              "CASE_SENSITIVE",
              "CASE_INSENSITIVE"
            ]
          },
          "description": "The match options for dimension values, such as EQUALS, CONTAINS, STARTS_WITH, or ENDS_WITH."
        }
      },
      "required": [
        "key",
        "values"
      ]
    },
    "BcmDashboardsExpression": {
      "type": "object",
      "properties": {
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsExpression"
          },
          "description": "A list of expressions to combine with OR logic."
        },
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsExpression"
          },
          "description": "A list of expressions to combine with AND logic."
        },
        "not": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        },
        "dimensions": {
          "$ref": "#/$defs/BcmDashboardsDimensionValues"
        },
        "tags": {
          "$ref": "#/$defs/BcmDashboardsTagValues"
        },
        "costCategories": {
          "$ref": "#/$defs/BcmDashboardsCostCategoryValues"
        }
      }
    },
    "BcmDashboardsGroupDefinition": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key to use for grouping cost and usage data."
        },
        "type": {
          "type": "string",
          "enum": [
            "DIMENSION",
            "TAG",
            "COST_CATEGORY"
          ],
          "description": "The type of grouping to apply."
        }
      },
      "required": [
        "key"
      ]
    },
    "BcmDashboardsResourceTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the tag to be attached to the dashboard resource."
        },
        "value": {
          "type": "string",
          "description": "The value of the tag to be attached to the dashboard resource."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "BcmDashboardsTagValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the tag to filter on."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values to match for the specified tag key."
        },
        "matchOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "EQUALS",
              "ABSENT",
              "STARTS_WITH",
              "ENDS_WITH",
              "CONTAINS",
              "GREATER_THAN_OR_EQUAL",
              "CASE_SENSITIVE",
              "CASE_INSENSITIVE"
            ]
          },
          "description": "The match options for tag values, such as EQUALS, CONTAINS, STARTS_WITH, or ENDS_WITH."
        }
      }
    },
    "CostAndUsageQuery": {
      "type": "object",
      "properties": {
        "metrics": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "AmortizedCost",
              "BlendedCost",
              "NetAmortizedCost",
              "NetUnblendedCost",
              "NormalizedUsageAmount",
              "UnblendedCost",
              "UsageQuantity",
              "SpendCoveredBySavingsPlans",
              "Hour",
              "Unit",
              "Cost"
            ]
          },
          "description": "The specific cost and usage metrics to retrieve. Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity."
        },
        "timeRange": {
          "$ref": "#/$defs/DateTimeRange"
        },
        "granularity": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ],
          "description": "The granularity of the retrieved data: HOURLY, DAILY, or MONTHLY."
        },
        "groupBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsGroupDefinition"
          },
          "description": "Specifies how to group the retrieved data, such as by SERVICE, ACCOUNT, or TAG."
        },
        "filter": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        }
      },
      "required": [
        "metrics",
        "timeRange",
        "granularity"
      ]
    },
    "DateTimeRange": {
      "type": "object",
      "properties": {
        "startTime": {
          "$ref": "#/$defs/DateTimeValue"
        },
        "endTime": {
          "$ref": "#/$defs/DateTimeValue"
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    },
    "DateTimeValue": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ABSOLUTE",
            "RELATIVE"
          ],
          "description": "The type of date/time value: ABSOLUTE for specific dates or RELATIVE for dynamic time periods."
        },
        "value": {
          "type": "string",
          "description": "The actual date/time value."
        }
      },
      "required": [
        "type",
        "value"
      ]
    },
    "DisplayConfig": {
      "type": "object",
      "properties": {
        "graph": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/GraphDisplayConfig"
          },
          "description": "The configuration for graphical display of the widget data, including chart type and visual options."
        },
        "table": {
          "$ref": "#/$defs/TableDisplayConfigStruct"
        }
      },
      "description": "Exactly one member is set."
    },
    "GraphDisplayConfig": {
      "type": "object",
      "properties": {
        "visualType": {
          "type": "string",
          "enum": [
            "LINE",
            "BAR",
            "STACK"
          ],
          "description": "The type of visualization to use for the data."
        }
      },
      "required": [
        "visualType"
      ]
    },
    "QueryParameters": {
      "type": "object",
      "properties": {
        "costAndUsage": {
          "$ref": "#/$defs/CostAndUsageQuery"
        },
        "savingsPlansCoverage": {
          "$ref": "#/$defs/SavingsPlansCoverageQuery"
        },
        "savingsPlansUtilization": {
          "$ref": "#/$defs/SavingsPlansUtilizationQuery"
        },
        "reservationCoverage": {
          "$ref": "#/$defs/ReservationCoverageQuery"
        },
        "reservationUtilization": {
          "$ref": "#/$defs/ReservationUtilizationQuery"
        }
      },
      "description": "Exactly one member is set."
    },
    "ReservationCoverageQuery": {
      "type": "object",
      "properties": {
        "timeRange": {
          "$ref": "#/$defs/DateTimeRange"
        },
        "groupBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsGroupDefinition"
          },
          "description": "Specifies how to group the Reserved Instance coverage data, such as by service, Region, or instance type."
        },
        "granularity": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ],
          "description": "The time granularity of the retrieved data: HOURLY, DAILY, or MONTHLY."
        },
        "filter": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "AmortizedCost",
              "BlendedCost",
              "NetAmortizedCost",
              "NetUnblendedCost",
              "NormalizedUsageAmount",
              "UnblendedCost",
              "UsageQuantity",
              "SpendCoveredBySavingsPlans",
              "Hour",
              "Unit",
              "Cost"
            ]
          },
          "description": "The coverage metrics to include in the results. Valid values for ReservationCoverageQuery metrics are Hour, Unit, and Cost."
        }
      },
      "required": [
        "timeRange"
      ]
    },
    "ReservationUtilizationQuery": {
      "type": "object",
      "properties": {
        "timeRange": {
          "$ref": "#/$defs/DateTimeRange"
        },
        "groupBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsGroupDefinition"
          },
          "description": "Specifies how to group the Reserved Instance utilization data, such as by service, Region, or instance type."
        },
        "granularity": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ],
          "description": "The time granularity of the retrieved data: HOURLY, DAILY, or MONTHLY."
        },
        "filter": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        }
      },
      "required": [
        "timeRange"
      ]
    },
    "SavingsPlansCoverageQuery": {
      "type": "object",
      "properties": {
        "timeRange": {
          "$ref": "#/$defs/DateTimeRange"
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "AmortizedCost",
              "BlendedCost",
              "NetAmortizedCost",
              "NetUnblendedCost",
              "NormalizedUsageAmount",
              "UnblendedCost",
              "UsageQuantity",
              "SpendCoveredBySavingsPlans",
              "Hour",
              "Unit",
              "Cost"
            ]
          },
          "description": "The coverage metrics to include in the results. Valid value for SavingsPlansCoverageQuery metrics is SpendCoveredBySavingsPlans."
        },
        "granularity": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ],
          "description": "The time granularity of the retrieved data: HOURLY, DAILY, or MONTHLY."
        },
        "groupBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmDashboardsGroupDefinition"
          },
          "description": "Specifies how to group the Savings Plans coverage data, such as by service or instance family."
        },
        "filter": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        }
      },
      "required": [
        "timeRange"
      ]
    },
    "SavingsPlansUtilizationQuery": {
      "type": "object",
      "properties": {
        "timeRange": {
          "$ref": "#/$defs/DateTimeRange"
        },
        "granularity": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "MONTHLY"
          ],
          "description": "The time granularity of the retrieved data: HOURLY, DAILY, or MONTHLY."
        },
        "filter": {
          "$ref": "#/$defs/BcmDashboardsExpression"
        }
      },
      "required": [
        "timeRange"
      ]
    },
    "TableDisplayConfigStruct": {
      "type": "object",
      "properties": {}
    },
    "Widget": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for the widget."
        },
        "title": {
          "type": "string",
          "description": "The title of the widget."
        },
        "description": {
          "type": "string",
          "description": "A description of the widget's purpose or the data it displays."
        },
        "width": {
          "type": "integer",
          "description": "The width of the widget in column spans. The dashboard layout consists of a grid system."
        },
        "height": {
          "type": "integer",
          "description": "The height of the widget in row spans. The dashboard layout consists of a grid system."
        },
        "horizontalOffset": {
          "type": "integer",
          "description": "Specifies the starting column position of the widget in the dashboard's grid layout. Used to control widget placement."
        },
        "configs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WidgetConfig"
          },
          "description": "An array of configurations that define the data queries and display settings for the widget."
        }
      },
      "required": [
        "title",
        "configs"
      ]
    },
    "WidgetConfig": {
      "type": "object",
      "properties": {
        "queryParameters": {
          "$ref": "#/$defs/QueryParameters"
        },
        "displayConfig": {
          "$ref": "#/$defs/DisplayConfig"
        }
      },
      "required": [
        "queryParameters",
        "displayConfig"
      ]
    }
  }
}