{
  "$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-bill-scenario-usage-modification-request-schema.json",
  "title": "BatchCreateBillScenarioUsageModificationRequest",
  "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/BatchCreateBillScenarioUsageModificationRequest",
  "type": "object",
  "properties": {
    "billScenarioId": {
      "type": "string",
      "description": "The ID of the Bill Scenario for which you want to create the modeled usage."
    },
    "usageModifications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BatchCreateBillScenarioUsageModificationEntry"
      },
      "description": "List of usage that you want to model in the Bill Scenario."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request."
    }
  },
  "required": [
    "billScenarioId",
    "usageModifications"
  ],
  "$defs": {
    "BatchCreateBillScenarioUsageModificationEntry": {
      "type": "object",
      "properties": {
        "serviceCode": {
          "type": "string",
          "description": "The Amazon Web Services service code for this usage modification. This identifies the specific Amazon Web Services service to the customer as a unique short abbreviation. For example, AmazonEC2 and AWSKMS."
        },
        "usageType": {
          "type": "string",
          "description": "Describes the usage details of the usage line item."
        },
        "operation": {
          "type": "string",
          "description": "The specific operation associated with this usage modification. Describes the specific Amazon Web Services operation that this usage line models. For example, RunInstances indicates the operation of an Amazon EC2 instance."
        },
        "availabilityZone": {
          "type": "string",
          "description": "The Availability Zone that this usage line uses."
        },
        "key": {
          "type": "string",
          "description": "A unique identifier for this entry in the batch operation. This can be any valid string. This key is useful to identify errors associated with any usage entry as any error is returned with this key."
        },
        "group": {
          "type": "string",
          "description": "An optional group identifier for the usage modification."
        },
        "usageAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account ID to which this usage will be applied to."
        },
        "amounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UsageAmount"
          },
          "description": "The amount of usage you want to create for the service use you are modeling."
        },
        "historicalUsage": {
          "$ref": "#/$defs/HistoricalUsageEntity"
        }
      },
      "required": [
        "serviceCode",
        "usageType",
        "operation",
        "key",
        "usageAccountId"
      ]
    },
    "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"
      ]
    },
    "UsageAmount": {
      "type": "object",
      "properties": {
        "startHour": {
          "type": "string",
          "description": "The start hour of the usage period."
        },
        "amount": {
          "type": "number",
          "description": "The usage amount for the period."
        }
      },
      "required": [
        "startHour",
        "amount"
      ]
    }
  }
}