### Install Vultr Node.js Client Source: https://github.com/vultr/vultr-node/blob/master/docs/index.html Install the official Vultr Node.js client library using npm. ```shell npm install @vultr/vultr-node ``` -------------------------------- ### Installing Vultr Node.js Client Source: https://github.com/vultr/vultr-node/blob/master/README.md Command to install the official Vultr client module for Node.js using npm. This is the standard way to add the library to your project dependencies. ```sh npm install @vultr/vultr-node ``` -------------------------------- ### Start Single Vultr Instance - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for the API endpoint to start a single Vultr instance. Requires an API key and the instance ID in the URL path. ```javascript exports.startInstance = { url: '/instances/{instance-id}/start', requestType: 'POST', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Start Multiple Vultr Instances - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for the API endpoint to start multiple Vultr instances by their IDs. Requires an API key and accepts an array of instance IDs. ```javascript exports.startInstances = { url: '/instances/start', requestType: 'POST', apiKeyRequired: true, parameters: { instance_ids: { type: 'array' } } } ``` -------------------------------- ### Start Bare Metal Instance - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Defines the configuration for starting a specific bare metal instance via the Vultr API. It requires the bare metal instance ID as a path parameter. ```javascript exports.startInstance = { url: '/bare-metals/{baremetal-id}/start', requestType: 'POST', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Start Multiple Bare Metal Instances - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Defines the configuration for starting multiple bare metal instances via the Vultr API. It accepts an array of bare metal instance IDs. ```javascript exports.startInstances = { url: '/bare-metals/start', requestType: 'POST', apiKeyRequired: true, parameters: { baremetal_ids: { type: 'array' } } } ``` -------------------------------- ### Start Migration to Managed Database (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for starting a migration to a specific Managed Database. It uses a POST request and requires the database ID as a path parameter, along with host, port, username, password, and ssl parameters in the request body. Optional parameters include database and ignored_databases. ```javascript exports.databaseStartMigration = { url: '/databases/{database-id}/migration', requestType: 'POST', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true }, host: { type: 'string', required: true }, port: { type: 'number', required: true }, username: { type: 'string', required: true }, password: { type: 'string', required: true }, database: { type: 'string' }, ignored_databases: { type: 'string' }, ssl: { type: 'boolean', required: true } } } ``` -------------------------------- ### Get Kubernetes Versions - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for fetching a list of all supported Kubernetes versions available on Vultr. It uses a GET request to the `/kubernetes/versions` API endpoint. ```javascript exports.getKubernetesVersions = { url: '/kubernetes/versions', requestType: 'GET' } ``` -------------------------------- ### Start Version Upgrade - Vultr Databases - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for the API endpoint to start a version upgrade for a Managed Database (PostgreSQL engine types only). Requires the database ID as a path parameter and the target version in the request body. ```javascript exports.startVersionUpgrade = { url: '/databases/{database-id}/version-upgrade', requestType: 'POST', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true }, version: { type: 'string', required: true } } } ``` -------------------------------- ### List All Startup Scripts - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/startup-scripts.js.html Retrieves a list of all startup scripts associated with the account. Supports pagination via `per_page` and `cursor` parameters. Requires an API key and uses a GET request to the `/startup-scripts` endpoint. ```javascript exports.listStartupScripts = { url: '/startup-scripts', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Start Maintenance Updates for Managed Database (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for starting maintenance updates for a specific Managed Database. It uses a POST request and requires the database ID as a path parameter. ```javascript exports.startMaintenanceUpdates = { url: '/databases/{database-id}/maintenance', requestType: 'POST', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Calling Vultr API Endpoint (Promises) Source: https://github.com/vultr/vultr-node/blob/master/README.md Shows how to make an API call using the initialized Vultr client instance. This example calls the `getAccountInfo` endpoint and handles the response using JavaScript Promises. ```js // Call endpoints using Promises vultr.account.getAccountInfo().then((response) => { console.log(response) }) ``` -------------------------------- ### Get Startup Script Information - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/startup-scripts.js.html Retrieves detailed information for a specific startup script using its ID. Requires the startup script ID as a path parameter and an API key for authentication. Uses a POST request to the `/startup-scripts/{startup-id}` endpoint. ```javascript exports.getStartupScript = { url: '/startup-scripts/{startup-id}', requestType: 'POST', apiKeyRequired: true, parameters: { 'startup-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Get Vultr Instance JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for retrieving detailed information about a specific VPS instance. It uses a GET request to the '/instances/{instance-id}' endpoint, requiring the instance ID as a path parameter. ```JavaScript exports.getInstance = { url: '/instances/{instance-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Example CHANGELOG Entry (Markdown) Source: https://github.com/vultr/vultr-node/blob/master/CONTRIBUTING.md Illustrates the required format for entries in the CHANGELOG.md file when documenting new versions, fixes, or features. It includes the version, date, type of change, and a description with the associated pull request ID. ```Markdown ## v0.0.1 (2019-06-12) ### Fixes * Fixed random bug #12 ``` -------------------------------- ### Get Backup Information for Managed Database (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for retrieving backup information for a specific Managed Database. It uses a GET request and requires the database ID as a path parameter. ```javascript exports.getBackupInformation = { url: '/databases/{database-id}/backups', requestType: 'GET', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### List Public ISOs - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/iso.js.html Defines the configuration for listing all publicly available ISOs provided by Vultr. This GET endpoint does not require an API key or any parameters. ```javascript exports.listPublicIsos = { url: '/iso-public', requestType: 'GET' } ``` -------------------------------- ### List ISOs - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/iso.js.html Defines the configuration for listing all ISOs available in the Vultr account. This GET endpoint supports pagination parameters `per_page` and `cursor` and requires an API key. ```javascript exports.listIsos = { url: '/iso', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Get Available Upgrades Vultr Instances JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for retrieving a list of all available upgrades for a specified Vultr instance. It uses a GET request to the `/instances/{instance-id}/upgrades` endpoint and requires the instance ID as a path parameter, optionally accepting a type parameter. ```javascript exports.getAvailableInstanceUpgrades = { url: '/instances/{instance-id}/upgrades', requestType: 'GET', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true }, type: { type: 'string' } } } ``` -------------------------------- ### Get Vultr User Configuration (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/users.js.html Configuration object for retrieving information about a specific Vultr user using a GET request. Requires the user ID as a path parameter and an API key for authentication. ```javascript exports.getUser = { url: '/users/{user-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'user-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### List Vultr Instances JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for listing all VPS instances in the Vultr account. It specifies the GET request method to the '/instances' endpoint and includes optional parameters for filtering and pagination. ```JavaScript exports.listInstances = { url: '/instances', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' }, tag: { type: 'string' }, label: { type: 'string' }, main_ip: { type: 'string' }, region: { type: 'string' } } } ``` -------------------------------- ### List Vultr Instance Plans - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/plans.js.html Defines the configuration for retrieving a list of available Vultr instance plans. It specifies the API endpoint '/plans', the HTTP GET method, and includes optional query parameters for filtering by type, OS, pagination (per_page), and cursor. ```javascript exports.listPlans = { url: '/plans', requestType: 'GET', parameters: { type: { type: 'string' }, os: { type: 'string' }, per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### List Vultr Bare Metal Plans - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/plans.js.html Defines the configuration for retrieving a list of available Vultr bare metal plans. It specifies the API endpoint '/plans-metal', the HTTP GET method, and includes optional query parameters for pagination (per_page) and cursor. ```javascript exports.listBareMetalPlans = { url: '/plans-metal', requestType: 'GET', parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Listing Container Registry Plans (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for listing all available plans for Vultr Container Registries. This endpoint uses a GET request and requires an API key. ```javascript exports.listRegistryPlans = { url: '/registry/plan/list', requestType: 'GET', apiKeyRequired: true } ``` -------------------------------- ### List Database Plans - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for listing Vultr Managed Database plans. This GET request targets the '/databases/plans' endpoint and requires an API key. It supports optional filtering by engine, number of nodes, and region. ```javascript exports.listPlans = { url: '/databases/plans', requestType: 'GET', apiKeyRequired: true, parameters: { engine: { type: 'string' }, nodes: { type: 'number' }, region: { type: 'string' } } } ``` -------------------------------- ### List Vultr Users Configuration (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/users.js.html Configuration object for retrieving a list of all users on the account using a GET request. Requires an API key and supports pagination parameters 'per_page' and 'cursor'. ```javascript exports.getUsers = { url: '/users', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Get Managed Database Details - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for retrieving details of a specific Vultr Managed Database. This GET request targets the '/databases/{database-id}' endpoint, requiring the database ID in the path, and requires an API key. ```javascript exports.getDatabase = { url: '/databases/{database-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Configure List Applications API Call - JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/applications.js.html Defines the configuration object used by the Vultr Node.js client to make the API request for listing One-Click applications. It specifies the endpoint URL, the HTTP GET method, indicates that an API key is required, and lists the optional `per_page` and `cursor` query parameters with their expected types. ```JavaScript exports.listApplications = { url: '/applications', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'number' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Get Vultr Registry Repository - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for retrieving details of a single repository within a container registry subscription. It uses a GET request to the /registry/{registry-id}/repository/{repository-image} endpoint and requires both registry-id and repository-image path parameters. Requires an API key. ```javascript exports.readRepository = { url: '/registry/{registry-id}/repository/{repository-image}', requestType: 'GET', apiKeyRequired: true, parameters: { 'registry-id': { type: 'string', required: true, path: true }, 'repository-image': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Get ISO - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/iso.js.html Defines the configuration for retrieving detailed information about a specific ISO. This POST endpoint requires an API key and the `iso-id` as a required path parameter. ```javascript exports.getIso = { url: '/iso/{iso-id}', requestType: 'POST', apiKeyRequired: true, parameters: { 'iso-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Getting a Vultr Kubernetes Cluster (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for retrieving detailed information about a specific Kubernetes cluster on Vultr. It specifies the API endpoint including a path parameter for the cluster ID, the request type (GET), requirement for an API key, and the definition of the required 'vke-id' path parameter. ```javascript exports.getKubernetesCluster = { url: '/kubernetes/clusters/{vke-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'vke-id': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Create New Startup Script - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/startup-scripts.js.html Creates a new startup script on the account. Requires the `name` and `script` content as parameters. Optionally accepts a `type`. Uses a POST request to the `/startup-scripts` endpoint and requires an API key. ```javascript exports.createStartupScript = { url: '/startup-scripts', requestType: 'POST', apiKeyRequired: true, parameters: { name: { type: 'string', required: true }, script: { type: 'string', required: true }, type: { type: 'string' } } } ``` -------------------------------- ### Get DNS Domain SOA Info - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/dns.js.html Configures the API call to retrieve the Start of Authority (SOA) information for a specific DNS domain. It requires the `dns-domain` identifier as a path parameter. ```javascript exports.getSoaInfo = { url: '/domains/{dns-domain}/soa', requestType: 'GET', apiKeyRequired: true, parameters: { 'dns-domain': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### List Managed Databases - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for listing all Vultr Managed Databases in the account. This GET request targets the '/databases' endpoint and requires an API key. It supports optional filtering by label, tag, and region. ```javascript exports.listDatabases = { url: '/databases', requestType: 'GET', apiKeyRequired: true, parameters: { label: { type: 'string' }, tag: { type: 'string' }, region: { type: 'string' } } } ``` -------------------------------- ### Listing Vultr Kubernetes Clusters (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for listing all currently deployed Kubernetes clusters on Vultr. It specifies the API endpoint, request type (GET), and indicates that an API key is required. ```javascript exports.listKubernetesClusters = { url: '/kubernetes/clusters', requestType: 'GET', apiKeyRequired: true } ``` -------------------------------- ### Get Vultr Instance ISO Status - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for the API endpoint to retrieve the attached ISO status for a Vultr instance. Requires an API key and the instance ID in the URL path. ```javascript exports.getInstanceIsoStatus = { url: '/instances/{instance-id}/iso', requestType: 'GET', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### List Vultr Registry Repositories - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for listing all repositories within a specific container registry subscription. It uses a GET request to the /registry/{registry-id}/repositories endpoint and requires the registry-id path parameter. Requires an API key. ```javascript exports.listRepositories = { url: '/registry/{registry-id}/repositories', requestType: 'GET', apiKeyRequired: true, parameters: { 'registry-id': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Get Vultr Instance Bandwidth - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for the API endpoint to retrieve bandwidth usage for a Vultr instance. Requires an API key, the instance ID in the URL path, and optionally accepts a date range. ```javascript exports.getInstanceBandwidth = { url: '/instances/{instance-id}/bandwidth', requestType: 'GET', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true }, date_range: { type: 'number' } } } ``` -------------------------------- ### Initialize Vultr Node.js Client Source: https://github.com/vultr/vultr-node/blob/master/docs/index.html Initialize the Vultr Node.js client instance with your API key and optional configuration like base URL and rate limit. ```javascript const VultrNode = require('@vultr/vultr-node') // Initialize the instance with your configuration const vultr = VultrNode.initialize({ apiKey: 'your-api-key-here', baseUrl: 'https://example.com', // Optional rateLimit: 600 // Optional }) ``` -------------------------------- ### Listing Container Registry Regions (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for listing all available regions where a Vultr Container Registry can be deployed. This endpoint uses a GET request and requires an API key. ```javascript exports.listRegistryRegions = { url: '/registry/region/list', requestType: 'GET', apiKeyRequired: true } ``` -------------------------------- ### Get Reserved IP - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/reserved-ips.js.html Get information about a specific reserved IP address using its identifier. Requires the reserved IP identifier as a path parameter. ```javascript exports.getReservedIp = { url: '/reserved-ips/{reserved-ip}', requestType: 'GET', apiKeyRequired: true, parameters: { 'reserved-ip': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Initializing Vultr Node.js Client Source: https://github.com/vultr/vultr-node/blob/master/README.md Demonstrates how to require the Vultr Node.js library and initialize a client instance. Requires a Vultr Personal Access Token (API Key) for authentication. Optional parameters include `baseUrl` and `rateLimit`. ```js const VultrNode = require('@vultr/vultr-node') // Initialize the instance with your configuration const vultr = VultrNode.initialize({ apiKey: 'your-api-key-here', baseUrl: 'https://example.com', // Optional rateLimit: 600 // Optional }) ``` -------------------------------- ### Start Kubernetes Cluster Upgrade - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for initiating an upgrade process for a specific Vultr Kubernetes cluster. It requires the cluster ID (`vke-id`) in the path and the target `upgrade_version` in the request body, using a POST request to `/kubernetes/clusters/{vke-id}/upgrades`. This operation requires an API key. ```javascript exports.upgrades = { url: '/kubernetes/clusters/{vke-id}/upgrades', requestType: 'POST', apiKeyRequired: true, parameters: { 'vke-id': { type: 'string', required: true, path: true }, upgrade_version: { type: 'string', required: true } } } ``` -------------------------------- ### Create Vultr Instance JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for creating a new VPS instance. It uses a POST request to the '/instances' endpoint and requires parameters like region and plan, while supporting numerous optional configuration options. ```JavaScript exports.createInstance = { url: '/instances', requestType: 'POST', apiKeyRequired: true, parameters: { region: { type: 'string', required: true }, plan: { type: 'string', required: true }, os_id: { type: 'string' }, ipxe_chain_url: { type: 'string' }, iso_id: { type: 'string' }, script_id: { type: 'string' }, snapshot_id: { type: 'string' }, enable_ipv6: { type: 'boolean' }, disable_public_ipv4: { type: 'boolean' }, attach_vpc: { type: 'array' }, attach_vpc2: { type: 'array' }, label: { type: 'string' }, sshkey_id: { type: 'array' }, backups: { type: 'string' }, app_id: { type: 'number' }, image_id: { type: 'string' }, user_data: { type: 'string' }, ddos_protection: { type: 'boolean' }, activation_email: { type: 'boolean' }, hostname: { type: 'string' }, tag: { type: 'string' }, tags: { type: 'array' }, firewall_group_id: { type: 'string' }, reserved_ipv4: { type: 'string' }, enable_vpc: { type: 'boolean' }, enable_vpc2: { type: 'boolean' } } } ``` -------------------------------- ### List Vultr Backups (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/backups.js.html Retrieves a list of backups associated with the account. This method uses a GET request to the '/backups' endpoint and requires an API key. It supports optional parameters for filtering by instance ID, pagination (per_page), and cursor-based navigation. ```javascript exports.listBackups = { url: '/backups', requestType: 'GET', apiKeyRequired: true, parameters: { instance_id: { type: 'string' }, per_page: { type: 'number' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Get Instance Backup Schedule - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Configures the API endpoint to retrieve the backup schedule for a specified Vultr instance. Requires the instance ID. Uses a GET request. ```javascript exports.getInstanceBackupSchedule = { url: '/instances/{instance-id}/backup-schedule', requestType: 'GET', apiKeyRequired: true, parameters: { 'instance-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Define getAccountInfo Method Configuration - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/account.js.html Defines the configuration object for the `getAccountInfo` method within the Vultr Node.js API client. This object specifies the API endpoint URL, the HTTP request type (GET), and indicates that an API key is required for this operation. ```JavaScript exports.getAccountInfo = { url: '/account', requestType: 'GET', apiKeyRequired: true } ``` -------------------------------- ### List Database Users - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for listing users associated with a specific Vultr Managed Database. This GET request targets the '/databases/{database-id}/users' endpoint, requiring the database ID in the path, and requires an API key. ```javascript exports.listDatabaseUsers = { url: '/databases/{database-id}/users', requestType: 'GET', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### List Load Balancers - Vultr API - JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/load-balancers.js.html Defines the configuration for listing all load balancers on the Vultr account. It uses a GET request to the '/load-balancers' endpoint and requires an API key. Supports pagination parameters 'per_page' and 'cursor'. ```JavaScript exports.listLoadBalancers = { url: '/load-balancers', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### List Vultr Container Registries - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for listing all container registry subscriptions associated with the account. It uses a GET request to the /registries endpoint and supports pagination parameters per_page and cursor. Requires an API key. ```javascript exports.listRegistries = { url: '/registries', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Listing DNS Records - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/dns.js.html Defines the configuration for listing all DNS records associated with a specific domain. It uses a GET request and requires an API key. Parameters include the required 'dns-domain' in the path and optional 'per_page' and 'cursor' for pagination. ```javascript exports.listRecords = { url: '/domains/{dns-domain}/records', requestType: 'GET', apiKeyRequired: true, parameters: { 'dns-domain': { type: 'string', path: true, required: true }, per_page: { type: 'number' }, cursor: { type: 'string' } } } ``` -------------------------------- ### List Block Storage Volumes - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/block-storage.js.html Defines the configuration for listing all block storage volumes associated with the account. It uses a GET request to the '/blocks' endpoint and supports pagination parameters 'per_page' and 'cursor'. ```javascript exports.listStorages = { url: '/blocks', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Define List Connection Pools Endpoint - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Configures the API endpoint for listing all connection pools associated with a Vultr Managed Database (PostgreSQL only). It specifies the URL path, HTTP method (GET), API key requirement, and the required database ID parameter. ```javascript exports.listConnectionPools = { url: '/databases/{database-id}/connection-pools', requestType: 'GET', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Get Bare Metal Instance - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Get information for a given bare metal instance. Requires the `baremetal-id` path parameter. See the Vultr API documentation for details: https://www.vultr.com/api/#operation/get-baremetal ```javascript exports.getInstance = { url: '/bare-metals/{baremetal-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Get Block Storage Volume Details - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/block-storage.js.html Sets up the API request to retrieve details for a specific block storage volume. It uses a GET request to '/blocks/{block-id}', requiring the 'block-id' as a path parameter. ```javascript exports.getStorage = { url: '/blocks/{block-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'block-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Call Vultr API Endpoint (Promises) Source: https://github.com/vultr/vultr-node/blob/master/docs/index.html Demonstrates how to call a Vultr API endpoint using the initialized client instance and handle the response with Promises. ```javascript // Call endpoints using Promises vultr.account.getAccountInfo().then((response) => { console.log(response) }) ``` -------------------------------- ### Get Bare Metal Instance Bandwidth - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Defines the configuration for retrieving bandwidth information for a specific bare metal instance via the Vultr API. It requires the bare metal instance ID as a path parameter. ```javascript exports.getInstanceBandwidth = { url: '/bare-metals/{baremetal-id}/bandwidth', requestType: 'GET', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Get Vultr Container Registry - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/registries.js.html Defines the configuration for retrieving details of a single container registry subscription. It uses a GET request to the /registry/{registry-id} endpoint and requires the registry-id path parameter. Requires an API key. ```javascript exports.readRegistry = { url: '/registry/{registry-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'registry-id': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Get Bare Metal Instance IPv6 - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Get the IPv6 information for the specified bare metal instance. Requires the `baremetal-id` path parameter. See the Vultr API documentation for details: https://www.vultr.com/api/#operation/get-ipv6-baremetal ```javascript exports.getInstanceIpv6Addresses = { url: '/bare-metals/{baremetal-id}/ipv6', requestType: 'GET', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Create ISO - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/iso.js.html Defines the configuration for creating a new ISO from a specified URL. This POST endpoint requires an API key and the `url` parameter. ```javascript exports.createIso = { url: '/iso', requestType: 'POST', apiKeyRequired: true, parameters: { url: { type: 'string', required: true } } } ``` -------------------------------- ### Get Bare Metal Instance Available Upgrades - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Defines the configuration for retrieving a list of available upgrades for a specific bare metal instance via the Vultr API. It requires the bare metal instance ID as a path parameter and can be filtered by type. ```javascript exports.getInstanceAvailableUpgrades = { url: '/bare-metals/{baremetal-id}/upgrades', requestType: 'GET', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true }, type: { type: 'string' } } } ``` -------------------------------- ### Get Bare Metal Instance IPv4 - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Get the IPv4 information for the specified bare metal instance. Requires the `baremetal-id` path parameter. See the Vultr API documentation for details: https://www.vultr.com/api/#operation/get-ipv4-baremetal ```javascript exports.getInstanceIpv4Addresses = { url: '/bare-metals/{baremetal-id}/ipv4', requestType: 'GET', apiKeyRequired: true, parameters: { 'baremetal-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Attach ISO to Vultr Instance - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/instances.js.html Defines the configuration for the API endpoint to attach an ISO to a Vultr instance. Requires an API key and the instance ID in the URL path. ```javascript exports.attachInstanceIso = { url: '/instances/{instance-id}/iso', requestType: 'POST', apiKeyRequired: true, ``` -------------------------------- ### Configure List OS Images API Call - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/operating-systems.js.html Configures the API call to list available operating system images from Vultr. Specifies the endpoint, HTTP method, authentication requirement, and supported query parameters for pagination. ```JavaScript exports.listImages = { url: '/os', requestType: 'GET', apiKeyRequired: true, parameters: { per_page: { type: 'string' }, cursor: { type: 'string' } } } ``` -------------------------------- ### Get Specific Vultr Backup (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/backups.js.html Retrieves detailed information for a single backup specified by its ID. This method sends a GET request to the '/backups/{backup-id}' endpoint, requiring an API key. The backup ID is a required path parameter. ```javascript exports.getBackup = { url: '/backups/{backup-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'backup-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Create Bare Metal Instance - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/bare-metal.js.html Create a new bare metal instance in the specified region with the desired plan. Requires `region` and `plan` parameters. Supports various optional parameters like `script_id`, `enable_ipv6`, `sshkey_id`, `user_data`, `label`, `tag`, `activation_email`, `hostname`, `reserved_ipv4`, `os_id`, `snapshot_id`, `app_id`, `image_id`, `persistent_pxe`, `attach_vpc2`, `detach_vpc2`, `enable_vpc2`, and `tags`. See the Vultr API documentation for details: https://www.vultr.com/api/#operation/create-baremetal ```javascript exports.createInstance = { url: '/bare-metals', requestType: 'POST', apiKeyRequired: true, parameters: { region: { type: 'string', required: true }, plan: { type: 'string', required: true }, script_id: { type: 'number' }, enable_ipv6: { type: 'boolean' }, sshkey_id: { type: 'string' }, user_data: { type: 'string' }, label: { type: 'string' }, tag: { type: 'string' }, activation_email: { type: 'boolean' }, hostname: { type: 'string' }, reserved_ipv4: { type: 'string' }, os_id: { type: 'number' }, snapshot_id: { type: 'string' }, app_id: { type: 'number' }, image_id: { type: 'string' }, persistent_pxe: { type: 'boolean' }, attach_vpc2: { type: 'array' }, detach_vpc2: { type: 'array' }, enable_vpc2: { type: 'boolean' }, tags: { type: 'array' } } } ``` -------------------------------- ### Getting a Specific DNS Record - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/dns.js.html Defines the configuration for retrieving a specific DNS record by its ID within a given domain. It uses a GET request and requires an API key. Parameters include the required 'dns-domain' and 'record-id' in the path. ```javascript exports.getRecord = { url: '/domains/{dns-domain}/records/{record-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'dns-domain': { type: 'string', path: true, required: true }, 'record-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Create Managed Database - Vultr API - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Defines the configuration for creating a new Vultr Managed Database. This POST request targets the '/databases' endpoint and requires an API key. It requires parameters like engine, version, region, plan, and label, and supports various optional configuration options. ```javascript exports.createDatabase = { url: '/databases', requestType: 'POST', apiKeyRequired: true, parameters: { database_engine: { type: 'string', required: true }, database_engine_version: { type: 'string', required: true }, region: { type: 'string', required: true }, plan: { type: 'string', required: true }, label: { type: 'string', required: true }, tag: { type: 'string' }, maintenance_dow: { type: 'string' }, maintenance_time: { type: 'string' }, trusted_ips: { type: 'array' }, mysql_sql_modes: { type: 'array' }, mysql_require_primary_key: { type: 'boolean' }, mysql_slow_query_log: { type: 'boolean' }, mysql_long_query_time: { type: 'number' }, redis_eviction_policy: { type: 'string' } } } ``` -------------------------------- ### Get Load Balancer Details - Vultr API - JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/load-balancers.js.html Defines the configuration for retrieving details of a specific load balancer by its ID. It uses a GET request to the '/load-balancers/{load-balancer-id}' endpoint and requires an API key. The load balancer ID is a required path parameter. ```JavaScript exports.getLoadBalancer = { url: '/load-balancers/{load-balancer-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'load-balancer-id': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Create Vultr User Configuration (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/users.js.html Configuration object for creating a new user on the account using a POST request. Requires an API key and mandatory parameters for email, name, and password. Optional parameters include API enabled status and ACLs. ```javascript exports.createUser = { url: '/users', requestType: 'POST', apiKeyRequired: true, parameters: { email: { type: 'string', required: true }, name: { type: 'string', required: true }, password: { type: 'string', required: true }, api_enabled: { type: 'boolean' }, acls: { type: 'array' } } } ``` -------------------------------- ### Get Available Kubernetes Cluster Upgrades - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for retrieving a list of available upgrade versions for a specified Vultr Kubernetes cluster. It requires the cluster ID (`vke-id`) in the path and uses a GET request to `/kubernetes/clusters/{vke-id}/available-upgrades`. This operation requires an API key. ```javascript exports.getKubernetesAvailableUpgrades = { url: '/kubernetes/clusters/{vke-id}/available-upgrades', requestType: 'GET', apiKeyRequired: true, parameters: { 'vke-id': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Define Get Connection Pool Endpoint - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/databases.js.html Configures the API endpoint for retrieving information about a specific connection pool within a Vultr Managed Database (PostgreSQL only). It specifies the URL path including both database ID and pool name, HTTP method (GET), and API key requirement. ```javascript exports.getConnectionPool = { url: '/databases/{database-id}/connection-pools/{pool-name}', requestType: 'GET', apiKeyRequired: true, parameters: { 'database-id': { type: 'string', path: true, required: true }, 'pool-name': { type: 'string', path: true, required: true } } } ``` -------------------------------- ### Create Snapshot from URL - Vultr API - JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/snapshots.js.html Configures the API call to create a new snapshot by downloading an image from a specified URL. Requires the URL and optionally accepts a description. ```javascript exports.createSnapshotFromUrl = { url: '/snapshots/create-from-url', requestType: 'POST', apiKeyRequired: true, parameters: { url: { type: 'string', required: true }, description: { type: 'string' } } } ``` -------------------------------- ### Define Get Firewall Rule Endpoint Configuration - Vultr Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/firewall.js.html This JavaScript object literal defines the configuration for the API endpoint to retrieve a specific firewall rule. It specifies the URL pattern, request type (GET), requirement for an API key, and details the required path parameters: 'firewall-group-id' and 'firewall-rule-id'. ```javascript url: '/firewalls/{firewall-group-id}/rules/{firewall-rule-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'firewall-group-id': { type: 'string', path: true, required: true }, 'firewall-rule-id': { type: 'string', path: true, required: true } } ``` -------------------------------- ### Create Snapshot from Instance - Vultr API - JavaScript Source: https://github.com/vultr/vultr-node/blob/master/docs/snapshots.js.html Configures the API call to create a new snapshot from an existing instance. Requires the instance ID and optionally accepts a description. ```javascript exports.createSnapshot = { url: '/snapshots', requestType: 'POST', apiKeyRequired: true, parameters: { instance_id: { type: 'string', required: true }, description: { type: 'string' } } } ``` -------------------------------- ### Getting Vultr Kubernetes Cluster Resources (Node.js) Source: https://github.com/vultr/vultr-node/blob/master/docs/kubernetes.js.html Defines the configuration for retrieving information about the block storage and load balancers linked to a specific Kubernetes cluster on Vultr. It specifies the API endpoint with a path parameter for the cluster ID and a path segment for resources, the request type (GET), requirement for an API key, and the definition of the required 'vke-id' path parameter. ```javascript exports.getKubernetesResources = { url: '/kubernetes/clusters/{vke-id}/resources', requestType: 'GET', apiKeyRequired: true, parameters: { 'vke-id': { type: 'string', required: true, path: true } } } ``` -------------------------------- ### Get VPC2 Information - Node.js Source: https://github.com/vultr/vultr-node/blob/master/docs/vpc2.js.html Defines the configuration for retrieving information about a specific Vultr VPC2. Requires the VPC ID as a path parameter and an API key. ```javascript exports.getVpc = { url: '/vpc2/{vpc-id}', requestType: 'GET', apiKeyRequired: true, parameters: { 'vpc-id': { type: 'string', path: true, required: true } } } ```