def METHOD_NAME(values):
    """validate and add ssh key to the list"""
    key_data = []
    for key in values:
        # Casting is necessary to get away from the custom type AAZSimpleType wrapping the string we want
        key = str(key)
        try:
            if keys.is_valid_ssh_rsa_public_key(key):
                key_data.append({"keyData": key})
        except Exception as excep:
            raise InvalidArgumentValueError(
                f"Unsupported Key is provided.\nContent:\n{key}"
            ) from excep
    return key_data