def validate_certificateauthority_type(certificateauthority_type):
    """
    CertificateAuthority Type validation rule.
    Property: CertificateAuthority.Type
    """

    VALID_CERTIFICATEAUTHORITY_TYPE = ("ROOT", "SUBORDINATE")

    if certificateauthority_type not in VALID_CERTIFICATEAUTHORITY_TYPE:
        raise ValueError(
            "CertificateAuthority Type must be one of: %s"
            % ", ".join(VALID_CERTIFICATEAUTHORITY_TYPE)
        )
    return certificateauthority_type