{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cost-management/json-schema/microsoft-azure-cost-management-generate-detailed-cost-report-definition-schema.json",
  "title": "GenerateDetailedCostReportDefinition",
  "description": "The definition of a cost detailed report.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-cost-management-providers-api-openapi.yml#/components/schemas/GenerateDetailedCostReportDefinition",
  "type": "object",
  "properties": {
    "metric": {
      "$ref": "#/$defs/GenerateDetailedCostReportMetricType",
      "description": "The type of the detailed report. By default ActualCost is provided"
    },
    "timePeriod": {
      "$ref": "#/$defs/GenerateDetailedCostReportTimePeriod",
      "description": "Has time period for pulling data for the cost detailed report. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided."
    },
    "billingPeriod": {
      "type": "string",
      "description": "Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided."
    },
    "invoiceId": {
      "type": "string",
      "description": "Invoice ID for Pay-as-you-go and Microsoft Customer Agreement scopes. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided."
    },
    "customerId": {
      "type": "string",
      "description": "Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this)."
    }
  },
  "$defs": {
    "GenerateDetailedCostReportMetricType": {
      "type": "string",
      "description": "The type of the detailed report. By default ActualCost is provided",
      "enum": [
        "ActualCost",
        "AmortizedCost"
      ],
      "x-ms-enum": {
        "name": "GenerateDetailedCostReportMetricType",
        "modelAsString": true,
        "values": [
          {
            "name": "ActualCost",
            "value": "ActualCost"
          },
          {
            "name": "AmortizedCost",
            "value": "AmortizedCost"
          }
        ]
      }
    },
    "GenerateDetailedCostReportTimePeriod": {
      "type": "object",
      "description": "The start and end date for pulling data for the cost detailed report.",
      "properties": {
        "start": {
          "type": "string",
          "description": "The start date to pull data from. example format 2020-03-15"
        },
        "end": {
          "type": "string",
          "description": "The end date to pull data to. example format 2020-03-15"
        }
      },
      "required": [
        "start",
        "end"
      ]
    }
  }
}