Tagging all the applications

I am trying to add the tag for all the application names under an ECSservice.Please help me with the query I should be using.