def METHOD_NAME(self, account_name, pool_name, volume_name, volume_only=False, backup_id=None):
    vnet_name = self.create_random_name(prefix='cli-vnet-backup', length=24)
    subnet_name = "default"
    if not volume_only:
        # create vnet, account and pool
        self.setup_vnet(vnet_name, subnet_name)
        self.cmd("netappfiles account create -g {rg} -a '%s' -l %s" % (account_name, LOCATION))
        self.cmd("netappfiles pool create -g {rg} -a %s -p %s -l %s --service-level 'Premium' --size 4" %
                 (account_name, pool_name, LOCATION))
    # create volume
    if backup_id is None:
        return self.cmd("netappfiles volume create -g {rg} -a %s -p %s -v %s -l %s --vnet %s --subnet %s "
                        "--file-path %s --usage-threshold 100" %
                        (account_name, pool_name, volume_name, LOCATION, vnet_name, subnet_name, volume_name)
                        ).get_output_in_json()
    else:
        return self.cmd("netappfiles volume create -g {rg} -a %s -p %s -v %s -l %s --vnet %s --subnet %s "
                        "--file-path %s --usage-threshold 100 --backup-id %s" %
                        (account_name, pool_name, volume_name, LOCATION, vnet_name, subnet_name, volume_name,
                         backup_id)).get_output_in_json()