func (cmd *CommandUpdate) Handler(profile *user.Profile, ui terminal.UI, clients cli.Clients) error {
	app, err := cli.ResolveApp(ui, clients.Realm, cmd.inputs.Filter())
	if err != nil {
		return err
	}
	allowedIPs, err := clients.Realm.AllowedIPs(app.GroupID, app.ID)
	if err != nil {
		return err
	}
	allowedIP, err := cmd.inputs.resolveAllowedIP(ui, allowedIPs)
	if err != nil {
		return err
	}
	if err := clients.Realm.AllowedIPUpdate(
		app.GroupID,
		app.ID,
		allowedIP.ID,
		cmd.inputs.NewAddress,
		cmd.inputs.NewComment,
	); err != nil {
		return err
	}
	ui.Print(terminal.NewTextLog("Successfully updated allowed IP"))
	return nil
}
Handler is the command handler
package accesslist
import (
	"fmt"
	"github.com/10gen/realm-cli/internal/cli"
	"github.com/10gen/realm-cli/internal/cli/user"
	"github.com/10gen/realm-cli/internal/cloud/realm"
	"github.com/10gen/realm-cli/internal/terminal"
	"github.com/10gen/realm-cli/internal/utils/flags"
	"github.com/AlecAivazis/survey/v2"
)
const (
	flagIPNew   = "new-ip"
	flagComment = "comment"
)
type updateInputs struct {
	cli.ProjectInputs
	Address    string
	NewAddress string
	NewComment string
}
var CommandMetaUpdate = cli.CommandMeta{
	Use:         "update",
	Display:     "accesslist update",
	Description: "Modify an IP address or CIDR block in the Access List of your Realm app",
	HelpText: `Changes an existing entry from the Access List of your Realm app. You will be
prompted to select an IP address or CIDR block to update if neither is
specified.`,
}
type CommandUpdate struct {
	inputs updateInputs
}
func (cmd *CommandUpdate) Flags() []flags.Flag {
	return []flags.Flag{
		cli.AppFlagWithContext(&cmd.inputs.App, "to modify an entry in its Access List"),
		cli.ProjectFlag(&cmd.inputs.Project),
		cli.ProductFlag(&cmd.inputs.Products),
		flags.StringFlag{
			Value: &cmd.inputs.Address,
			Meta: flags.Meta{
				Name: "ip",
				Usage: flags.Usage{
					Description: "Specify the existing IP address or CIDR block that you would like to modify",
				},
			},
		},
		flags.StringFlag{
			Value: &cmd.inputs.NewAddress,
			Meta: flags.Meta{
				Name: flagIPNew,
				Usage: flags.Usage{
					Description: "Specify the new IP address or CIDR block that will replace the existing entry",
				},
			},
		},
		flags.StringFlag{
			Value: &cmd.inputs.NewComment,
			Meta: flags.Meta{
				Name: flagComment,
				Usage: flags.Usage{
					Description: "Add or edit a comment to the IP address or CIDR block that is being modified",
				},
			},
		},
	}
}
func (cmd *CommandUpdate) Inputs() cli.InputResolver {
	return &cmd.inputs
}