def get_action_by_name(client, cluster, name):
    """
    Get action by name from some object

    Args:
        client: ADCM client API objects
        cluster: cluster object
        name: action name

    Returns:
        (action object): Action object by name

    Raises:
        :py:class:`ValueError`
            If action is not found

    """
    action_list = client.cluster.action.list(cluster_id=cluster['id'])
    for action in action_list:
        if action['name'] == name:
            return action
    raise ValueError(f"Action with name '{name}' is not found in cluster '{cluster}'")