{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-api-management/json-schema/microsoft-azure-api-management-ai-gateway-model-provider-update-parameters-schema.json",
  "title": "AiGatewayModelProviderUpdateParameters",
  "description": "Parameters for updating an AI Gateway model provider.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-api-management-aigatewaymodelproviderresources-api-openapi.yml#/components/schemas/AiGatewayModelProviderUpdateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AiGatewayModelProviderUpdateProperties",
      "description": "Model provider properties to update."
    }
  },
  "$defs": {
    "AiGatewayApiKeyCredentialUpdate": {
      "type": "object",
      "description": "API key credentials for updating an upstream service.",
      "properties": {
        "headerName": {
          "type": "string",
          "description": "Name of the HTTP header that carries the API key."
        },
        "value": {
          "type": "string",
          "format": "password",
          "description": "Secret API key value.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        }
      }
    },
    "AiGatewayCustomAuthenticationUpdate": {
      "type": "object",
      "description": "Custom model provider authentication settings to update.",
      "properties": {
        "kind": {
          "type": "string",
          "description": "Authentication type.",
          "enum": [
            "ApiKey"
          ],
          "x-ms-enum": {
            "modelAsString": false
          }
        },
        "apiKey": {
          "$ref": "#/$defs/AiGatewayApiKeyCredentialUpdate",
          "description": "API key configuration."
        }
      }
    },
    "AiGatewayCustomProviderConfigurationUpdate": {
      "type": "object",
      "description": "Custom model provider settings to update.",
      "properties": {
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "Provider base endpoint."
        },
        "authentication": {
          "$ref": "#/$defs/AiGatewayCustomAuthenticationUpdate",
          "description": "Authentication configuration."
        }
      }
    },
    "AiGatewayFoundryAuthenticationUpdate": {
      "type": "object",
      "description": "Foundry authentication settings to update.",
      "properties": {
        "kind": {
          "$ref": "#/$defs/AiGatewayModelProviderAuthenticationKind",
          "description": "Authentication type."
        },
        "managedIdentity": {
          "$ref": "#/$defs/AiGatewayManagedIdentityAuthentication",
          "description": "Managed identity settings."
        },
        "apiKey": {
          "$ref": "#/$defs/AiGatewayApiKeyCredentialUpdate",
          "description": "API key configuration."
        }
      }
    },
    "AiGatewayFoundryProviderConfigurationUpdate": {
      "type": "object",
      "description": "Foundry model provider settings to update.",
      "properties": {
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "Foundry endpoint."
        },
        "resourceIds": {
          "type": "array",
          "description": "Cognitive Services account resource identifiers available to this provider.",
          "items": {
            "type": "string",
            "format": "arm-id",
            "description": "A type definition that refers the id to an Azure Resource Manager resource.",
            "x-ms-arm-id-details": {
              "allowedResources": [
                {
                  "type": "Microsoft.CognitiveServices/accounts"
                }
              ]
            }
          }
        },
        "authentication": {
          "$ref": "#/$defs/AiGatewayFoundryAuthenticationUpdate",
          "description": "Authentication configuration."
        }
      }
    },
    "AiGatewayManagedIdentityAuthentication": {
      "type": "object",
      "description": "Managed identity settings for a model provider.",
      "properties": {
        "resource": {
          "type": "string",
          "description": "Token audience requested for managed identity authentication."
        },
        "clientId": {
          "type": "string",
          "description": "Client ID of a user-assigned managed identity."
        }
      }
    },
    "AiGatewayModelProviderAuthenticationKind": {
      "type": "string",
      "description": "Authentication type used by an AI model provider.",
      "enum": [
        "ManagedIdentity",
        "ApiKey"
      ],
      "x-ms-enum": {
        "name": "AiGatewayModelProviderAuthenticationKind",
        "modelAsString": true,
        "values": [
          {
            "name": "ManagedIdentity",
            "value": "ManagedIdentity",
            "description": "Authenticate using a managed identity."
          },
          {
            "name": "ApiKey",
            "value": "ApiKey",
            "description": "Authenticate using an API key."
          }
        ]
      }
    },
    "AiGatewayModelProviderUpdateProperties": {
      "type": "object",
      "description": "Properties for updating an AI Gateway model provider.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Display name of the model provider.",
          "x-ms-client-name": "displayName"
        },
        "description": {
          "type": "string",
          "description": "Description of the model provider."
        },
        "foundry": {
          "$ref": "#/$defs/AiGatewayFoundryProviderConfigurationUpdate",
          "description": "Foundry configuration."
        },
        "custom": {
          "$ref": "#/$defs/AiGatewayCustomProviderConfigurationUpdate",
          "description": "Custom provider configuration."
        }
      }
    }
  }
}