{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-private-ca/json-schema/amazon-private-ca-create-template-request-schema.json",
  "title": "CreateTemplateRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-private-ca-templates-api-openapi.yml#/components/schemas/CreateTemplateRequest",
  "type": "object",
  "properties": {
    "ConnectorArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) that was returned when you called CreateConnector."
    },
    "Name": {
      "type": "string",
      "description": "Name of the template. The template name must be unique."
    },
    "Definition": {
      "$ref": "#/$defs/TemplateDefinition"
    },
    "ClientToken": {
      "type": "string",
      "description": "Idempotency token."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Metadata assigned to a template consisting of a key-value pair."
    }
  },
  "required": [
    "ConnectorArn",
    "Name",
    "Definition"
  ],
  "$defs": {
    "ApplicationPolicies": {
      "type": "object",
      "properties": {
        "Critical": {
          "type": "boolean",
          "description": "Marks the application policy extension as critical."
        },
        "Policies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApplicationPolicy"
          },
          "description": "Application policies describe what the certificate can be used for."
        }
      },
      "required": [
        "Policies"
      ]
    },
    "ApplicationPolicy": {
      "type": "object",
      "properties": {
        "PolicyType": {
          "type": "string",
          "enum": [
            "ALL_APPLICATION_POLICIES",
            "ANY_PURPOSE",
            "ATTESTATION_IDENTITY_KEY_CERTIFICATE",
            "CERTIFICATE_REQUEST_AGENT",
            "CLIENT_AUTHENTICATION",
            "CODE_SIGNING",
            "CTL_USAGE",
            "DIGITAL_RIGHTS",
            "DIRECTORY_SERVICE_EMAIL_REPLICATION",
            "DISALLOWED_LIST",
            "DNS_SERVER_TRUST",
            "DOCUMENT_ENCRYPTION",
            "DOCUMENT_SIGNING",
            "DYNAMIC_CODE_GENERATOR",
            "EARLY_LAUNCH_ANTIMALWARE_DRIVER",
            "EMBEDDED_WINDOWS_SYSTEM_COMPONENT_VERIFICATION",
            "ENCLAVE",
            "ENCRYPTING_FILE_SYSTEM",
            "ENDORSEMENT_KEY_CERTIFICATE",
            "FILE_RECOVERY",
            "HAL_EXTENSION",
            "IP_SECURITY_END_SYSTEM",
            "IP_SECURITY_IKE_INTERMEDIATE",
            "IP_SECURITY_TUNNEL_TERMINATION",
            "IP_SECURITY_USER",
            "ISOLATED_USER_MODE",
            "KDC_AUTHENTICATION",
            "KERNEL_MODE_CODE_SIGNING",
            "KEY_PACK_LICENSES",
            "KEY_RECOVERY",
            "KEY_RECOVERY_AGENT",
            "LICENSE_SERVER_VERIFICATION",
            "LIFETIME_SIGNING",
            "MICROSOFT_PUBLISHER",
            "MICROSOFT_TIME_STAMPING",
            "MICROSOFT_TRUST_LIST_SIGNING",
            "OCSP_SIGNING",
            "OEM_WINDOWS_SYSTEM_COMPONENT_VERIFICATION",
            "PLATFORM_CERTIFICATE",
            "PREVIEW_BUILD_SIGNING",
            "PRIVATE_KEY_ARCHIVAL",
            "PROTECTED_PROCESS_LIGHT_VERIFICATION",
            "PROTECTED_PROCESS_VERIFICATION",
            "QUALIFIED_SUBORDINATION",
            "REVOKED_LIST_SIGNER",
            "ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION",
            "ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION",
            "ROOT_PROGRAM_NO_OSCP_FAILOVER_TO_CRL",
            "ROOT_LIST_SIGNER",
            "SECURE_EMAIL",
            "SERVER_AUTHENTICATION",
            "SMART_CARD_LOGIN",
            "SPC_ENCRYPTED_DIGEST_RETRY_COUNT",
            "SPC_RELAXED_PE_MARKER_CHECK",
            "TIME_STAMPING",
            "WINDOWS_HARDWARE_DRIVER_ATTESTED_VERIFICATION",
            "WINDOWS_HARDWARE_DRIVER_EXTENDED_VERIFICATION",
            "WINDOWS_HARDWARE_DRIVER_VERIFICATION",
            "WINDOWS_HELLO_RECOVERY_KEY_ENCRYPTION",
            "WINDOWS_KITS_COMPONENT",
            "WINDOWS_RT_VERIFICATION",
            "WINDOWS_SOFTWARE_EXTENSION_VERIFICATION",
            "WINDOWS_STORE",
            "WINDOWS_SYSTEM_COMPONENT_VERIFICATION",
            "WINDOWS_TCB_COMPONENT",
            "WINDOWS_THIRD_PARTY_APPLICATION_COMPONENT",
            "WINDOWS_UPDATE"
          ],
          "description": "The type of application policy"
        },
        "PolicyObjectIdentifier": {
          "type": "string",
          "description": "The object identifier (OID) of an application policy."
        }
      },
      "description": "Exactly one member is set."
    },
    "CertificateValidity": {
      "type": "object",
      "properties": {
        "ValidityPeriod": {
          "$ref": "#/$defs/ValidityPeriod"
        },
        "RenewalPeriod": {
          "$ref": "#/$defs/ValidityPeriod"
        }
      },
      "required": [
        "ValidityPeriod",
        "RenewalPeriod"
      ]
    },
    "EnrollmentFlagsV2": {
      "type": "object",
      "properties": {
        "IncludeSymmetricAlgorithms": {
          "type": "boolean",
          "description": "Include symmetric algorithms allowed by the subject."
        },
        "UserInteractionRequired": {
          "type": "boolean",
          "description": "Require user interaction when the subject is enrolled and the private key associated with the certificate is used."
        },
        "RemoveInvalidCertificateFromPersonalStore": {
          "type": "boolean",
          "description": "Delete expired or revoked certificates instead of archiving them."
        },
        "NoSecurityExtension": {
          "type": "boolean",
          "description": "This flag instructs the CA to not include the security extension szOID_NTDS_CA_SECURITY_EXT (OID:1.3.6.1.4.1.311.25.2), as specified in [MS-WCCE] sections 2.2.2.7.7.4 and 3.2.2.6.2.1.4.5.9, in the issued certificate. This addresses a Windows Kerberos elevation-of-privilege vulnerability."
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull": {
          "type": "boolean",
          "description": "Allow renewal using the same key."
        }
      }
    },
    "EnrollmentFlagsV3": {
      "type": "object",
      "properties": {
        "IncludeSymmetricAlgorithms": {
          "type": "boolean",
          "description": "Include symmetric algorithms allowed by the subject."
        },
        "UserInteractionRequired": {
          "type": "boolean",
          "description": "Require user interaction when the subject is enrolled and the private key associated with the certificate is used."
        },
        "RemoveInvalidCertificateFromPersonalStore": {
          "type": "boolean",
          "description": "Delete expired or revoked certificates instead of archiving them."
        },
        "NoSecurityExtension": {
          "type": "boolean",
          "description": "This flag instructs the CA to not include the security extension szOID_NTDS_CA_SECURITY_EXT (OID:1.3.6.1.4.1.311.25.2), as specified in [MS-WCCE] sections 2.2.2.7.7.4 and 3.2.2.6.2.1.4.5.9, in the issued certificate. This addresses a Windows Kerberos elevation-of-privilege vulnerability."
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull": {
          "type": "boolean",
          "description": "Allow renewal using the same key."
        }
      }
    },
    "EnrollmentFlagsV4": {
      "type": "object",
      "properties": {
        "IncludeSymmetricAlgorithms": {
          "type": "boolean",
          "description": "Include symmetric algorithms allowed by the subject."
        },
        "UserInteractionRequired": {
          "type": "boolean",
          "description": "Require user interaction when the subject is enrolled and the private key associated with the certificate is used."
        },
        "RemoveInvalidCertificateFromPersonalStore": {
          "type": "boolean",
          "description": "Delete expired or revoked certificates instead of archiving them."
        },
        "NoSecurityExtension": {
          "type": "boolean",
          "description": "This flag instructs the CA to not include the security extension szOID_NTDS_CA_SECURITY_EXT (OID:1.3.6.1.4.1.311.25.2), as specified in [MS-WCCE] sections 2.2.2.7.7.4 and 3.2.2.6.2.1.4.5.9, in the issued certificate. This addresses a Windows Kerberos elevation-of-privilege vulnerability."
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull": {
          "type": "boolean",
          "description": "Allow renewal using the same key."
        }
      }
    },
    "ExtensionsV2": {
      "type": "object",
      "properties": {
        "KeyUsage": {
          "$ref": "#/$defs/PcaConnectorAdKeyUsage"
        },
        "ApplicationPolicies": {
          "$ref": "#/$defs/ApplicationPolicies"
        }
      },
      "required": [
        "KeyUsage"
      ]
    },
    "ExtensionsV3": {
      "type": "object",
      "properties": {
        "KeyUsage": {
          "$ref": "#/$defs/PcaConnectorAdKeyUsage"
        },
        "ApplicationPolicies": {
          "$ref": "#/$defs/ApplicationPolicies"
        }
      },
      "required": [
        "KeyUsage"
      ]
    },
    "ExtensionsV4": {
      "type": "object",
      "properties": {
        "KeyUsage": {
          "$ref": "#/$defs/PcaConnectorAdKeyUsage"
        },
        "ApplicationPolicies": {
          "$ref": "#/$defs/ApplicationPolicies"
        }
      },
      "required": [
        "KeyUsage"
      ]
    },
    "GeneralFlagsV2": {
      "type": "object",
      "properties": {
        "AutoEnrollment": {
          "type": "boolean",
          "description": "Allows certificate issuance using autoenrollment. Set to TRUE to allow autoenrollment."
        },
        "MachineType": {
          "type": "boolean",
          "description": "Defines if the template is for machines or users. Set to TRUE if the template is for machines. Set to FALSE if the template is for users."
        }
      }
    },
    "GeneralFlagsV3": {
      "type": "object",
      "properties": {
        "AutoEnrollment": {
          "type": "boolean",
          "description": "Allows certificate issuance using autoenrollment. Set to TRUE to allow autoenrollment."
        },
        "MachineType": {
          "type": "boolean",
          "description": "Defines if the template is for machines or users. Set to TRUE if the template is for machines. Set to FALSE if the template is for users"
        }
      }
    },
    "GeneralFlagsV4": {
      "type": "object",
      "properties": {
        "AutoEnrollment": {
          "type": "boolean",
          "description": "Allows certificate issuance using autoenrollment. Set to TRUE to allow autoenrollment."
        },
        "MachineType": {
          "type": "boolean",
          "description": "Defines if the template is for machines or users. Set to TRUE if the template is for machines. Set to FALSE if the template is for users"
        }
      }
    },
    "KeyUsageFlags": {
      "type": "object",
      "properties": {
        "DigitalSignature": {
          "type": "boolean",
          "description": "The digitalSignature is asserted when the subject public key is used for verifying digital signatures."
        },
        "NonRepudiation": {
          "type": "boolean",
          "description": "NonRepudiation is asserted when the subject public key is used to verify digital signatures."
        },
        "KeyEncipherment": {
          "type": "boolean",
          "description": "KeyEncipherment is asserted when the subject public key is used for enciphering private or secret keys, i.e., for key transport."
        },
        "DataEncipherment": {
          "type": "boolean",
          "description": "DataEncipherment is asserted when the subject public key is used for directly enciphering raw user data without the use of an intermediate symmetric cipher."
        },
        "KeyAgreement": {
          "type": "boolean",
          "description": "KeyAgreement is asserted when the subject public key is used for key agreement."
        }
      }
    },
    "KeyUsageProperty": {
      "type": "object",
      "properties": {
        "PropertyType": {
          "type": "string",
          "enum": [
            "ALL"
          ],
          "description": "You can specify all key usages using property type ALL. You can use property type or property flags but not both."
        },
        "PropertyFlags": {
          "$ref": "#/$defs/KeyUsagePropertyFlags"
        }
      },
      "description": "Exactly one member is set."
    },
    "KeyUsagePropertyFlags": {
      "type": "object",
      "properties": {
        "Decrypt": {
          "type": "boolean",
          "description": "Allows key for encryption and decryption."
        },
        "KeyAgreement": {
          "type": "boolean",
          "description": "Allows key exchange without encryption."
        },
        "Sign": {
          "type": "boolean",
          "description": "Allow key use for digital signature."
        }
      }
    },
    "PcaConnectorAdKeyUsage": {
      "type": "object",
      "properties": {
        "Critical": {
          "type": "boolean",
          "description": "Sets the key usage extension to critical."
        },
        "UsageFlags": {
          "$ref": "#/$defs/KeyUsageFlags"
        }
      },
      "required": [
        "UsageFlags"
      ]
    },
    "PrivateKeyAttributesV2": {
      "type": "object",
      "properties": {
        "MinimalKeyLength": {
          "type": "integer",
          "description": "Set the minimum key length of the private key."
        },
        "KeySpec": {
          "type": "string",
          "enum": [
            "KEY_EXCHANGE",
            "SIGNATURE"
          ],
          "description": "Defines the purpose of the private key. Set it to \"KEY_EXCHANGE\" or \"SIGNATURE\" value."
        },
        "CryptoProviders": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Defines the cryptographic providers used to generate the private key."
        }
      },
      "required": [
        "MinimalKeyLength",
        "KeySpec"
      ]
    },
    "PrivateKeyAttributesV3": {
      "type": "object",
      "properties": {
        "MinimalKeyLength": {
          "type": "integer",
          "description": "Set the minimum key length of the private key."
        },
        "KeySpec": {
          "type": "string",
          "enum": [
            "KEY_EXCHANGE",
            "SIGNATURE"
          ],
          "description": "Defines the purpose of the private key. Set it to \"KEY_EXCHANGE\" or \"SIGNATURE\" value."
        },
        "CryptoProviders": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Defines the cryptographic providers used to generate the private key."
        },
        "KeyUsageProperty": {
          "$ref": "#/$defs/KeyUsageProperty"
        },
        "Algorithm": {
          "type": "string",
          "enum": [
            "RSA",
            "ECDH_P256",
            "ECDH_P384",
            "ECDH_P521"
          ],
          "description": "Defines the algorithm used to generate the private key."
        }
      },
      "required": [
        "MinimalKeyLength",
        "KeySpec",
        "KeyUsageProperty",
        "Algorithm"
      ]
    },
    "PrivateKeyAttributesV4": {
      "type": "object",
      "properties": {
        "MinimalKeyLength": {
          "type": "integer",
          "description": "Set the minimum key length of the private key."
        },
        "KeySpec": {
          "type": "string",
          "enum": [
            "KEY_EXCHANGE",
            "SIGNATURE"
          ],
          "description": "Defines the purpose of the private key. Set it to \"KEY_EXCHANGE\" or \"SIGNATURE\" value."
        },
        "CryptoProviders": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Defines the cryptographic providers used to generate the private key."
        },
        "KeyUsageProperty": {
          "$ref": "#/$defs/KeyUsageProperty"
        },
        "Algorithm": {
          "type": "string",
          "enum": [
            "RSA",
            "ECDH_P256",
            "ECDH_P384",
            "ECDH_P521"
          ],
          "description": "Defines the algorithm used to generate the private key."
        }
      },
      "required": [
        "MinimalKeyLength",
        "KeySpec"
      ]
    },
    "PrivateKeyFlagsV2": {
      "type": "object",
      "properties": {
        "ExportableKey": {
          "type": "boolean",
          "description": "Allows the private key to be exported."
        },
        "StrongKeyProtectionRequired": {
          "type": "boolean",
          "description": "Require user input when using the private key for enrollment."
        },
        "ClientVersion": {
          "type": "string",
          "enum": [
            "WINDOWS_SERVER_2003",
            "WINDOWS_SERVER_2008",
            "WINDOWS_SERVER_2008_R2",
            "WINDOWS_SERVER_2012",
            "WINDOWS_SERVER_2012_R2",
            "WINDOWS_SERVER_2016"
          ],
          "description": "Defines the minimum client compatibility."
        }
      },
      "required": [
        "ClientVersion"
      ]
    },
    "PrivateKeyFlagsV3": {
      "type": "object",
      "properties": {
        "ExportableKey": {
          "type": "boolean",
          "description": "Allows the private key to be exported."
        },
        "StrongKeyProtectionRequired": {
          "type": "boolean",
          "description": "Requirer user input when using the private key for enrollment."
        },
        "RequireAlternateSignatureAlgorithm": {
          "type": "boolean",
          "description": "Reguires the PKCS #1 v2.1 signature format for certificates. You should verify that your CA, objects, and applications can accept this signature format."
        },
        "ClientVersion": {
          "type": "string",
          "enum": [
            "WINDOWS_SERVER_2008",
            "WINDOWS_SERVER_2008_R2",
            "WINDOWS_SERVER_2012",
            "WINDOWS_SERVER_2012_R2",
            "WINDOWS_SERVER_2016"
          ],
          "description": "Defines the minimum client compatibility."
        }
      },
      "required": [
        "ClientVersion"
      ]
    },
    "PrivateKeyFlagsV4": {
      "type": "object",
      "properties": {
        "ExportableKey": {
          "type": "boolean",
          "description": "Allows the private key to be exported."
        },
        "StrongKeyProtectionRequired": {
          "type": "boolean",
          "description": "Require user input when using the private key for enrollment."
        },
        "RequireAlternateSignatureAlgorithm": {
          "type": "boolean",
          "description": "Requires the PKCS #1 v2.1 signature format for certificates. You should verify that your CA, objects, and applications can accept this signature format."
        },
        "RequireSameKeyRenewal": {
          "type": "boolean",
          "description": "Renew certificate using the same private key."
        },
        "UseLegacyProvider": {
          "type": "boolean",
          "description": "Specifies the cryptographic service provider category used to generate private keys. Set to TRUE to use Legacy Cryptographic Service Providers and FALSE to use Key Storage Providers."
        },
        "ClientVersion": {
          "type": "string",
          "enum": [
            "WINDOWS_SERVER_2012",
            "WINDOWS_SERVER_2012_R2",
            "WINDOWS_SERVER_2016"
          ],
          "description": "Defines the minimum client compatibility."
        }
      },
      "required": [
        "ClientVersion"
      ]
    },
    "SubjectNameFlagsV2": {
      "type": "object",
      "properties": {
        "SanRequireDomainDns": {
          "type": "boolean",
          "description": "Include the domain DNS in the subject alternate name."
        },
        "SanRequireSpn": {
          "type": "boolean",
          "description": "Include the service principal name (SPN) in the subject alternate name."
        },
        "SanRequireDirectoryGuid": {
          "type": "boolean",
          "description": "Include the globally unique identifier (GUID) in the subject alternate name."
        },
        "SanRequireUpn": {
          "type": "boolean",
          "description": "Include the user principal name (UPN) in the subject alternate name."
        },
        "SanRequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject alternate name."
        },
        "SanRequireDns": {
          "type": "boolean",
          "description": "Include the DNS in the subject alternate name."
        },
        "RequireDnsAsCn": {
          "type": "boolean",
          "description": "Include the DNS as common name in the subject name."
        },
        "RequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject name."
        },
        "RequireCommonName": {
          "type": "boolean",
          "description": "Include the common name in the subject name."
        },
        "RequireDirectoryPath": {
          "type": "boolean",
          "description": "Include the directory path in the subject name."
        }
      }
    },
    "SubjectNameFlagsV3": {
      "type": "object",
      "properties": {
        "SanRequireDomainDns": {
          "type": "boolean",
          "description": "Include the domain DNS in the subject alternate name."
        },
        "SanRequireSpn": {
          "type": "boolean",
          "description": "Include the service principal name (SPN) in the subject alternate name."
        },
        "SanRequireDirectoryGuid": {
          "type": "boolean",
          "description": "Include the globally unique identifier (GUID) in the subject alternate name."
        },
        "SanRequireUpn": {
          "type": "boolean",
          "description": "Include the user principal name (UPN) in the subject alternate name."
        },
        "SanRequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject alternate name."
        },
        "SanRequireDns": {
          "type": "boolean",
          "description": "Include the DNS in the subject alternate name."
        },
        "RequireDnsAsCn": {
          "type": "boolean",
          "description": "Include the DNS as common name in the subject name."
        },
        "RequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject name."
        },
        "RequireCommonName": {
          "type": "boolean",
          "description": "Include the common name in the subject name."
        },
        "RequireDirectoryPath": {
          "type": "boolean",
          "description": "Include the directory path in the subject name."
        }
      }
    },
    "SubjectNameFlagsV4": {
      "type": "object",
      "properties": {
        "SanRequireDomainDns": {
          "type": "boolean",
          "description": "Include the domain DNS in the subject alternate name."
        },
        "SanRequireSpn": {
          "type": "boolean",
          "description": "Include the service principal name (SPN) in the subject alternate name."
        },
        "SanRequireDirectoryGuid": {
          "type": "boolean",
          "description": "Include the globally unique identifier (GUID) in the subject alternate name."
        },
        "SanRequireUpn": {
          "type": "boolean",
          "description": "Include the user principal name (UPN) in the subject alternate name."
        },
        "SanRequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject alternate name."
        },
        "SanRequireDns": {
          "type": "boolean",
          "description": "Include the DNS in the subject alternate name."
        },
        "RequireDnsAsCn": {
          "type": "boolean",
          "description": "Include the DNS as common name in the subject name."
        },
        "RequireEmail": {
          "type": "boolean",
          "description": "Include the subject's email in the subject name."
        },
        "RequireCommonName": {
          "type": "boolean",
          "description": "Include the common name in the subject name."
        },
        "RequireDirectoryPath": {
          "type": "boolean",
          "description": "Include the directory path in the subject name."
        }
      }
    },
    "TemplateDefinition": {
      "type": "object",
      "properties": {
        "TemplateV2": {
          "$ref": "#/$defs/TemplateV2"
        },
        "TemplateV3": {
          "$ref": "#/$defs/TemplateV3"
        },
        "TemplateV4": {
          "$ref": "#/$defs/TemplateV4"
        }
      },
      "description": "Exactly one member is set."
    },
    "TemplateV2": {
      "type": "object",
      "properties": {
        "CertificateValidity": {
          "$ref": "#/$defs/CertificateValidity"
        },
        "SupersededTemplates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of templates in Active Directory that are superseded by this template."
        },
        "PrivateKeyAttributes": {
          "$ref": "#/$defs/PrivateKeyAttributesV2"
        },
        "PrivateKeyFlags": {
          "$ref": "#/$defs/PrivateKeyFlagsV2"
        },
        "EnrollmentFlags": {
          "$ref": "#/$defs/EnrollmentFlagsV2"
        },
        "SubjectNameFlags": {
          "$ref": "#/$defs/SubjectNameFlagsV2"
        },
        "GeneralFlags": {
          "$ref": "#/$defs/GeneralFlagsV2"
        },
        "Extensions": {
          "$ref": "#/$defs/ExtensionsV2"
        }
      },
      "required": [
        "CertificateValidity",
        "PrivateKeyAttributes",
        "PrivateKeyFlags",
        "EnrollmentFlags",
        "SubjectNameFlags",
        "GeneralFlags",
        "Extensions"
      ]
    },
    "TemplateV3": {
      "type": "object",
      "properties": {
        "CertificateValidity": {
          "$ref": "#/$defs/CertificateValidity"
        },
        "SupersededTemplates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of templates in Active Directory that are superseded by this template."
        },
        "PrivateKeyAttributes": {
          "$ref": "#/$defs/PrivateKeyAttributesV3"
        },
        "PrivateKeyFlags": {
          "$ref": "#/$defs/PrivateKeyFlagsV3"
        },
        "EnrollmentFlags": {
          "$ref": "#/$defs/EnrollmentFlagsV3"
        },
        "SubjectNameFlags": {
          "$ref": "#/$defs/SubjectNameFlagsV3"
        },
        "GeneralFlags": {
          "$ref": "#/$defs/GeneralFlagsV3"
        },
        "HashAlgorithm": {
          "type": "string",
          "enum": [
            "SHA256",
            "SHA384",
            "SHA512"
          ],
          "description": "Specifies the hash algorithm used to hash the private key."
        },
        "Extensions": {
          "$ref": "#/$defs/ExtensionsV3"
        }
      },
      "required": [
        "CertificateValidity",
        "PrivateKeyAttributes",
        "PrivateKeyFlags",
        "EnrollmentFlags",
        "SubjectNameFlags",
        "GeneralFlags",
        "HashAlgorithm",
        "Extensions"
      ]
    },
    "TemplateV4": {
      "type": "object",
      "properties": {
        "CertificateValidity": {
          "$ref": "#/$defs/CertificateValidity"
        },
        "SupersededTemplates": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of templates in Active Directory that are superseded by this template."
        },
        "PrivateKeyAttributes": {
          "$ref": "#/$defs/PrivateKeyAttributesV4"
        },
        "PrivateKeyFlags": {
          "$ref": "#/$defs/PrivateKeyFlagsV4"
        },
        "EnrollmentFlags": {
          "$ref": "#/$defs/EnrollmentFlagsV4"
        },
        "SubjectNameFlags": {
          "$ref": "#/$defs/SubjectNameFlagsV4"
        },
        "GeneralFlags": {
          "$ref": "#/$defs/GeneralFlagsV4"
        },
        "HashAlgorithm": {
          "type": "string",
          "enum": [
            "SHA256",
            "SHA384",
            "SHA512"
          ],
          "description": "Specifies the hash algorithm used to hash the private key. Hash algorithm can only be specified when using Key Storage Providers."
        },
        "Extensions": {
          "$ref": "#/$defs/ExtensionsV4"
        }
      },
      "required": [
        "CertificateValidity",
        "PrivateKeyAttributes",
        "PrivateKeyFlags",
        "EnrollmentFlags",
        "SubjectNameFlags",
        "GeneralFlags",
        "Extensions"
      ]
    },
    "ValidityPeriod": {
      "type": "object",
      "properties": {
        "PeriodType": {
          "type": "string",
          "enum": [
            "HOURS",
            "DAYS",
            "WEEKS",
            "MONTHS",
            "YEARS"
          ],
          "description": "The unit of time. You can select hours, days, weeks, months, and years."
        },
        "Period": {
          "type": "integer",
          "description": "The numeric value for the validity period."
        }
      },
      "required": [
        "PeriodType",
        "Period"
      ]
    }
  }
}