Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli atlas privateendpoint interface create

On this page

  • Syntax
  • Arguments
  • Options
  • Output
  • Example

The privateendpoint interface create command adds one interface endpoint to one private endpoint connection for a given Atlas project.

You must first create the endpoint in AWS with the following information:

  • The endpoint service name that Atlas creates with mongocli atlas privateendpoint create.

    Retrieve the endpoint service name with mongocli atlas privateendpoint describe.

  • The unique identifier of the peer AWS VPC.

  • The unique identifiers of the subnets your AWS VPC uses.

If the attempt to add an interface endpoint fails, delete it, then try to add a new one.

mongocli atlas privateendpoint(s)|privateEndpoint(s) interface(s) create <interface-endpoint-id>
--privateEndpointId <private-endpoint-id>
[ --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.

Argument
Type
Description
Required?
<interface-endpoint-id>
string
Unique identifier of the interface endpoint that you want to add to the private endpoint connection.
yes
Option
Type
Description
Required?
--privateEndpointId
string
Unique identifier of the private endpoint connection for which you want to add the interface endpoint.
yes
--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 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 succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

Interface endpoint '<interface-endpoint-id>' created.

The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the Public API reference for your MongoDB service:

The following command adds one interface endpoint to one private endpoint connection for a project using the default profile, which contains credentials and the project ID. The output is returned in the default format.

atlas privateendpoint interface create vpce-05ad08ff76fceb65b \
--privateEndpointId 5f59398a33b5595e0cad7f0b

The previous command prints the following to the terminal.

Interface endpoint 'vpce-05ad08ff76fceb65b' created.

The following command adds one interface endpoint to one private endpoint connection for a project using the default profile, which contains credentials and the project ID. The output is returned in JSON format.

atlas privateendpoint interface create vpce-05ad08ff76fceb65b \
--privateEndpointId 5f59398a33b5595e0cad7f0b --output json

The previous command prints the following to the terminal in JSON format.

{
"interfaceEndpointId": "vpce-05ad08ff76fceb65b",
"deleteRequested": false,
"connectionStatus": "PENDING_ACCEPTANCE"
}

Back

Delete One Private Endpoint Connection