Navigation

mongocli atlas networking containers delete

The networking containers delete command removes one network peering container in an Atlas project. You can also delete a network peering container through the Atlas API.

mongocli atlas networking containers delete <container-id>
[ --force ]
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]
Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
<container-id>
string
Unique identifier of the container.
yes
--force
Flag that indicates that the container can be deleted without requiring confirmation.
no
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no

If the command is successful, it returns the following output:

Network peering container '<container-id>' deleted

The following example uses the mongocli atlas networking containers delete command to delete a network peering container for the specified project. The command uses the default profile, which contains the Programmatic API Keys and the project ID.

mongocli atlas networking containers delete 5e44103f8d614b2f0b6530d8

The previous command prints the following output to the terminal.

Network peering container '5e44103f8d614b2f0b6530d8' deleted
Give Feedback