From 80d2bd911bdeef4df70717228d05f1c2b72c3046 Mon Sep 17 00:00:00 2001 From: Tom Sanfilippo Date: Thu, 13 Jul 2017 22:22:02 -0400 Subject: [PATCH] document assignPublicIp param on machines create method --- lib/machines/create.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/machines/create.js b/lib/machines/create.js index 1ec5564..5917ac6 100644 --- a/lib/machines/create.js +++ b/lib/machines/create.js @@ -22,6 +22,7 @@ var assign = require('lodash.assign'); * @param {string} params.billingType - Either 'monthly' or 'hourly' billing * @param {string} params.machineName - A memorable name for this machine * @param {string} params.templateId - Template id of the template to use for creating this machine + * @param {boolean} [params.assignPublicIp] - Assign a new public ip address on machine creation * @param {string} [params.networkId] - If creating on a specific network, specify its id * @param {string} [params.teamId] - If creating the machine for a team, specify the team id * @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'); * billingType: 'hourly', * machineName: 'My Machine 1', * templateId: 't123abc', + * assignPublicIp: true, // optional - assign a new public ip address * networkId: 'n123abc', // optional - only if creating on a specific network * teamId: 'te456def', // optional - required if creating this machine for a team * userId: 'u123abc', // optional - required if assigning to an existing user other than yourself @@ -61,6 +63,7 @@ var assign = require('lodash.assign'); * --billingType "hourly" \ * --machineName "My Machine 1" \ * --templateId "t123abc" \ + * --assignPublicIp true \ * --networkId "n123abc" \ * --teamId "te456def" \ * --userId "u123abc" \ @@ -73,7 +76,7 @@ var assign = require('lodash.assign'); * @example * # HTTP request: * https://api.paperspace.io - * 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"} + * 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"} * x-api-key: 1ba4f98e7c0... * # Returns 201 on success * @example @@ -98,7 +101,7 @@ var assign = require('lodash.assign'); * "state": "provisioning", * "networkId": null, * "privateIpAddress": null, - * "publicIpAddress": null, + * "publicIpAddress": "169.255.255.254", * "region": null, * "userId": "u123abc", * "teamId": "te456def"