Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 80d2bd9

Browse files
committed
document assignPublicIp param on machines create method
1 parent ec5bc15 commit 80d2bd9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/machines/create.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var assign = require('lodash.assign');
2222
* @param {string} params.billingType - Either 'monthly' or 'hourly' billing
2323
* @param {string} params.machineName - A memorable name for this machine
2424
* @param {string} params.templateId - Template id of the template to use for creating this machine
25+
* @param {boolean} [params.assignPublicIp] - Assign a new public ip address on machine creation
2526
* @param {string} [params.networkId] - If creating on a specific network, specify its id
2627
* @param {string} [params.teamId] - If creating the machine for a team, specify the team id
2728
* @param {string} [params.userId] - If assigning to an existing user other than yourself, specify the user id
@@ -41,6 +42,7 @@ var assign = require('lodash.assign');
4142
* billingType: 'hourly',
4243
* machineName: 'My Machine 1',
4344
* templateId: 't123abc',
45+
* assignPublicIp: true, // optional - assign a new public ip address
4446
* networkId: 'n123abc', // optional - only if creating on a specific network
4547
* teamId: 'te456def', // optional - required if creating this machine for a team
4648
* userId: 'u123abc', // optional - required if assigning to an existing user other than yourself
@@ -61,6 +63,7 @@ var assign = require('lodash.assign');
6163
* --billingType "hourly" \
6264
* --machineName "My Machine 1" \
6365
* --templateId "t123abc" \
66+
* --assignPublicIp true \
6467
* --networkId "n123abc" \
6568
* --teamId "te456def" \
6669
* --userId "u123abc" \
@@ -73,7 +76,7 @@ var assign = require('lodash.assign');
7376
* @example
7477
* # HTTP request:
7578
* https://api.paperspace.io
76-
* POST /machines/createSingleMachinePublic {"region": "East Coast (NY2)", "machineType": "Air", "size": 50, "billingType": "monthly", "machineName": "My Machine 1", "templateId": "t123abc", "networkId": "n123abc", "teamId": "te456def", "userId": "u123abc", "email": "example@example.com", "password": "secret123", "firstName": "Jon", "lastName": "Snow", "notificationEmail": "example@example.com"}
79+
* POST /machines/createSingleMachinePublic {"region": "East Coast (NY2)", "machineType": "Air", "size": 50, "billingType": "monthly", "machineName": "My Machine 1", "templateId": "t123abc", "assignPublicIp": true, "networkId": "n123abc", "teamId": "te456def", "userId": "u123abc", "email": "example@example.com", "password": "secret123", "firstName": "Jon", "lastName": "Snow", "notificationEmail": "example@example.com"}
7780
* x-api-key: 1ba4f98e7c0...
7881
* # Returns 201 on success
7982
* @example
@@ -98,7 +101,7 @@ var assign = require('lodash.assign');
98101
* "state": "provisioning",
99102
* "networkId": null,
100103
* "privateIpAddress": null,
101-
* "publicIpAddress": null,
104+
* "publicIpAddress": "169.255.255.254",
102105
* "region": null,
103106
* "userId": "u123abc",
104107
* "teamId": "te456def"

0 commit comments

Comments
 (0)