Changed the way of get the name

was changed the way of get the name of the resources, are omitted the namespace and nested resources