From the condition of the trailer in your photo, this doesn't look like a "new" trailer but a "new to me" trailer. The statement you made, "This is the first time I've opened the awning".... Do you mean the first time YOU have opened the awning or the first time the awning has been opened (meaning a new awning that's in warranty) ?????
If it's "New and in warranty" then let your dealer handle the problem....
If it's "New to you and not in warranty" then you can purchase awning parts at any RV dealership, Amazon, any "online RV parts website" or EBay (just as a few places that carry parts.
As for the problem you have, it sounds like the shaft on the "awning lock mechanism" in the roller tube has come loose. That's likely to be the problem with why it doesn't ratchet out and "more or less" stay in the out position. As for the "rafter" that slides in the awning side support and locks the awning in the "out" position, you can find them here:
http://getrvparts.com/a-e-awning-rep...wning-rafters/ Keep in mind that there are as many different lengths, widths and colors of rafters as there are awning models, so make sure you cross reference what you need with the awning model number that's on the awning roller tube and on the awning side arms.
Again, if this is a "new" awning on a "new" trailer, let the dealership fix it under warranty.