1.7.16 • Published 4 years ago

ecl2-sdk v1.7.16

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

#Usage:

const ECL2 = require('ecl2-sdk')

const options = {
    apiKey: 'your-api-key',
    apiSecret: 'your-api-secret',
    tenantId: 'your-tenant-id',
    zone: 'your-zone',
    authUrl: 'your-auth-url',
    appendVersionInPath: false,
}

const run = async () => {
    try {
        const c = await ECL2.Client(options)

        //Or instantiate with an existing token
        //const withToken = {
        //    token: "existing-token",
        //    tenantId: 'your-tenant-id',
        //    zone: 'your-zone',
        //    authUrl: 'your-auth-url',
        //    appendVersionInPath: false,
        //}
        //const c = await ECL2.Client(withToken)

        c.listServers()
        c.getServer({ id: 'server-id' })

        c.listNetworks()
        c.getNetwork({ id: 'net-id' })
        c.updateNetwork({ id: 'net-id', payload: { name: 'newName' } })
        c.createNetwork({ payload: { name: 'newName' } })
        c.deleteNetwork({ id: 'net-id' })

        c.listLoadbalancers()
        c.getLoadbalancer({ id: 'lb-id' })

        c.listFirewalls()
        c.getFirewall({ id: 'fw-id' })

        c.listZones()
        c.listCatalog()
    } catch (err) {
        console.error(err)
    }
}
run()

Supported methods

Server

  • listServers
  • getServer
  • startServer
  • stopServer
  • deleteServer
  • getConsole
  • resizeServer

Baremetal Server

  • listBaremetalServers
  • listBaremetalFlavors
  • getBaremetalServer
  • deleteBaremetalServer
  • getBaremetalConsole
  • startBaremetalServer
  • stopBaremetalServer
  • rebootBaremetalServer
  • listBaremetalZones
  • listBaremetalKeypairs
  • listBaremetalServerMetadata
  • listBaremetalLimits

Network

  • listNetworks
  • getNetwork
  • createNetwork
  • updateNetwork
  • deleteNetwork
  • listSubnets
  • getSubnet

Firewall

  • listFirewalls
  • getFirewall
  • listFirewallInterfaces
  • getFirewallPlan

Loadbalancer

  • listLoadbalancers
  • getLoadbalancer
  • deleteLoadbalancer
  • getLoadBalancerPlan
  • listLoadbalancerInterfaces

Availability Zone

  • listZones

Catalog

  • listCatalog

Keypairs

  • listKeypairs
  • deleteKeypair

Zones

  • listZones

Monitoring

  • listSamples
  • listMeters

Internet Gateway

  • listInternetGateways
  • getInternetGateway
  • deleteInternetGateway
  • getInternetService
  • listGlobalIps
  • listGatewayInterfaces
  • listStaticRoutes

VPN Gateway

  • listVPNGateways

Snapshots

  • listSnapshots
  • getImageDetails

Volumes

  • listVolumes
  • getVolume
  • deleteVolume
  • listStorageVolumes
  • attachVolume
  • dettachVolume

VNA

  • listVNA
  • listVNAOperations
  • getVNAPlan
  • deleteVNA
  • getVNA
  • startVNA
  • stopVNA

FIC

  • ficListRouters
  • ficListOperations
  • ficListRouterFirewalls
  • ficListRouterNATs
  • ficListNATGIPAddressSet
  • ficListLOAs
  • ficListConnections
  • ficListPorts

SSS

  • listSSS
  • sssListTenants
  • sssGetContractBill
1.7.16

4 years ago

1.7.13

4 years ago

1.7.12

4 years ago

1.7.11

4 years ago

1.7.10

5 years ago

1.7.9

5 years ago

1.7.8

5 years ago

1.7.7

5 years ago

1.7.6

5 years ago

1.7.5

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago