/APIs & SDKs/Organizations and networking/ip-allow

OptiTech CLI command: ip-allow

Manage the IP allowlist: list, add, remove, and reset allowed IPs

The ip-allow command lists, adds, removes, and resets the IP allowlist for your OptiTech project. An allowlist can contain individual IP addresses, IP ranges, or CIDR notation. For information about OptiTech's IP Allow feature, see Configure IP Allow.

Subcommands: add, list, remove, reset

The --project-id option is required only if your OptiTech account has more than one project and no project is set in your context file.

optitech ip-allow list

Lists the addresses in the IP allowlist.

optitech ip-allow list [options]
OptionDescriptionTypeDefaultRequired
--project-idProject IDstringNo

List the IP allowlist:

optitech ip-allow list --project-id cold-grass-40154007

List the IP allowlist with the --output format set to json:

optitech ip-allow list --project-id cold-grass-40154007 --output json

optitech ip-allow add

Adds IP addresses to the IP allowlist for your OptiTech project.

optitech ip-allow add [ips...]
OptionDescriptionTypeDefaultRequired
--protected-onlyIf true, the list will be applied only to protected branches.booleanNo
--project-idProject IDstringNo

Use --protected-only to apply the allowlist to protected branches only. Use --protected-only false to remove this setting.

optitech ip-allow add 192.0.2.3 --project-id cold-grass-40154007

optitech ip-allow remove

Removes IP addresses from the IP allowlist for your project.

optitech ip-allow remove [ips...]
OptionDescriptionTypeDefaultRequired
--project-idProject IDstringNo
optitech ip-allow remove 192.0.2.3 --project-id cold-grass-40154007

optitech ip-allow reset

Resets the allowlist to the IP addresses you specify. If you specify no addresses, the currently defined IP addresses are removed.

optitech ip-allow reset [ips...]
OptionDescriptionTypeDefaultRequired
--project-idProject IDstringNo
optitech ip-allow reset 192.0.2.1 --project-id cold-grass-40154007
Was this page helpful?