{
  "$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-batch-create-workload-estimate-usage-response-schema.json",
  "title": "BatchCreateWorkloadEstimateUsageResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-workload-estimate-usage-api-openapi.yml#/components/schemas/BatchCreateWorkloadEstimateUsageResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchCreateWorkloadEstimateUsageItem"
      },
      "description": "Returns the list of successful usage line items that were created for the Workload estimate."
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchCreateWorkloadEstimateUsageError"
      },
      "description": "Returns the list of errors reason and the usage item keys that cannot be created in the Workload estimate."
    }
  },
  "$defs": {
    "BatchCreateWorkloadEstimateUsageError": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the entry that caused the error."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "BAD_REQUEST",
            "NOT_FOUND",
            "CONFLICT",
            "INTERNAL_SERVER_ERROR"
          ],
          "description": "The error code associated with the failed operation."
        },
        "errorMessage": {
          "type": "string",
          "description": "A descriptive message for the error that occurred."
        }
      }
    },
    "BatchCreateWorkloadEstimateUsageItem": {
      "type": "object",
      "properties": {
        "serviceCode": {
          "type": "string",
          "description": "The Amazon Web Services service code for this usage estimate."
        },
        "usageType": {
          "type": "string",
          "description": "The type of usage that was estimated."
        },
        "operation": {
          "type": "string",
          "description": "The specific operation associated with this usage estimate."
        },
        "location": {
          "type": "string",
          "description": "The location associated with this usage estimate."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier assigned to the created usage estimate."
        },
        "usageAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID associated with the created usage estimate."
        },
        "group": {
          "type": "string",
          "description": "The group identifier for the created usage estimate."
        },
        "quantity": {
          "$ref": "#/$defs/WorkloadEstimateUsageQuantity"
        },
        "cost": {
          "type": "number",
          "description": "The estimated cost associated with this usage."
        },
        "currency": {
          "type": "string",
          "enum": [
            "USD"
          ],
          "description": "The currency of the estimated cost."
        },
        "status": {
          "type": "string",
          "enum": [
            "VALID",
            "INVALID",
            "STALE"
          ],
          "description": "The current status of the created usage estimate."
        },
        "historicalUsage": {
          "$ref": "#/$defs/HistoricalUsageEntity"
        },
        "key": {
          "type": "string",
          "description": "The key of the successfully created entry."
        }
      },
      "required": [
        "serviceCode",
        "usageType",
        "operation"
      ]
    },
    "BcmPricingCalculatorExpression": {
      "type": "object",
      "properties": {
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmPricingCalculatorExpression"
          },
          "description": "A list of expressions to be combined with AND logic."
        },
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BcmPricingCalculatorExpression"
          },
          "description": "A list of expressions to be combined with OR logic."
        },
        "not": {
          "$ref": "#/$defs/BcmPricingCalculatorExpression"
        },
        "costCategories": {
          "$ref": "#/$defs/ExpressionFilter"
        },
        "dimensions": {
          "$ref": "#/$defs/ExpressionFilter"
        },
        "tags": {
          "$ref": "#/$defs/ExpressionFilter"
        }
      }
    },
    "BillInterval": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "description": "The start date and time of the interval."
        },
        "end": {
          "type": "string",
          "description": "The end date and time of the interval."
        }
      }
    },
    "ExpressionFilter": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key or attribute to filter on."
        },
        "matchOptions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The match options for the filter (e.g., equals, contains)."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values to match against."
        }
      }
    },
    "HistoricalUsageEntity": {
      "type": "object",
      "properties": {
        "serviceCode": {
          "type": "string",
          "description": "The Amazon Web Services service code associated with the usage."
        },
        "usageType": {
          "type": "string",
          "description": "The type of usage."
        },
        "operation": {
          "type": "string",
          "description": "The specific operation associated with the usage."
        },
        "location": {
          "type": "string",
          "description": "The location associated with the usage."
        },
        "usageAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID associated with the usage."
        },
        "billInterval": {
          "$ref": "#/$defs/BillInterval"
        },
        "filterExpression": {
          "$ref": "#/$defs/BcmPricingCalculatorExpression"
        }
      },
      "required": [
        "serviceCode",
        "usageType",
        "operation",
        "usageAccountId",
        "billInterval",
        "filterExpression"
      ]
    },
    "WorkloadEstimateUsageQuantity": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "The unit of measurement for the usage quantity."
        },
        "amount": {
          "type": "number",
          "description": "The numeric value of the usage quantity."
        }
      }
    }
  }
}