{
 "additionalProperties": false,
 "definitions": {
  "CostAndUsageExpression": {
   "additionalProperties": false,
   "properties": {
    "And": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/CostAndUsageExpression"
     },
     "type": "array"
    },
    "CostCategories": {
     "$ref": "#/definitions/CostCategoryValues"
    },
    "Dimensions": {
     "$ref": "#/definitions/DimensionValues"
    },
    "Not": {
     "$ref": "#/definitions/CostAndUsageExpression"
    },
    "Or": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/CostAndUsageExpression"
     },
     "type": "array"
    },
    "Tags": {
     "$ref": "#/definitions/TagValues"
    }
   },
   "type": "object"
  },
  "CostAndUsageQuery": {
   "additionalProperties": false,
   "properties": {
    "Filter": {
     "$ref": "#/definitions/CostAndUsageExpression"
    },
    "Granularity": {
     "$ref": "#/definitions/Granularity"
    },
    "GroupBy": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/GroupDefinition"
     },
     "type": "array"
    },
    "Metrics": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MetricName"
     },
     "type": "array"
    },
    "TimeRange": {
     "$ref": "#/definitions/DateTimeRange"
    }
   },
   "required": [
    "Metrics",
    "TimeRange",
    "Granularity"
   ],
   "type": "object"
  },
  "CostCategoryValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "MatchOptions": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MatchOption"
     },
     "type": "array"
    },
    "Values": {
     "insertionOrder": true,
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "Key",
    "Values"
   ],
   "type": "object"
  },
  "DashboardType": {
   "enum": [
    "CUSTOM"
   ],
   "type": "string"
  },
  "DateTimeRange": {
   "additionalProperties": false,
   "properties": {
    "EndTime": {
     "$ref": "#/definitions/DateTimeValue"
    },
    "StartTime": {
     "$ref": "#/definitions/DateTimeValue"
    }
   },
   "required": [
    "StartTime",
    "EndTime"
   ],
   "type": "object"
  },
  "DateTimeType": {
   "enum": [
    "ABSOLUTE",
    "RELATIVE"
   ],
   "type": "string"
  },
  "DateTimeValue": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "$ref": "#/definitions/DateTimeType"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Type",
    "Value"
   ],
   "type": "object"
  },
  "Dimension": {
   "enum": [
    "AZ",
    "INSTANCE_TYPE",
    "LINKED_ACCOUNT",
    "OPERATION",
    "PURCHASE_TYPE",
    "REGION",
    "SERVICE",
    "USAGE_TYPE",
    "USAGE_TYPE_GROUP",
    "RECORD_TYPE",
    "OPERATING_SYSTEM",
    "TENANCY",
    "SCOPE",
    "PLATFORM",
    "SUBSCRIPTION_ID",
    "LEGAL_ENTITY_NAME",
    "DEPLOYMENT_OPTION",
    "DATABASE_ENGINE",
    "CACHE_ENGINE",
    "INSTANCE_TYPE_FAMILY",
    "BILLING_ENTITY",
    "RESERVATION_ID",
    "RESOURCE_ID",
    "SAVINGS_PLANS_TYPE",
    "TAG_KEY",
    "COST_CATEGORY_NAME"
   ],
   "type": "string"
  },
  "DimensionValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "$ref": "#/definitions/Dimension"
    },
    "MatchOptions": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MatchOption"
     },
     "type": "array"
    },
    "Values": {
     "insertionOrder": true,
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "Key",
    "Values"
   ],
   "type": "object"
  },
  "DisplayConfig": {
   "additionalProperties": false,
   "properties": {
    "Graph": {
     "$ref": "#/definitions/GraphDisplayConfigMap"
    },
    "Table": {
     "$ref": "#/definitions/TableDisplayConfigStruct"
    }
   },
   "type": "object"
  },
  "Expression": {
   "additionalProperties": false,
   "properties": {
    "And": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/Expression"
     },
     "type": "array"
    },
    "CostCategories": {
     "$ref": "#/definitions/CostCategoryValues"
    },
    "Dimensions": {
     "$ref": "#/definitions/DimensionValues"
    },
    "Not": {
     "$ref": "#/definitions/Expression"
    },
    "Tags": {
     "$ref": "#/definitions/TagValues"
    }
   },
   "type": "object"
  },
  "Granularity": {
   "enum": [
    "HOURLY",
    "DAILY",
    "MONTHLY"
   ],
   "type": "string"
  },
  "GraphDisplayConfig": {
   "additionalProperties": false,
   "properties": {
    "VisualType": {
     "$ref": "#/definitions/VisualType"
    }
   },
   "required": [
    "VisualType"
   ],
   "type": "object"
  },
  "GraphDisplayConfigMap": {
   "additionalProperties": false,
   "patternProperties": {
    "^.+$": {
     "$ref": "#/definitions/GraphDisplayConfig"
    }
   },
   "type": "object"
  },
  "GroupDefinition": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 1024,
     "minLength": 1,
     "pattern": "^[\\S\\s]*$",
     "type": "string"
    },
    "Type": {
     "$ref": "#/definitions/GroupDefinitionType"
    }
   },
   "required": [
    "Key"
   ],
   "type": "object"
  },
  "GroupDefinitionType": {
   "enum": [
    "DIMENSION",
    "TAG",
    "COST_CATEGORY"
   ],
   "type": "string"
  },
  "MatchOption": {
   "enum": [
    "EQUALS",
    "ABSENT",
    "STARTS_WITH",
    "ENDS_WITH",
    "CONTAINS",
    "GREATER_THAN_OR_EQUAL",
    "CASE_SENSITIVE",
    "CASE_INSENSITIVE"
   ],
   "type": "string"
  },
  "MetricName": {
   "enum": [
    "AmortizedCost",
    "BlendedCost",
    "NetAmortizedCost",
    "NetUnblendedCost",
    "NormalizedUsageAmount",
    "UnblendedCost",
    "UsageQuantity",
    "SpendCoveredBySavingsPlans",
    "Hour",
    "Unit",
    "Cost"
   ],
   "type": "string"
  },
  "QueryParameters": {
   "additionalProperties": false,
   "properties": {
    "CostAndUsage": {
     "$ref": "#/definitions/CostAndUsageQuery"
    },
    "ReservationCoverage": {
     "$ref": "#/definitions/ReservationCoverageQuery"
    },
    "ReservationUtilization": {
     "$ref": "#/definitions/ReservationUtilizationQuery"
    },
    "SavingsPlansCoverage": {
     "$ref": "#/definitions/SavingsPlansCoverageQuery"
    },
    "SavingsPlansUtilization": {
     "$ref": "#/definitions/SavingsPlansUtilizationQuery"
    }
   },
   "type": "object"
  },
  "ReservationCoverageQuery": {
   "additionalProperties": false,
   "properties": {
    "Filter": {
     "$ref": "#/definitions/Expression"
    },
    "Granularity": {
     "$ref": "#/definitions/Granularity"
    },
    "GroupBy": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/GroupDefinition"
     },
     "type": "array"
    },
    "Metrics": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MetricName"
     },
     "type": "array"
    },
    "TimeRange": {
     "$ref": "#/definitions/DateTimeRange"
    }
   },
   "required": [
    "TimeRange"
   ],
   "type": "object"
  },
  "ReservationUtilizationQuery": {
   "additionalProperties": false,
   "properties": {
    "Filter": {
     "$ref": "#/definitions/Expression"
    },
    "Granularity": {
     "$ref": "#/definitions/Granularity"
    },
    "GroupBy": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/GroupDefinition"
     },
     "type": "array"
    },
    "TimeRange": {
     "$ref": "#/definitions/DateTimeRange"
    }
   },
   "required": [
    "TimeRange"
   ],
   "type": "object"
  },
  "SavingsPlansCoverageQuery": {
   "additionalProperties": false,
   "properties": {
    "Filter": {
     "$ref": "#/definitions/Expression"
    },
    "Granularity": {
     "$ref": "#/definitions/Granularity"
    },
    "GroupBy": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/GroupDefinition"
     },
     "type": "array"
    },
    "Metrics": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MetricName"
     },
     "type": "array"
    },
    "TimeRange": {
     "$ref": "#/definitions/DateTimeRange"
    }
   },
   "required": [
    "TimeRange"
   ],
   "type": "object"
  },
  "SavingsPlansUtilizationQuery": {
   "additionalProperties": false,
   "properties": {
    "Filter": {
     "$ref": "#/definitions/Expression"
    },
    "Granularity": {
     "$ref": "#/definitions/Granularity"
    },
    "TimeRange": {
     "$ref": "#/definitions/DateTimeRange"
    }
   },
   "required": [
    "TimeRange"
   ],
   "type": "object"
  },
  "TableDisplayConfigStruct": {
   "additionalProperties": false,
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "TagValues": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "MatchOptions": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/MatchOption"
     },
     "type": "array"
    },
    "Values": {
     "insertionOrder": true,
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "Key",
    "Values"
   ],
   "type": "object"
  },
  "VisualType": {
   "enum": [
    "LINE",
    "BAR",
    "STACK"
   ],
   "type": "string"
  },
  "Widget": {
   "additionalProperties": false,
   "properties": {
    "Configs": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/WidgetConfig"
     },
     "maxItems": 2,
     "minItems": 1,
     "type": "array"
    },
    "Description": {
     "maxLength": 200,
     "minLength": 1,
     "pattern": "^(?!.* {2})[ a-zA-Z0-9.,!?;:@#$%&\\-_/\\\\]*$",
     "type": "string"
    },
    "Height": {
     "maximum": 10,
     "minimum": 4,
     "type": "integer"
    },
    "HorizontalOffset": {
     "type": "integer"
    },
    "Title": {
     "maxLength": 50,
     "minLength": 2,
     "pattern": "^(?!.* {2})[a-zA-Z0-9_-][ a-zA-Z0-9_-]*[a-zA-Z0-9_-]$",
     "type": "string"
    },
    "Width": {
     "maximum": 6,
     "minimum": 2,
     "type": "integer"
    }
   },
   "required": [
    "Title",
    "Configs"
   ],
   "type": "object"
  },
  "WidgetConfig": {
   "additionalProperties": false,
   "properties": {
    "DisplayConfig": {
     "$ref": "#/definitions/DisplayConfig"
    },
    "QueryParameters": {
     "$ref": "#/definitions/QueryParameters"
    }
   },
   "required": [
    "QueryParameters",
    "DisplayConfig"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "Arn": {
   "maxLength": 2048,
   "minLength": 20,
   "pattern": "^arn:aws[-a-z0-9]*:bcm-dashboards::[0-9]{12}:dashboard/(\\*|[-a-z0-9]+)$",
   "type": "string"
  },
  "CreatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "Description": {
   "maxLength": 200,
   "minLength": 1,
   "pattern": "^(?!.* {2})[ a-zA-Z0-9.,!?;:@#$%&\\-_/\\\\]*$",
   "type": "string"
  },
  "Name": {
   "maxLength": 50,
   "minLength": 2,
   "pattern": "^(?!.* {2})[a-zA-Z][a-zA-Z0-9 _-]{0,48}[a-zA-Z0-9_-]$",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 200,
   "type": "array"
  },
  "Type": {
   "$ref": "#/definitions/DashboardType"
  },
  "UpdatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "Widgets": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/Widget"
   },
   "maxItems": 20,
   "minItems": 0,
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/Arn",
  "/properties/Type",
  "/properties/CreatedAt",
  "/properties/UpdatedAt"
 ],
 "required": [
  "Name",
  "Widgets"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::BCM::Dashboard"
}
