func IsRoleSizeValid(vmclient vm.VirtualMachineClient, roleSizeName string) (bool, error) {
	if roleSizeName == "" {
		return false, fmt.Errorf(errParamNotSpecified, "roleSizeName")
	}
	roleSizeList, err := vmclient.GetRoleSizeList()
	if err != nil {
		return false, err
	}
	for _, roleSize := range roleSizeList.RoleSizes {
		if roleSize.Name == roleSizeName {
			return true, nil
		}
	}
	return false, nil
}
IsRoleSizeValid retrieves the available rolesizes using
vmclient.GetRoleSizeList() and returns whether that the provided roleSizeName
is part of that list
package vmutils
import (
	"fmt"
	"github.com/Azure/azure-sdk-for-go/management"
	lc "github.com/Azure/azure-sdk-for-go/management/location"
	vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine"
)