The boys gave Rama the captain's position. / The boys gave the captain's position to Rama.
The first of these sentences uses an indirect object. The second uses a prepositional phrase to do the same job: it represents the recipient of the direct object.* Rama is the one to whom the position is given.
And now, for something completely different:
The boys made Rama captain.
Here, there is no indirect object. The direct object has no recipient. There is no answer to the question "to whom?"
Instead, we have an object complement. Specifically, it's a predicate nominative object complement.
Even when they're nominative, complements are not objects. They're a different kind of argument. The point of a complement is that it uses the referent of whatever it completes. In this case, the common noun "captain" represents the same person (shares the same referent) as the proper noun Rama.
The other type of complement is adjectival:
The boys made Rama happy.
Here, the adjective "happy" doesn't resemble an object. Instead, it's an attribute of the direct object and a result of the action of the verb. The boys caused Ramda's happiness.
The objects in your example sentence are all direct objects. The thing that they have in common is that they are incomplete direct objects. They are objects that don't make sense (or, at least, don't make the same kind of sense) unless they have object complements.
The sentence pattern in question is:
Subject / (Complexly Transitive) Verb / Direct Object / Object Complement.
* Another common semantic role that an indirect object plays is beneficiary of the action. Rather than "to whom?", it answers "for whom?", as in "I did you a favor." / "I did a favor for you."