{
  "$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-update-bill-scenario-usage-modification-response-schema.json",
  "title": "BatchUpdateBillScenarioUsageModificationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-bill-scenario-usage-modification-api-openapi.yml#/components/schemas/BatchUpdateBillScenarioUsageModificationResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BillScenarioUsageModificationItem"
      },
      "description": "Returns the list of successful usage line items that were updated for a Bill Scenario."
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchUpdateBillScenarioUsageModificationError"
      },
      "description": "Returns the list of error reasons and usage line item IDs that could not be updated for the Bill Scenario."
    }
  },
  "$defs": {
    "BatchUpdateBillScenarioUsageModificationError": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the error."
        },
        "errorMessage": {
          "type": "string",
          "description": "The message that describes the error."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "BAD_REQUEST",
            "NOT_FOUND",
            "CONFLICT",
            "INTERNAL_SERVER_ERROR"
          ],
          "description": "The code associated with the error."
        }
      }
    },
    "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."
        }
      }
    },
    "BillScenarioUsageModificationItem": {
      "type": "object",
      "properties": {
        "serviceCode": {
          "type": "string",
          "description": "The Amazon Web Services service code for this usage modification."
        },
        "usageType": {
          "type": "string",
          "description": "The type of usage being modified."
        },
        "operation": {
          "type": "string",
          "description": "The specific operation associated with this usage modification."
        },
        "location": {
          "type": "string",
          "description": "The location associated with this usage modification."
        },
        "availabilityZone": {
          "type": "string",
          "description": "The availability zone associated with this usage modification, if applicable."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier of the usage modification."
        },
        "group": {
          "type": "string",
          "description": "The group identifier for the usage modification."
        },
        "usageAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID associated with this usage modification."
        },
        "quantities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UsageQuantity"
          },
          "description": "The modified usage quantities."
        },
        "historicalUsage": {
          "$ref": "#/$defs/HistoricalUsageEntity"
        }
      },
      "required": [
        "serviceCode",
        "usageType",
        "operation"
      ]
    },
    "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"
      ]
    },
    "UsageQuantity": {
      "type": "object",
      "properties": {
        "startHour": {
          "type": "string",
          "description": "The start hour of the usage period."
        },
        "unit": {
          "type": "string",
          "description": "The unit of measurement for the usage quantity."
        },
        "amount": {
          "type": "number",
          "description": "The numeric value of the usage quantity."
        }
      }
    }
  }
}