A rotating apparatus (1; 1A; 1B) that integrally comprises a rotating electrical machine (100; 100A; 100B) having one of a field system and an armature serving as a rotator and the other of the field system and the armature serving as a stator , and a reduction device (200; 200B), wherein: said rotating electrical machine (100; 100A; 100B) has a rotating shaft fixed to said rotator ; the stator comprises a laminated core , a bobbin , and a coil wire ; said reduction device (200; 200B) has a housing (201; 201B), an input shaft , and an output shaft extending along a direction orthogonal to said input shaft ; and said rotating shaft of said rotating electrical machine (100; 100A; 100B) and said input shaft of said reduction device (200; 200B) are integrally formed into a single shaft; characterised in that : the input shaft is provided with a roller gear cam , and the output shaft is provided on its outer periphery with cam followers configured to sequentially engage with said roller gear cam ; the laminated core , the bobbin , and the coil wire are molded by a resin such that said resin covers the outer circumference of the end windings formed by the coil wire ; the housing (201; 201B) comprises a step portion at an opening on a side facing the rotating electrical machine (100; 100A; 100B) ; an inner peripheral surface of the step portion and an outer peripheral surface of the resin covering the outer circumference of the end winding facing the housing (201; 201B) are engaged, thereby the step portion and the resin that covers the outer circumference of the end winding facing the housing (201; 201B) are inlaid and connected. said rotating electrical machine (100; 100A; 100B) has a rotating shaft fixed to said rotator ; the stator comprises a laminated core , a bobbin , and a coil wire ; said reduction device (200; 200B) has a housing (201; 201B), an input shaft , and an output shaft extending along a direction orthogonal to said input shaft ; and said rotating shaft of said rotating electrical machine (100; 100A; 100B) and said input shaft of said reduction device (200; 200B) are integrally formed into a single shaft; characterised in that : the input shaft is provided with a roller gear cam , and the output shaft is provided on its outer periphery with cam followers configured to sequentially engage with said roller gear cam ; the laminated core , the bobbin , and the coil wire are molded by a resin such that said resin covers the outer circumference of the end windings formed by the coil wire ; the housing (201; 201B) comprises a step portion at an opening on a side facing the rotating electrical machine (100; 100A; 100B) ; an inner peripheral surface of the step portion and an outer peripheral surface of the resin covering the outer circumference of the end winding facing the housing (201; 201B) are engaged, thereby the step portion and the resin that covers the outer circumference of the end winding facing the housing (201; 201B) are inlaid and connected. the input shaft is provided with a roller gear cam , and the output shaft is provided on its outer periphery with cam followers configured to sequentially engage with said roller gear cam ; the laminated core , the bobbin , and the coil wire are molded by a resin such that said resin covers the outer circumference of the end windings formed by the coil wire ; the housing (201; 201B) comprises a step portion at an opening on a side facing the rotating electrical machine (100; 100A; 100B) ; an inner peripheral surface of the step portion and an outer peripheral surface of the resin covering the outer circumference of the end winding facing the housing (201; 201B) are engaged, thereby the step portion and the resin that covers the outer circumference of the end winding facing the housing (201; 201B) are inlaid and connected. <EOS>