{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-registry/json-schema/azure-container-registry-credential-set-update-parameters-schema.json",
  "title": "CredentialSetUpdateParameters",
  "description": "The parameters for updating a credential set",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-container-registry-credentialsets-api-openapi.yml#/components/schemas/CredentialSetUpdateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/CredentialSetUpdateProperties",
      "description": "The properties of the credential set update parameters",
      "x-ms-client-flatten": true
    },
    "identity": {
      "$ref": "#/$defs/IdentityProperties",
      "description": "Identities associated with the resource. This is used to access the KeyVault secrets."
    }
  },
  "$defs": {
    "AuthCredential": {
      "type": "object",
      "description": "Authentication credential stored for an upstream.",
      "properties": {
        "name": {
          "$ref": "#/$defs/CredentialName",
          "description": "The name of the credential."
        },
        "usernameSecretIdentifier": {
          "type": "string",
          "description": "KeyVault Secret URI for accessing the username."
        },
        "passwordSecretIdentifier": {
          "type": "string",
          "description": "KeyVault Secret URI for accessing the password."
        },
        "credentialHealth": {
          "$ref": "#/$defs/CredentialHealth",
          "description": "This provides data pertaining to the health of the auth credential.",
          "readOnly": true
        }
      }
    },
    "CredentialHealth": {
      "type": "object",
      "description": "The health of the auth credential.",
      "properties": {
        "status": {
          "$ref": "#/$defs/CredentialHealthStatus",
          "description": "The health status of credential."
        },
        "errorCode": {
          "type": "string",
          "description": "Error code representing the health check error."
        },
        "errorMessage": {
          "type": "string",
          "description": "Descriptive message representing the health check error."
        }
      }
    },
    "CredentialHealthStatus": {
      "type": "string",
      "description": "The health status of credential.",
      "enum": [
        "Healthy",
        "Unhealthy"
      ],
      "x-ms-enum": {
        "name": "CredentialHealthStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Healthy",
            "value": "Healthy"
          },
          {
            "name": "Unhealthy",
            "value": "Unhealthy"
          }
        ]
      }
    },
    "CredentialName": {
      "type": "string",
      "description": "The name of the credential.",
      "enum": [
        "Credential1"
      ],
      "x-ms-enum": {
        "name": "CredentialName",
        "modelAsString": true,
        "values": [
          {
            "name": "Credential1",
            "value": "Credential1"
          }
        ]
      }
    },
    "CredentialSetUpdateProperties": {
      "type": "object",
      "description": "The parameters for updating credential set properties.",
      "properties": {
        "authCredentials": {
          "type": "array",
          "description": "List of authentication credentials stored for an upstream.\nUsually consists of a primary and an optional secondary credential.",
          "items": {
            "$ref": "#/$defs/AuthCredential"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "IdentityProperties": {
      "type": "object",
      "description": "Managed identity for the resource.",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "The principal ID of resource identity.",
          "readOnly": true
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant ID of resource.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/ResourceIdentityType",
          "description": "The identity type."
        },
        "userAssignedIdentities": {
          "type": "object",
          "description": "The list of user identities associated with the resource. The user identity\ndictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\nproviders/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.",
          "additionalProperties": {
            "$ref": "#/$defs/UserIdentityProperties"
          }
        }
      }
    },
    "ResourceIdentityType": {
      "type": "string",
      "description": "The identity type.",
      "enum": [
        "SystemAssigned",
        "UserAssigned",
        "SystemAssigned, UserAssigned",
        "None"
      ],
      "x-ms-enum": {
        "name": "ResourceIdentityType",
        "modelAsString": false
      }
    },
    "UserIdentityProperties": {
      "type": "object",
      "properties": {
        "principalId": {
          "type": "string",
          "description": "The principal id of user assigned identity.",
          "readOnly": true
        },
        "clientId": {
          "type": "string",
          "description": "The client id of user assigned identity.",
          "readOnly": true
        }
      }
    }
  }
}