Yes but… As with everything to do with sun shades the mounting point strength is absolutely critical. As with fence posts, when the balcony, deck or dock was constructed the loading for a sun shade was not part of the design considerations and therefore the post dimensions and footing sizes may not be adequate to deal with these loads. As an example, it may be possible to very firmly attach a suitably sized shade post to an existing deck post but does that deck post have suitable footings and strength especially given the additional height of the shade post above the deck. It is therefore recommended that you get a professional to assess the requirements.