{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-access-token-schema.json",
  "title": "AccessToken",
  "description": "Model of an access-token linked to an account.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-accounts-api-openapi.yml#/components/schemas/AccessToken",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/Azure.Core.uuid",
      "description": "The access-token id.",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "The access-token name.",
      "minLength": 3,
      "maxLength": 64,
      "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    },
    "jwtToken": {
      "type": "string",
      "description": "The access-token value in JWT format.",
      "readOnly": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The access-token createdAt utcDateTime.",
      "readOnly": true
    },
    "expiryAt": {
      "type": "string",
      "format": "date-time",
      "description": "The access-token expiryAt utcDateTime.",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    },
    "state": {
      "$ref": "#/$defs/AccessTokenState",
      "description": "The access-token state - Active | Expired.",
      "readOnly": true
    }
  },
  "required": [
    "id",
    "name",
    "expiryAt"
  ],
  "$defs": {
    "AccessTokenState": {
      "type": "string",
      "description": "The access-token state.",
      "enum": [
        "Active",
        "Expired"
      ],
      "x-ms-enum": {
        "name": "AccessTokenState",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "Active",
            "description": "The access-token is Active."
          },
          {
            "name": "Expired",
            "value": "Expired",
            "description": "The access-token is Expired."
          }
        ]
      }
    },
    "Azure.Core.uuid": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier"
    }
  }
}