{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-license-manager/json-schema/amazon-license-manager-update-license-asset-ruleset-request-schema.json",
  "title": "UpdateLicenseAssetRulesetRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-license-manager-license-asset-ruleset-api-openapi.yml#/components/schemas/UpdateLicenseAssetRulesetRequest",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "License asset ruleset name."
    },
    "Description": {
      "type": "string",
      "description": "License asset ruleset description."
    },
    "Rules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LicenseAssetRule"
      },
      "description": "License asset rules."
    },
    "LicenseAssetRulesetArn": {
      "type": "string",
      "description": "Amazon Resource Name (ARN) of the license asset ruleset."
    },
    "ClientToken": {
      "type": "string",
      "description": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the request."
    }
  },
  "required": [
    "Rules",
    "LicenseAssetRulesetArn",
    "ClientToken"
  ],
  "$defs": {
    "AndRuleStatement": {
      "type": "object",
      "properties": {
        "MatchingRuleStatements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MatchingRuleStatement"
          },
          "description": "Matching rule statements."
        },
        "ScriptRuleStatements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScriptRuleStatement"
          },
          "description": "Script rule statements."
        }
      }
    },
    "InstanceRuleStatement": {
      "type": "object",
      "properties": {
        "AndRuleStatement": {
          "$ref": "#/$defs/AndRuleStatement"
        },
        "OrRuleStatement": {
          "$ref": "#/$defs/OrRuleStatement"
        },
        "MatchingRuleStatement": {
          "$ref": "#/$defs/MatchingRuleStatement"
        },
        "ScriptRuleStatement": {
          "$ref": "#/$defs/ScriptRuleStatement"
        }
      }
    },
    "LicenseAssetRule": {
      "type": "object",
      "properties": {
        "RuleStatement": {
          "$ref": "#/$defs/RuleStatement"
        }
      },
      "required": [
        "RuleStatement"
      ]
    },
    "LicenseConfigurationRuleStatement": {
      "type": "object",
      "properties": {
        "AndRuleStatement": {
          "$ref": "#/$defs/AndRuleStatement"
        },
        "OrRuleStatement": {
          "$ref": "#/$defs/OrRuleStatement"
        },
        "MatchingRuleStatement": {
          "$ref": "#/$defs/MatchingRuleStatement"
        }
      }
    },
    "LicenseRuleStatement": {
      "type": "object",
      "properties": {
        "AndRuleStatement": {
          "$ref": "#/$defs/AndRuleStatement"
        },
        "OrRuleStatement": {
          "$ref": "#/$defs/OrRuleStatement"
        },
        "MatchingRuleStatement": {
          "$ref": "#/$defs/MatchingRuleStatement"
        }
      }
    },
    "MatchingRuleStatement": {
      "type": "object",
      "properties": {
        "KeyToMatch": {
          "type": "string",
          "description": "Key to match. The following keys and are supported when the RuleStatement type is Instance: Platform - The name of the platform. Logical operators are EQUALS and NOT_EQUALS. EC2BillingProduct - The billing product code. Logical operators are EQUALS and NOT_EQUALS. Possible values are: windows-server-enterprise | windows-byol | rhel | rhel-byol | rhel-high-availability | ubuntu-pro | suse-linux | sql-server-standard | sql-server-enterprise. MarketPlaceProductCode - The Marketplace product code. Logical operators are EQUALS and NOT_EQUALS. AMIId - The ID of the AMI. Logical operators are EQUALS "
        },
        "Constraint": {
          "type": "string",
          "description": "Constraint."
        },
        "ValueToMatch": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Value to match."
        }
      },
      "required": [
        "KeyToMatch",
        "Constraint",
        "ValueToMatch"
      ]
    },
    "OrRuleStatement": {
      "type": "object",
      "properties": {
        "MatchingRuleStatements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MatchingRuleStatement"
          },
          "description": "Matching rule statements."
        },
        "ScriptRuleStatements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScriptRuleStatement"
          },
          "description": "Script rule statements."
        }
      }
    },
    "RuleStatement": {
      "type": "object",
      "properties": {
        "LicenseConfigurationRuleStatement": {
          "$ref": "#/$defs/LicenseConfigurationRuleStatement"
        },
        "LicenseRuleStatement": {
          "$ref": "#/$defs/LicenseRuleStatement"
        },
        "InstanceRuleStatement": {
          "$ref": "#/$defs/InstanceRuleStatement"
        }
      }
    },
    "ScriptRuleStatement": {
      "type": "object",
      "properties": {
        "KeyToMatch": {
          "type": "string",
          "description": "Key name to match against in the script rule evaluation."
        },
        "Script": {
          "type": "string",
          "description": "Script code used to evaluate the rule condition."
        }
      },
      "required": [
        "KeyToMatch",
        "Script"
      ]
    }
  }
}