{
  "$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-billing-view-request-schema.json",
  "title": "CreateBillingViewRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-billing-view-api-openapi.yml#/components/schemas/CreateBillingViewRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the billing view."
    },
    "description": {
      "type": "string",
      "description": "The description of the billing view."
    },
    "sourceViews": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of billing views used as the data source for the custom billing view."
    },
    "dataFilterExpression": {
      "$ref": "#/$defs/BillingExpression"
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. If the original request completes successfully, any subsequent retries complete successfully without performing any further actions with an idempotent request."
    },
    "resourceTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BillingResourceTag"
      },
      "description": "A list of key value map specifying tags associated to the billing view being created."
    }
  },
  "required": [
    "name",
    "sourceViews"
  ],
  "$defs": {
    "BillingCostCategoryValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The unique name of the Cost Category."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The specific value of the Cost Category."
        }
      },
      "required": [
        "key",
        "values"
      ]
    },
    "BillingDimensionValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "enum": [
            "LINKED_ACCOUNT"
          ],
          "description": "The names of the metadata types that you can use to filter and group your results."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The metadata values that you can use to filter and group your results."
        }
      },
      "required": [
        "key",
        "values"
      ]
    },
    "BillingExpression": {
      "type": "object",
      "properties": {
        "dimensions": {
          "$ref": "#/$defs/BillingDimensionValues"
        },
        "tags": {
          "$ref": "#/$defs/BillingTagValues"
        },
        "costCategories": {
          "$ref": "#/$defs/BillingCostCategoryValues"
        },
        "timeRange": {
          "$ref": "#/$defs/TimeRange"
        }
      }
    },
    "BillingResourceTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key that's associated with the tag."
        },
        "value": {
          "type": "string",
          "description": "The value that's associated with the tag."
        }
      },
      "required": [
        "key"
      ]
    },
    "BillingTagValues": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key for the tag."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The specific value of the tag."
        }
      },
      "required": [
        "key",
        "values"
      ]
    },
    "TimeRange": {
      "type": "object",
      "properties": {
        "beginDateInclusive": {
          "type": "string",
          "description": "The inclusive start date of the time range."
        },
        "endDateInclusive": {
          "type": "string",
          "description": "The inclusive end date of the time range."
        }
      }
    }
  }
}