{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-functions/json-schema/microsoft-azure-functions-certificate-patch-resource-schema.json",
  "title": "CertificatePatchResource",
  "description": "ARM resource for a certificate.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-functions-certificates-api-openapi.yml#/components/schemas/CertificatePatchResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/CertificatePatchResourceProperties",
      "description": "CertificatePatchResource resource specific properties",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyOnlyResource"
    }
  ],
  "$defs": {
    "CertificatePatchResourceProperties": {
      "type": "object",
      "description": "CertificatePatchResource resource specific properties",
      "properties": {
        "password": {
          "type": "string",
          "description": "Certificate password.",
          "readOnly": true
        },
        "friendlyName": {
          "type": "string",
          "description": "Friendly name of the certificate.",
          "readOnly": true
        },
        "subjectName": {
          "type": "string",
          "description": "Subject name of the certificate.",
          "readOnly": true
        },
        "hostNames": {
          "type": "array",
          "description": "Host names the certificate applies to.",
          "items": {
            "type": "string"
          }
        },
        "pfxBlob": {
          "type": "string",
          "format": "byte",
          "description": "Pfx blob."
        },
        "siteName": {
          "type": "string",
          "description": "App name.",
          "readOnly": true
        },
        "selfLink": {
          "type": "string",
          "description": "Self link.",
          "readOnly": true
        },
        "issuer": {
          "type": "string",
          "description": "Certificate issuer.",
          "readOnly": true
        },
        "issueDate": {
          "type": "string",
          "format": "date-time",
          "description": "Certificate issue Date.",
          "readOnly": true
        },
        "expirationDate": {
          "type": "string",
          "format": "date-time",
          "description": "Certificate expiration date.",
          "readOnly": true
        },
        "thumbprint": {
          "type": "string",
          "description": "Certificate thumbprint.",
          "readOnly": true
        },
        "valid": {
          "type": "boolean",
          "description": "Is the certificate valid?.",
          "readOnly": true
        },
        "cerBlob": {
          "type": "string",
          "format": "byte",
          "description": "Raw bytes of .cer file",
          "readOnly": true
        },
        "publicKeyHash": {
          "type": "string",
          "description": "Public key hash.",
          "readOnly": true
        },
        "hostingEnvironmentProfile": {
          "$ref": "#/$defs/HostingEnvironmentProfile",
          "description": "Specification for the App Service Environment to use for the certificate.",
          "readOnly": true
        },
        "keyVaultId": {
          "type": "string",
          "description": "Key Vault Csm resource Id."
        },
        "keyVaultSecretName": {
          "type": "string",
          "description": "Key Vault secret name."
        },
        "keyVaultSecretStatus": {
          "$ref": "#/$defs/KeyVaultSecretStatus",
          "description": "Status of the Key Vault secret.",
          "readOnly": true
        },
        "serverFarmId": {
          "type": "string",
          "description": "Resource ID of the associated App Service plan, formatted as: \"/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}\"."
        },
        "canonicalName": {
          "type": "string",
          "description": "CNAME of the certificate to be issued via free certificate"
        },
        "domainValidationMethod": {
          "type": "string",
          "description": "Method of domain validation for free cert"
        }
      }
    },
    "HostingEnvironmentProfile": {
      "type": "object",
      "description": "Specification for an App Service Environment to use for this resource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID of the App Service Environment."
        },
        "name": {
          "type": "string",
          "description": "Name of the App Service Environment.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Resource type of the App Service Environment.",
          "readOnly": true
        }
      }
    },
    "KeyVaultSecretStatus": {
      "type": "string",
      "description": "Status of the Key Vault secret.",
      "enum": [
        "Initialized",
        "WaitingOnCertificateOrder",
        "Succeeded",
        "CertificateOrderFailed",
        "OperationNotPermittedOnKeyVault",
        "AzureServiceUnauthorizedToAccessKeyVault",
        "KeyVaultDoesNotExist",
        "KeyVaultSecretDoesNotExist",
        "UnknownError",
        "ExternalPrivateKey",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "KeyVaultSecretStatus",
        "modelAsString": false
      }
    },
    "ProxyOnlyResource": {
      "type": "object",
      "description": "Azure proxy only resource. This resource is not tracked by Azure Resource Manager.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource Id.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Resource Name.",
          "readOnly": true
        },
        "kind": {
          "type": "string",
          "description": "Kind of resource."
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        }
      }
    }
  }
}