Out Plane
port

port unset

Stop an application serving a port.

writesrepeatable--dry-run

Closes a port, so the application stops serving it.

A custom domain pointing at that port stays behind and resolves to nothing, so domain list is worth reading afterwards.

Usage

outplane port unset <PORT...> [flags]

Arguments

ArgumentTypeDescription
PORTstringThe port number, repeatable. Required. Takes the rest of the line.

Flags

FlagTypeDescription
--appstringApplication name or id. Defaults to the linked app. A flag rather than an argument, so that port numbers cannot be mistaken for it.
--deployboolDeploy afterwards, so the change reaches the running app.

The global flags apply as well.

Output

FieldTypeDescription
actionstringOne of set, unset.
numbersarrayThe ports named on the command line.
appstring
appIdstring
servingintHow many ports the application serves afterwards.
portsarrayEvery port that was sent, {port, scheme, public}.
changedboolFalse for a dry run.
deploymentIdint | null

Examples

See what would be left

outplane port unset 8080 --dry-run

Close a port

outplane port unset 8080

Close several on another application, and apply it

outplane port unset 8080 9000 --app checkout --deploy

Read the result in a pipeline

outplane port unset 8080 --json --fields numbers,serving,changed

What to Know

  • A number the application does not serve is an error, exit 5 with port.not_found, and nothing is sent. The error names the ports it does serve.
  • A custom domain attached to a closed port stays, and points nowhere. The platform does not delete it and neither does this command; outplane domain list shows a route with no application.
  • Closing every port leaves an application nothing can reach, and that is allowed. The request is not refused.
  • The API replaces the whole set rather than merging, so this command sends every remaining port. ports in the result is that set.
  • Saving does not restart anything. Without --deploy the running application keeps serving the port until its next deployment.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of port.not_found, usage.bad_port, usage.missing_argument, context.no_app, app.not_found. Branch on that, or on the exit status. The message is prose and changes.

On this page