{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-cost-settings-schema.json",
  "title": "CostSettings",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-cacm-global-cost-settings-api-openapi.yml#/components/schemas/CostSettings",
  "required": [
    "awsCostType",
    "feature"
  ],
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "createdAt": {
      "type": "integer",
      "format": "int64"
    },
    "lastUpdatedAt": {
      "type": "integer",
      "format": "int64"
    },
    "createdBy": {
      "$ref": "#/$defs/EmbeddedUser"
    },
    "lastUpdatedBy": {
      "$ref": "#/$defs/EmbeddedUser"
    },
    "feature": {
      "type": "string",
      "enum": [
        "ANOMALIES",
        "RECOMMENDATIONS"
      ]
    },
    "awsCostType": {
      "type": "string",
      "description": "Show AWS Cost As",
      "enum": [
        "AMORTISED",
        "NET_AMORTISED",
        "BLENDED",
        "UNBLENDED",
        "EFFECTIVE",
        "LIST"
      ]
    },
    "azureCostType": {
      "type": "string",
      "enum": [
        "ACTUAL",
        "AMORTIZED",
        "LIST_ACTUAL",
        "LIST_AMORTIZED"
      ]
    },
    "gcpCostType": {
      "type": "string",
      "description": "Show GCP Cost As",
      "enum": [
        "COST",
        "LIST"
      ]
    },
    "includeAwsBenefits": {
      "type": "boolean"
    },
    "accountScopedPreferences": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccountScopedPreference"
      }
    }
  },
  "$defs": {
    "AccountScopedPreference": {
      "type": "object",
      "properties": {
        "awsAccountId": {
          "type": "string"
        },
        "awsCloudAccountNameWithId": {
          "type": "string"
        },
        "awsCostType": {
          "type": "string",
          "description": "Show AWS Cost As",
          "enum": [
            "AMORTISED",
            "NET_AMORTISED",
            "BLENDED",
            "UNBLENDED",
            "EFFECTIVE",
            "LIST"
          ]
        },
        "savingsEstimationMode": {
          "type": "string",
          "description": "AWS Savings Estimation Mode",
          "enum": [
            "AFTER_DISCOUNTS",
            "BEFORE_DISCOUNTS"
          ]
        }
      }
    },
    "EmbeddedUser": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "externalUserId": {
          "type": "string"
        }
      }
    }
  }
}