As an example, VirtualMachineExtensions are child resources of VirtualMachine. How about providing following experience -
var vm = client.VirtualMachines.Get(..);
Extension extension = vm.VirtualMachineExtensions.Get("CustomScriptExtension");
extension.PublicSettings.Add(key, value);
await extension.UpdateAsync();
Since extension instance is retrieved from the parent, it knows parentName and resource group so you don't have to pass those parameter while invoking UpdateAsync().
While going through this https://github.com/devigned/profile-playground/issues/7 another thought came into mind is - for convince we could expose child resource in parent model.
As an example, VirtualMachineExtensions are child resources of VirtualMachine. How about providing following experience -
Since extension instance is retrieved from the parent, it knows parentName and resource group so you don't have to pass those parameter while invoking UpdateAsync().