{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cost-management/json-schema/microsoft-azure-cost-management-benefit-utilization-summaries-operation-status-schema.json",
  "title": "BenefitUtilizationSummariesOperationStatus",
  "description": "Status of a benefit utilization summaries report. Provides Async Benefit Utilization Summaries Request input, status, and report sas url.",
  "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/BenefitUtilizationSummariesOperationStatus",
  "type": "object",
  "properties": {
    "input": {
      "$ref": "#/$defs/BenefitUtilizationSummariesRequest",
      "description": "Input given to create the benefit utilization summaries report."
    },
    "status": {
      "$ref": "#/$defs/OperationStatusType",
      "description": "The status of the creation of the benefit utilization summaries report."
    },
    "properties": {
      "$ref": "#/$defs/AsyncOperationStatusProperties",
      "description": "Contains sas url to the async benefit utilization summaries report and a date that the url is valid until. These values will be empty if the report is in a Running or Failed state"
    }
  },
  "$defs": {
    "AsyncOperationStatusProperties": {
      "type": "object",
      "description": "Object representing the report url and valid until date of the async report generated.",
      "properties": {
        "reportUrl": {
          "$ref": "#/$defs/BenefitUtilizationSummaryReportSchema",
          "format": "password",
          "description": "Sas url to the async benefit utilization summaries report. Will be empty if the report is in Running or Failed state.",
          "x-ms-secret": true
        },
        "secondaryReportUrl": {
          "$ref": "#/$defs/BenefitUtilizationSummaryReportSchema",
          "format": "password",
          "description": "Sas url to async benefit utilization summaries report in secondary storage in case of primary outage. Will be empty if the report is in Running or Failed state.",
          "x-ms-secret": true
        },
        "validUntil": {
          "type": "string",
          "format": "date-time",
          "description": "The date that the sas url provided in reportUrl expires."
        }
      }
    },
    "BenefitKind": {
      "type": "string",
      "description": "Kind/type of the benefit.",
      "enum": [
        "IncludedQuantity",
        "Reservation",
        "SavingsPlan"
      ],
      "x-ms-enum": {
        "name": "BenefitKind",
        "modelAsString": true,
        "values": [
          {
            "name": "IncludedQuantity",
            "value": "IncludedQuantity",
            "description": "Benefit is IncludedQuantity."
          },
          {
            "name": "Reservation",
            "value": "Reservation",
            "description": "Benefit is Reservation."
          },
          {
            "name": "SavingsPlan",
            "value": "SavingsPlan",
            "description": "Benefit is SavingsPlan."
          }
        ]
      }
    },
    "BenefitUtilizationSummariesRequest": {
      "type": "object",
      "description": "Properties of an async benefit utilization summaries request.",
      "properties": {
        "billingAccountId": {
          "type": "string",
          "description": "Billing account the benefit utilization summaries report is for. Required for billing account and billing profile scopes. Not supported for any benefit scopes."
        },
        "billingProfileId": {
          "type": "string",
          "description": "Billing profile id the benefit utilization summaries report is for. Required for billing profile scope. Not supported for billing account or any benefit scopes."
        },
        "benefitOrderId": {
          "type": "string",
          "description": "Benefit order id the benefit utilization summaries report is for. Required for benefit order and benefit id scopes. Not supported for any billing scopes."
        },
        "benefitId": {
          "type": "string",
          "description": "Benefit id the benefit utilization summaries report is for. Required for benefit id scope. Not supported for benefit order or any billing scopes."
        },
        "grain": {
          "$ref": "#/$defs/Grain",
          "description": "The grain the summaries data is served at in the report. Accepted values are 'Daily' or 'Monthly'."
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "The start date of the summaries data that will be served in the report."
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "description": "The end date of the summaries data that will be served in the report."
        },
        "kind": {
          "$ref": "#/$defs/BenefitKind",
          "description": "The type of benefit data requested. Required for billing account and billing profile scopes. Implied and not to be passed at benefit scopes. Supported values are Reservation and SavingsPlan"
        }
      },
      "required": [
        "grain",
        "startDate",
        "endDate"
      ]
    },
    "BenefitUtilizationSummaryReportSchema": {
      "type": "string",
      "description": "The CSV file from the reportUrl and secondaryReportUrl blob link will consist of the following columns of benefit utilization data. UtilizedPercentage will be 0 for savings plans reports and non data bricks reservations. Utilization percentages will be 0 for data bricks reservations.",
      "enum": [
        "Kind",
        "AvgUtilizationPercentage",
        "BenefitOrderId",
        "BenefitId",
        "BenefitType",
        "MaxUtilizationPercentage",
        "MinUtilizationPercentage",
        "UsageDate",
        "UtilizedPercentage"
      ],
      "x-ms-enum": {
        "name": "BenefitUtilizationSummaryReportSchema",
        "modelAsString": true,
        "values": [
          {
            "name": "Kind",
            "value": "Kind"
          },
          {
            "name": "AvgUtilizationPercentage",
            "value": "AvgUtilizationPercentage"
          },
          {
            "name": "BenefitOrderId",
            "value": "BenefitOrderId"
          },
          {
            "name": "BenefitId",
            "value": "BenefitId"
          },
          {
            "name": "BenefitType",
            "value": "BenefitType"
          },
          {
            "name": "MaxUtilizationPercentage",
            "value": "MaxUtilizationPercentage"
          },
          {
            "name": "MinUtilizationPercentage",
            "value": "MinUtilizationPercentage"
          },
          {
            "name": "UsageDate",
            "value": "UsageDate"
          },
          {
            "name": "UtilizedPercentage",
            "value": "UtilizedPercentage"
          }
        ]
      }
    },
    "Grain": {
      "type": "string",
      "description": "Grain which corresponds to value.",
      "enum": [
        "Hourly",
        "Daily",
        "Monthly"
      ],
      "x-ms-enum": {
        "name": "Grain",
        "modelAsString": true,
        "values": [
          {
            "name": "Hourly",
            "value": "Hourly",
            "description": "Hourly grain corresponds to value per hour."
          },
          {
            "name": "Daily",
            "value": "Daily",
            "description": "Hourly grain corresponds to value per day."
          },
          {
            "name": "Monthly",
            "value": "Monthly",
            "description": "Hourly grain corresponds to value per month."
          }
        ]
      }
    },
    "OperationStatusType": {
      "type": "string",
      "description": "Enum representing the status of an async operation.",
      "enum": [
        "Running",
        "Completed",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "OperationStatusType",
        "modelAsString": true,
        "values": [
          {
            "name": "Running",
            "value": "Running"
          },
          {
            "name": "Completed",
            "value": "Completed"
          },
          {
            "name": "Failed",
            "value": "Failed"
          }
        ]
      }
    }
  }
}