{
  "typeName" : "AWS::PCAConnectorAD::Template",
  "description" : "Represents a template that defines certificate configurations, both for issuance and client handling",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-pcaconnectorad",
  "definitions" : {
    "ApplicationPolicies" : {
      "type" : "object",
      "properties" : {
        "Critical" : {
          "type" : "boolean"
        },
        "Policies" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/ApplicationPolicy"
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        }
      },
      "required" : [ "Policies" ],
      "additionalProperties" : false
    },
    "ApplicationPolicy" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "PolicyType",
        "properties" : {
          "PolicyType" : {
            "$ref" : "#/definitions/ApplicationPolicyType"
          }
        },
        "required" : [ "PolicyType" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "PolicyObjectIdentifier",
        "properties" : {
          "PolicyObjectIdentifier" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 1,
            "pattern" : "^([0-2])\\.([0-9]|([0-3][0-9]))(\\.([0-9]+)){0,126}$"
          }
        },
        "required" : [ "PolicyObjectIdentifier" ],
        "additionalProperties" : false
      } ]
    },
    "ApplicationPolicyType" : {
      "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" ]
    },
    "CertificateValidity" : {
      "type" : "object",
      "properties" : {
        "ValidityPeriod" : {
          "$ref" : "#/definitions/ValidityPeriod"
        },
        "RenewalPeriod" : {
          "$ref" : "#/definitions/ValidityPeriod"
        }
      },
      "required" : [ "RenewalPeriod", "ValidityPeriod" ],
      "additionalProperties" : false
    },
    "ClientCompatibilityV2" : {
      "type" : "string",
      "enum" : [ "WINDOWS_SERVER_2003", "WINDOWS_SERVER_2008", "WINDOWS_SERVER_2008_R2", "WINDOWS_SERVER_2012", "WINDOWS_SERVER_2012_R2", "WINDOWS_SERVER_2016" ]
    },
    "ClientCompatibilityV3" : {
      "type" : "string",
      "enum" : [ "WINDOWS_SERVER_2008", "WINDOWS_SERVER_2008_R2", "WINDOWS_SERVER_2012", "WINDOWS_SERVER_2012_R2", "WINDOWS_SERVER_2016" ]
    },
    "ClientCompatibilityV4" : {
      "type" : "string",
      "enum" : [ "WINDOWS_SERVER_2012", "WINDOWS_SERVER_2012_R2", "WINDOWS_SERVER_2016" ]
    },
    "EnrollmentFlagsV2" : {
      "type" : "object",
      "properties" : {
        "IncludeSymmetricAlgorithms" : {
          "type" : "boolean"
        },
        "UserInteractionRequired" : {
          "type" : "boolean"
        },
        "RemoveInvalidCertificateFromPersonalStore" : {
          "type" : "boolean"
        },
        "NoSecurityExtension" : {
          "type" : "boolean"
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "EnrollmentFlagsV3" : {
      "type" : "object",
      "properties" : {
        "IncludeSymmetricAlgorithms" : {
          "type" : "boolean"
        },
        "UserInteractionRequired" : {
          "type" : "boolean"
        },
        "RemoveInvalidCertificateFromPersonalStore" : {
          "type" : "boolean"
        },
        "NoSecurityExtension" : {
          "type" : "boolean"
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "EnrollmentFlagsV4" : {
      "type" : "object",
      "properties" : {
        "IncludeSymmetricAlgorithms" : {
          "type" : "boolean"
        },
        "UserInteractionRequired" : {
          "type" : "boolean"
        },
        "RemoveInvalidCertificateFromPersonalStore" : {
          "type" : "boolean"
        },
        "NoSecurityExtension" : {
          "type" : "boolean"
        },
        "EnableKeyReuseOnNtTokenKeysetStorageFull" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "ExtensionsV2" : {
      "type" : "object",
      "properties" : {
        "KeyUsage" : {
          "$ref" : "#/definitions/KeyUsage"
        },
        "ApplicationPolicies" : {
          "$ref" : "#/definitions/ApplicationPolicies"
        }
      },
      "required" : [ "KeyUsage" ],
      "additionalProperties" : false
    },
    "ExtensionsV3" : {
      "type" : "object",
      "properties" : {
        "KeyUsage" : {
          "$ref" : "#/definitions/KeyUsage"
        },
        "ApplicationPolicies" : {
          "$ref" : "#/definitions/ApplicationPolicies"
        }
      },
      "required" : [ "KeyUsage" ],
      "additionalProperties" : false
    },
    "ExtensionsV4" : {
      "type" : "object",
      "properties" : {
        "KeyUsage" : {
          "$ref" : "#/definitions/KeyUsage"
        },
        "ApplicationPolicies" : {
          "$ref" : "#/definitions/ApplicationPolicies"
        }
      },
      "required" : [ "KeyUsage" ],
      "additionalProperties" : false
    },
    "GeneralFlagsV2" : {
      "type" : "object",
      "properties" : {
        "AutoEnrollment" : {
          "type" : "boolean"
        },
        "MachineType" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "GeneralFlagsV3" : {
      "type" : "object",
      "properties" : {
        "AutoEnrollment" : {
          "type" : "boolean"
        },
        "MachineType" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "GeneralFlagsV4" : {
      "type" : "object",
      "properties" : {
        "AutoEnrollment" : {
          "type" : "boolean"
        },
        "MachineType" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "HashAlgorithm" : {
      "type" : "string",
      "enum" : [ "SHA256", "SHA384", "SHA512" ]
    },
    "KeySpec" : {
      "type" : "string",
      "enum" : [ "KEY_EXCHANGE", "SIGNATURE" ]
    },
    "KeyUsage" : {
      "type" : "object",
      "properties" : {
        "Critical" : {
          "type" : "boolean"
        },
        "UsageFlags" : {
          "$ref" : "#/definitions/KeyUsageFlags"
        }
      },
      "required" : [ "UsageFlags" ],
      "additionalProperties" : false
    },
    "KeyUsageFlags" : {
      "type" : "object",
      "properties" : {
        "DigitalSignature" : {
          "type" : "boolean"
        },
        "NonRepudiation" : {
          "type" : "boolean"
        },
        "KeyEncipherment" : {
          "type" : "boolean"
        },
        "DataEncipherment" : {
          "type" : "boolean"
        },
        "KeyAgreement" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "KeyUsageProperty" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "PropertyType",
        "properties" : {
          "PropertyType" : {
            "$ref" : "#/definitions/KeyUsagePropertyType"
          }
        },
        "required" : [ "PropertyType" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "PropertyFlags",
        "properties" : {
          "PropertyFlags" : {
            "$ref" : "#/definitions/KeyUsagePropertyFlags"
          }
        },
        "required" : [ "PropertyFlags" ],
        "additionalProperties" : false
      } ]
    },
    "KeyUsagePropertyFlags" : {
      "type" : "object",
      "properties" : {
        "Decrypt" : {
          "type" : "boolean"
        },
        "KeyAgreement" : {
          "type" : "boolean"
        },
        "Sign" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "KeyUsagePropertyType" : {
      "type" : "string",
      "enum" : [ "ALL" ]
    },
    "PrivateKeyAlgorithm" : {
      "type" : "string",
      "enum" : [ "RSA", "ECDH_P256", "ECDH_P384", "ECDH_P521" ]
    },
    "PrivateKeyAttributesV2" : {
      "type" : "object",
      "properties" : {
        "MinimalKeyLength" : {
          "type" : "number",
          "minimum" : 1
        },
        "KeySpec" : {
          "$ref" : "#/definitions/KeySpec"
        },
        "CryptoProviders" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 100,
            "minLength" : 1
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        }
      },
      "required" : [ "KeySpec", "MinimalKeyLength" ],
      "additionalProperties" : false
    },
    "PrivateKeyAttributesV3" : {
      "type" : "object",
      "properties" : {
        "MinimalKeyLength" : {
          "type" : "number",
          "minimum" : 1
        },
        "KeySpec" : {
          "$ref" : "#/definitions/KeySpec"
        },
        "CryptoProviders" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 100,
            "minLength" : 1
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        },
        "KeyUsageProperty" : {
          "$ref" : "#/definitions/KeyUsageProperty"
        },
        "Algorithm" : {
          "$ref" : "#/definitions/PrivateKeyAlgorithm"
        }
      },
      "required" : [ "Algorithm", "KeySpec", "KeyUsageProperty", "MinimalKeyLength" ],
      "additionalProperties" : false
    },
    "PrivateKeyAttributesV4" : {
      "type" : "object",
      "properties" : {
        "MinimalKeyLength" : {
          "type" : "number",
          "minimum" : 1
        },
        "KeySpec" : {
          "$ref" : "#/definitions/KeySpec"
        },
        "CryptoProviders" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 100,
            "minLength" : 1
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        },
        "KeyUsageProperty" : {
          "$ref" : "#/definitions/KeyUsageProperty"
        },
        "Algorithm" : {
          "$ref" : "#/definitions/PrivateKeyAlgorithm"
        }
      },
      "required" : [ "KeySpec", "MinimalKeyLength" ],
      "additionalProperties" : false
    },
    "PrivateKeyFlagsV2" : {
      "type" : "object",
      "properties" : {
        "ExportableKey" : {
          "type" : "boolean"
        },
        "StrongKeyProtectionRequired" : {
          "type" : "boolean"
        },
        "ClientVersion" : {
          "$ref" : "#/definitions/ClientCompatibilityV2"
        }
      },
      "required" : [ "ClientVersion" ],
      "additionalProperties" : false
    },
    "PrivateKeyFlagsV3" : {
      "type" : "object",
      "properties" : {
        "ExportableKey" : {
          "type" : "boolean"
        },
        "StrongKeyProtectionRequired" : {
          "type" : "boolean"
        },
        "RequireAlternateSignatureAlgorithm" : {
          "type" : "boolean"
        },
        "ClientVersion" : {
          "$ref" : "#/definitions/ClientCompatibilityV3"
        }
      },
      "required" : [ "ClientVersion" ],
      "additionalProperties" : false
    },
    "PrivateKeyFlagsV4" : {
      "type" : "object",
      "properties" : {
        "ExportableKey" : {
          "type" : "boolean"
        },
        "StrongKeyProtectionRequired" : {
          "type" : "boolean"
        },
        "RequireAlternateSignatureAlgorithm" : {
          "type" : "boolean"
        },
        "RequireSameKeyRenewal" : {
          "type" : "boolean"
        },
        "UseLegacyProvider" : {
          "type" : "boolean"
        },
        "ClientVersion" : {
          "$ref" : "#/definitions/ClientCompatibilityV4"
        }
      },
      "required" : [ "ClientVersion" ],
      "additionalProperties" : false
    },
    "SubjectNameFlagsV2" : {
      "type" : "object",
      "properties" : {
        "SanRequireDomainDns" : {
          "type" : "boolean"
        },
        "SanRequireSpn" : {
          "type" : "boolean"
        },
        "SanRequireDirectoryGuid" : {
          "type" : "boolean"
        },
        "SanRequireUpn" : {
          "type" : "boolean"
        },
        "SanRequireEmail" : {
          "type" : "boolean"
        },
        "SanRequireDns" : {
          "type" : "boolean"
        },
        "RequireDnsAsCn" : {
          "type" : "boolean"
        },
        "RequireEmail" : {
          "type" : "boolean"
        },
        "RequireCommonName" : {
          "type" : "boolean"
        },
        "RequireDirectoryPath" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "SubjectNameFlagsV3" : {
      "type" : "object",
      "properties" : {
        "SanRequireDomainDns" : {
          "type" : "boolean"
        },
        "SanRequireSpn" : {
          "type" : "boolean"
        },
        "SanRequireDirectoryGuid" : {
          "type" : "boolean"
        },
        "SanRequireUpn" : {
          "type" : "boolean"
        },
        "SanRequireEmail" : {
          "type" : "boolean"
        },
        "SanRequireDns" : {
          "type" : "boolean"
        },
        "RequireDnsAsCn" : {
          "type" : "boolean"
        },
        "RequireEmail" : {
          "type" : "boolean"
        },
        "RequireCommonName" : {
          "type" : "boolean"
        },
        "RequireDirectoryPath" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "SubjectNameFlagsV4" : {
      "type" : "object",
      "properties" : {
        "SanRequireDomainDns" : {
          "type" : "boolean"
        },
        "SanRequireSpn" : {
          "type" : "boolean"
        },
        "SanRequireDirectoryGuid" : {
          "type" : "boolean"
        },
        "SanRequireUpn" : {
          "type" : "boolean"
        },
        "SanRequireEmail" : {
          "type" : "boolean"
        },
        "SanRequireDns" : {
          "type" : "boolean"
        },
        "RequireDnsAsCn" : {
          "type" : "boolean"
        },
        "RequireEmail" : {
          "type" : "boolean"
        },
        "RequireCommonName" : {
          "type" : "boolean"
        },
        "RequireDirectoryPath" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "Tags" : {
      "type" : "object",
      "patternProperties" : {
        ".+" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "TemplateDefinition" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "TemplateV2",
        "properties" : {
          "TemplateV2" : {
            "$ref" : "#/definitions/TemplateV2"
          }
        },
        "required" : [ "TemplateV2" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "TemplateV3",
        "properties" : {
          "TemplateV3" : {
            "$ref" : "#/definitions/TemplateV3"
          }
        },
        "required" : [ "TemplateV3" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "TemplateV4",
        "properties" : {
          "TemplateV4" : {
            "$ref" : "#/definitions/TemplateV4"
          }
        },
        "required" : [ "TemplateV4" ],
        "additionalProperties" : false
      } ]
    },
    "TemplateV2" : {
      "type" : "object",
      "properties" : {
        "CertificateValidity" : {
          "$ref" : "#/definitions/CertificateValidity"
        },
        "SupersededTemplates" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 1,
            "pattern" : "^(?!^\\s+$)((?![\\x5c'\\x2b,;<=>#\\x22])([\\x20-\\x7E]))+$"
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        },
        "PrivateKeyAttributes" : {
          "$ref" : "#/definitions/PrivateKeyAttributesV2"
        },
        "PrivateKeyFlags" : {
          "$ref" : "#/definitions/PrivateKeyFlagsV2"
        },
        "EnrollmentFlags" : {
          "$ref" : "#/definitions/EnrollmentFlagsV2"
        },
        "SubjectNameFlags" : {
          "$ref" : "#/definitions/SubjectNameFlagsV2"
        },
        "GeneralFlags" : {
          "$ref" : "#/definitions/GeneralFlagsV2"
        },
        "Extensions" : {
          "$ref" : "#/definitions/ExtensionsV2"
        }
      },
      "required" : [ "CertificateValidity", "EnrollmentFlags", "Extensions", "GeneralFlags", "PrivateKeyAttributes", "PrivateKeyFlags", "SubjectNameFlags" ],
      "additionalProperties" : false
    },
    "TemplateV3" : {
      "type" : "object",
      "properties" : {
        "CertificateValidity" : {
          "$ref" : "#/definitions/CertificateValidity"
        },
        "SupersededTemplates" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 1,
            "pattern" : "^(?!^\\s+$)((?![\\x5c'\\x2b,;<=>#\\x22])([\\x20-\\x7E]))+$"
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        },
        "PrivateKeyAttributes" : {
          "$ref" : "#/definitions/PrivateKeyAttributesV3"
        },
        "PrivateKeyFlags" : {
          "$ref" : "#/definitions/PrivateKeyFlagsV3"
        },
        "EnrollmentFlags" : {
          "$ref" : "#/definitions/EnrollmentFlagsV3"
        },
        "SubjectNameFlags" : {
          "$ref" : "#/definitions/SubjectNameFlagsV3"
        },
        "GeneralFlags" : {
          "$ref" : "#/definitions/GeneralFlagsV3"
        },
        "HashAlgorithm" : {
          "$ref" : "#/definitions/HashAlgorithm"
        },
        "Extensions" : {
          "$ref" : "#/definitions/ExtensionsV3"
        }
      },
      "required" : [ "CertificateValidity", "EnrollmentFlags", "Extensions", "GeneralFlags", "HashAlgorithm", "PrivateKeyAttributes", "PrivateKeyFlags", "SubjectNameFlags" ],
      "additionalProperties" : false
    },
    "TemplateV4" : {
      "type" : "object",
      "properties" : {
        "CertificateValidity" : {
          "$ref" : "#/definitions/CertificateValidity"
        },
        "SupersededTemplates" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 64,
            "minLength" : 1,
            "pattern" : "^(?!^\\s+$)((?![\\x5c'\\x2b,;<=>#\\x22])([\\x20-\\x7E]))+$"
          },
          "maxItems" : 100,
          "minItems" : 1,
          "uniqueItems" : true
        },
        "PrivateKeyAttributes" : {
          "$ref" : "#/definitions/PrivateKeyAttributesV4"
        },
        "PrivateKeyFlags" : {
          "$ref" : "#/definitions/PrivateKeyFlagsV4"
        },
        "EnrollmentFlags" : {
          "$ref" : "#/definitions/EnrollmentFlagsV4"
        },
        "SubjectNameFlags" : {
          "$ref" : "#/definitions/SubjectNameFlagsV4"
        },
        "GeneralFlags" : {
          "$ref" : "#/definitions/GeneralFlagsV4"
        },
        "HashAlgorithm" : {
          "$ref" : "#/definitions/HashAlgorithm"
        },
        "Extensions" : {
          "$ref" : "#/definitions/ExtensionsV4"
        }
      },
      "required" : [ "CertificateValidity", "EnrollmentFlags", "Extensions", "GeneralFlags", "PrivateKeyAttributes", "PrivateKeyFlags", "SubjectNameFlags" ],
      "additionalProperties" : false
    },
    "ValidityPeriod" : {
      "type" : "object",
      "properties" : {
        "PeriodType" : {
          "$ref" : "#/definitions/ValidityPeriodType"
        },
        "Period" : {
          "type" : "number",
          "maximum" : 8766000,
          "minimum" : 1
        }
      },
      "required" : [ "Period", "PeriodType" ],
      "additionalProperties" : false
    },
    "ValidityPeriodType" : {
      "type" : "string",
      "enum" : [ "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" ]
    }
  },
  "properties" : {
    "ConnectorArn" : {
      "type" : "string",
      "maxLength" : 200,
      "minLength" : 5,
      "pattern" : "^arn:[\\w-]+:pca-connector-ad:[\\w-]+:[0-9]+:connector\\/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
    },
    "Definition" : {
      "$ref" : "#/definitions/TemplateDefinition"
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 64,
      "minLength" : 1,
      "pattern" : "^(?!^\\s+$)((?![\\x5c'\\x2b,;<=>#\\x22])([\\x20-\\x7E]))+$"
    },
    "ReenrollAllCertificateHolders" : {
      "type" : "boolean"
    },
    "Tags" : {
      "$ref" : "#/definitions/Tags"
    },
    "TemplateArn" : {
      "type" : "string",
      "maxLength" : 200,
      "minLength" : 5,
      "pattern" : "^arn:[\\w-]+:pca-connector-ad:[\\w-]+:[0-9]+:connector\\/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\\/template\\/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
    }
  },
  "required" : [ "ConnectorArn", "Definition", "Name" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "pca-connector-ad:ListTagsForResource", "pca-connector-ad:TagResource", "pca-connector-ad:UntagResource" ]
  },
  "readOnlyProperties" : [ "/properties/TemplateArn" ],
  "writeOnlyProperties" : [ "/properties/ReenrollAllCertificateHolders" ],
  "createOnlyProperties" : [ "/properties/ConnectorArn", "/properties/Name" ],
  "primaryIdentifier" : [ "/properties/TemplateArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "pca-connector-ad:CreateTemplate", "pca-connector-ad:TagResource" ]
    },
    "read" : {
      "permissions" : [ "pca-connector-ad:GetTemplate", "pca-connector-ad:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "pca-connector-ad:ListTagsForResource", "pca-connector-ad:TagResource", "pca-connector-ad:UntagResource", "pca-connector-ad:UpdateTemplate" ]
    },
    "delete" : {
      "permissions" : [ "pca-connector-ad:GetTemplate", "pca-connector-ad:DeleteTemplate", "pca-connector-ad:UntagResource" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "ConnectorArn" : {
            "$ref" : "resource-schema.json#/properties/ConnectorArn"
          }
        },
        "required" : [ "ConnectorArn" ]
      },
      "permissions" : [ "pca-connector-ad:ListTemplates" ]
    }
  },
  "additionalProperties" : false
}