Here is an example, taken from Symfony2 website, about defining a custom service (YAML notation):
services: newsletter_manager:
you can use following command to get desired service details:
php app/console container:debug | grep service_name