{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-registry/json-schema/azure-container-registry-token-update-parameters-schema.json",
  "title": "TokenUpdateParameters",
  "description": "The parameters for updating a token.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-container-registry-tokens-api-openapi.yml#/components/schemas/TokenUpdateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/TokenUpdateProperties",
      "description": "The properties of the token update parameters.",
      "x-ms-client-flatten": true
    }
  },
  "$defs": {
    "TokenCertificate": {
      "type": "object",
      "description": "The properties of a certificate used for authenticating a token.",
      "properties": {
        "name": {
          "$ref": "#/$defs/TokenCertificateName"
        },
        "expiry": {
          "type": "string",
          "format": "date-time",
          "description": "The expiry datetime of the certificate."
        },
        "thumbprint": {
          "type": "string",
          "description": "The thumbprint of the certificate."
        },
        "encodedPemCertificate": {
          "type": "string",
          "description": "Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token."
        }
      }
    },
    "TokenCertificateName": {
      "type": "string",
      "enum": [
        "certificate1",
        "certificate2"
      ],
      "x-ms-enum": {
        "name": "TokenCertificateName",
        "modelAsString": true,
        "values": [
          {
            "name": "certificate1",
            "value": "certificate1"
          },
          {
            "name": "certificate2",
            "value": "certificate2"
          }
        ]
      }
    },
    "TokenCredentialsProperties": {
      "type": "object",
      "description": "The properties of the credentials that can be used for authenticating the token.",
      "properties": {
        "certificates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TokenCertificate"
          },
          "x-ms-identifiers": [
            "thumbprint"
          ]
        },
        "passwords": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TokenPassword"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "TokenPassword": {
      "type": "object",
      "description": "The password that will be used for authenticating the token of a container registry.",
      "properties": {
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The creation datetime of the password."
        },
        "expiry": {
          "type": "string",
          "format": "date-time",
          "description": "The expiry datetime of the password."
        },
        "name": {
          "$ref": "#/$defs/TokenPasswordName",
          "description": "The password name \"password1\" or \"password2\""
        },
        "value": {
          "type": "string",
          "description": "The password value.",
          "readOnly": true
        }
      }
    },
    "TokenPasswordName": {
      "type": "string",
      "description": "The password name \"password1\" or \"password2\"",
      "enum": [
        "password1",
        "password2"
      ],
      "x-ms-enum": {
        "name": "TokenPasswordName",
        "modelAsString": true,
        "values": [
          {
            "name": "password1",
            "value": "password1"
          },
          {
            "name": "password2",
            "value": "password2"
          }
        ]
      }
    },
    "TokenStatus": {
      "type": "string",
      "description": "The status of the token example enabled or disabled.",
      "enum": [
        "enabled",
        "disabled"
      ],
      "x-ms-enum": {
        "name": "TokenStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "enabled",
            "value": "enabled"
          },
          {
            "name": "disabled",
            "value": "disabled"
          }
        ]
      }
    },
    "TokenUpdateProperties": {
      "type": "object",
      "description": "The parameters for updating token properties.",
      "properties": {
        "scopeMapId": {
          "type": "string",
          "description": "The resource ID of the scope map to which the token will be associated with."
        },
        "status": {
          "$ref": "#/$defs/TokenStatus",
          "description": "The status of the token example enabled or disabled."
        },
        "credentials": {
          "$ref": "#/$defs/TokenCredentialsProperties",
          "description": "The credentials that can be used for authenticating the token."
        }
      }
    }
  }
}