You need to either assign the aggregate to the vserver to run the command in vserver context, or run the command from the cluster management interface and tunnel it the desired vserver.
If you want to assign the aggregate to the vserver, which will give the vserver admin access to that aggregate, use this command:
cluster01::> vserver modify -vserver vs1 -aggr-list aggr1,aggr2,...
Before running the command, make sure to note the aggregates already assigned to the vserver and add them to the command so you don't accidentally remove assigned aggregates.
cluster01::> vserver show -vserver vs1 -fields aggr-list
If you'd rather do it using vserver tunneling on the cluster management interface, see the command named something similar to set_vserver() in the language you're using.
Hope that helps. Let us know if you run into any more issues.