Your plant is indeed a yucca.
It is most likely a Yucca filamentosa, also known commonly as Adam’s needle. Generally, a filamentosa will have thread-like exfoliating margins along the sword-like foliage (can’t see them in the photo).
However, it could be Yucca flaccida, which is very similar to Yucca filamentosa, but without the ‘filaments’ along the leaf blades. It is considered by some taxonomists to be a variety or form of the species filamentosa rather than a separate species.
Several cultivars exist that have yellow streaks through the leaf blade – they are:
- Yucca filamentosa ‘Bright Edge’ – green foliage with a clearly demarcated thin yellow margin.
- Yucca filamentosa ‘Color Guard’ – a better substitute for “Golden Sword’, as it has a more crisply defined yellow stripe running down the center of the blade.
- Yucca flaccida ‘Golden Sword’ – green-margined foliage has broad and ill-defined yellow streaks in the center of the leaf blade.