{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-arc/json-schema/microsoft-azure-arc-license-profile-schema.json",
  "title": "LicenseProfile",
  "description": "Describes a license profile in a hybrid machine.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-arc-licenseprofiles-api-openapi.yml#/components/schemas/LicenseProfile",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/LicenseProfileProperties",
      "description": "Describe the properties of a license profile.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "ErrorDetail": {
      "type": "object",
      "description": "The error detail.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The error message.",
          "readOnly": true
        },
        "target": {
          "type": "string",
          "description": "The error target.",
          "readOnly": true
        },
        "details": {
          "type": "array",
          "description": "The error details.",
          "items": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "message",
            "target"
          ]
        },
        "additionalInfo": {
          "type": "array",
          "description": "The error additional info.",
          "items": {
            "$ref": "#/$defs/ErrorAdditionalInfo"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "EsuEligibility": {
      "type": "string",
      "description": "The ESU eligibility.",
      "enum": [
        "Eligible",
        "Ineligible",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "EsuEligibility",
        "modelAsString": true,
        "values": [
          {
            "name": "Eligible",
            "value": "Eligible",
            "description": "Eligible"
          },
          {
            "name": "Ineligible",
            "value": "Ineligible",
            "description": "Ineligible"
          },
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          }
        ]
      }
    },
    "EsuKey": {
      "type": "object",
      "description": "ESU key",
      "properties": {
        "sku": {
          "type": "string",
          "description": "SKU number."
        },
        "licenseStatus": {
          "type": "integer",
          "format": "int32",
          "description": "The current status of the license profile key. Represented by the same integer value that is presented on the machine itself when querying the license key status."
        }
      }
    },
    "EsuKeyState": {
      "type": "string",
      "description": "The ESU key state.",
      "enum": [
        "Inactive",
        "Active"
      ],
      "x-ms-enum": {
        "name": "EsuKeyState",
        "modelAsString": true,
        "values": [
          {
            "name": "Inactive",
            "value": "Inactive",
            "description": "Inactive"
          },
          {
            "name": "Active",
            "value": "Active",
            "description": "Active"
          }
        ]
      }
    },
    "EsuServerType": {
      "type": "string",
      "description": "The server types for Esu.",
      "enum": [
        "Standard",
        "Datacenter"
      ],
      "x-ms-enum": {
        "name": "EsuServerType",
        "modelAsString": true,
        "values": [
          {
            "name": "Standard",
            "value": "Standard",
            "description": "Standard"
          },
          {
            "name": "Datacenter",
            "value": "Datacenter",
            "description": "Datacenter"
          }
        ]
      }
    },
    "LicenseProfileArmEsuProperties": {
      "type": "object",
      "description": "Describes the properties of a License Profile ARM model.",
      "properties": {
        "assignedLicense": {
          "type": "string",
          "description": "The resource id of the license."
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/LicenseProfileArmEsuPropertiesWithoutAssignedLicense"
        }
      ]
    },
    "LicenseProfileArmEsuPropertiesWithoutAssignedLicense": {
      "type": "object",
      "description": "Describes the properties of a License Profile ARM model.",
      "properties": {
        "serverType": {
          "$ref": "#/$defs/EsuServerType",
          "description": "The type of the Esu servers.",
          "readOnly": true
        },
        "esuEligibility": {
          "$ref": "#/$defs/EsuEligibility",
          "description": "Indicates the eligibility state of Esu.",
          "readOnly": true
        },
        "esuKeyState": {
          "$ref": "#/$defs/EsuKeyState",
          "description": "Indicates whether there is an ESU Key currently active for the machine.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/LicenseProfileStorageModelEsuProperties"
        }
      ]
    },
    "LicenseProfileArmProductProfileProperties": {
      "type": "object",
      "description": "Describes the properties of a Product License Profile ARM model.",
      "properties": {
        "subscriptionStatus": {
          "$ref": "#/$defs/LicenseProfileSubscriptionStatus",
          "description": "Indicates the subscription status of the product."
        },
        "productType": {
          "$ref": "#/$defs/LicenseProfileProductType",
          "description": "Indicates the product type of the license."
        },
        "enrollmentDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the user enrolls the feature.",
          "readOnly": true
        },
        "billingStartDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the billing starts.",
          "readOnly": true
        },
        "disenrollmentDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the user disenrolled the feature.",
          "readOnly": true
        },
        "billingEndDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the billing ends.",
          "readOnly": true
        },
        "error": {
          "$ref": "#/$defs/ErrorDetail",
          "description": "The errors that were encountered during the feature enrollment or disenrollment.",
          "readOnly": true
        },
        "productFeatures": {
          "type": "array",
          "description": "The list of product features.",
          "items": {
            "$ref": "#/$defs/ProductFeature"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "LicenseProfileProductType": {
      "type": "string",
      "description": "The product type of the license.",
      "enum": [
        "WindowsServer",
        "WindowsIoTEnterprise"
      ],
      "x-ms-enum": {
        "name": "LicenseProfileProductType",
        "modelAsString": true,
        "values": [
          {
            "name": "WindowsServer",
            "value": "WindowsServer",
            "description": "WindowsServer"
          },
          {
            "name": "WindowsIoTEnterprise",
            "value": "WindowsIoTEnterprise",
            "description": "WindowsIoTEnterprise"
          }
        ]
      }
    },
    "LicenseProfileProperties": {
      "type": "object",
      "description": "Describe the properties of a license profile.",
      "properties": {
        "softwareAssurance": {
          "$ref": "#/$defs/LicenseProfilePropertiesSoftwareAssurance",
          "x-ms-client-flatten": true
        },
        "esuProfile": {
          "$ref": "#/$defs/LicenseProfileArmEsuProperties",
          "description": "Hybrid Compute ESU Profile properties",
          "x-ms-client-flatten": true
        },
        "productProfile": {
          "$ref": "#/$defs/LicenseProfileArmProductProfileProperties",
          "description": "Hybrid Compute Product Profile properties",
          "x-ms-client-flatten": true
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state, which only appears in the response.",
          "readOnly": true
        }
      }
    },
    "LicenseProfilePropertiesSoftwareAssurance": {
      "type": "object",
      "properties": {
        "softwareAssuranceCustomer": {
          "type": "boolean",
          "description": "Specifies if this machine is licensed as part of a Software Assurance agreement."
        }
      }
    },
    "LicenseProfileStorageModelEsuProperties": {
      "type": "object",
      "description": "License profile storage model for ESU properties.",
      "properties": {
        "assignedLicenseImmutableId": {
          "type": "string",
          "description": "The guid id of the license.",
          "readOnly": true
        },
        "esuKeys": {
          "type": "array",
          "description": "The list of ESU keys.",
          "items": {
            "$ref": "#/$defs/EsuKey"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "LicenseProfileSubscriptionStatus": {
      "type": "string",
      "description": "Subscription status of the OS or Product feature.",
      "enum": [
        "Unknown",
        "Enabling",
        "Enabled",
        "Disabled",
        "Disabling",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "LicenseProfileSubscriptionStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "Enabling",
            "value": "Enabling",
            "description": "Enabling"
          },
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          },
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          },
          {
            "name": "Disabling",
            "value": "Disabling",
            "description": "Disabling"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          }
        ]
      }
    },
    "ProductFeature": {
      "type": "object",
      "description": "Product Feature",
      "properties": {
        "name": {
          "type": "string",
          "description": "Product feature name."
        },
        "subscriptionStatus": {
          "$ref": "#/$defs/LicenseProfileSubscriptionStatus",
          "description": "Indicates the current status of the product features."
        },
        "enrollmentDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the user enrolls the feature.",
          "readOnly": true
        },
        "billingStartDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the billing starts.",
          "readOnly": true
        },
        "disenrollmentDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the user disenrolled the feature.",
          "readOnly": true
        },
        "billingEndDate": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp in UTC when the billing ends.",
          "readOnly": true
        },
        "error": {
          "$ref": "#/$defs/ErrorDetail",
          "description": "The errors that were encountered during the feature enrollment or disenrollment.",
          "readOnly": true
        }
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "The provisioning state, which only appears in the response.",
      "enum": [
        "Creating",
        "Updating",
        "Deleting",
        "Succeeded",
        "Failed",
        "Accepted",
        "Canceled",
        "Deleted"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Accepted",
            "value": "Accepted",
            "description": "Accepted"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Deleted",
            "value": "Deleted",
            "description": "Deleted"
          }
        ]
      }
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}