{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-purview/json-schema/microsoft-purview-credential-schema.json",
  "title": "Credential",
  "description": "The credential.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-purview-credential-api-openapi.yml#/components/schemas/Credential",
  "required": [
    "kind"
  ],
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "properties": {
    "kind": {
      "enum": [
        "AccountKey",
        "ServicePrincipal",
        "BasicAuth",
        "SqlAuth",
        "AmazonARN",
        "ConsumerKeyAuth",
        "DelegatedAuth",
        "ManagedIdentity"
      ],
      "type": "string",
      "description": "The kind of credential.",
      "x-ms-enum": {
        "name": "CredentialType",
        "values": [
          {
            "value": "AccountKey",
            "description": "the credential type is account key"
          },
          {
            "value": "ServicePrincipal",
            "description": "the credential type is service principal"
          },
          {
            "value": "BasicAuth",
            "description": "the credential type is basic auth"
          },
          {
            "value": "SqlAuth",
            "description": "the credential type is sql auth"
          },
          {
            "value": "AmazonARN",
            "description": "the credential type is amazon ARN"
          },
          {
            "value": "ConsumerKeyAuth",
            "description": "the credential type is Consumer Key Auth"
          },
          {
            "value": "DelegatedAuth",
            "description": "the credential type is delegated auth"
          },
          {
            "value": "ManagedIdentity",
            "description": "the credential type is managed identity"
          }
        ],
        "modelAsString": true
      }
    }
  },
  "$defs": {
    "ProxyResource": {
      "description": "The proxy resource.",
      "type": "object",
      "properties": {
        "id": {
          "description": "The resource identifier.",
          "type": "string",
          "readOnly": true
        },
        "name": {
          "description": "The resource name.",
          "type": "string",
          "readOnly": true
        }
      }
    }
  }
}