def get_resource_id_from_type_name(type_name):
    """Returns the key from type_name.

    Args:
        type_name (str): Type name.

    Returns:
        str: Resource id.
    """
    if '/' in type_name:
        return type_name.split('/')[-1]
    return type_name