LanApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

datacentersLansDelete

object datacentersLansDelete(datacenterId, lanId, opts)

Delete a Lan.

Removes the specific Lan

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Delete a Lan.
api_instance
  .datacentersLansDelete({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersLansFindById

datacentersLansFindById(datacenterId, lanId, opts)

Retrieve a Lan

Retrieves the attributes of a given LAN

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Retrieve a Lan
api_instance
  .datacentersLansFindById({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Lan

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersLansGet

datacentersLansGet(datacenterId, opts)

List Lans

Retrieve a list of LANs within the datacenter

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// List Lans
api_instance
  .datacentersLansGet({
    datacenterId: datacenterId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Lans

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersLansNicsFindById

datacentersLansNicsFindById(datacenterId, lanId, nicId, opts)

Retrieve a nic attached to lan

This will retrieve the properties of an attached nic.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Retrieve a nic attached to lan
api_instance
  .datacentersLansNicsFindById({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    nicId: nicId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersLansNicsGet

datacentersLansNicsGet(datacenterId, lanId, opts)

List Lan Members

You can retrieve a list of nics attached to a lan

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// List Lan Members 
api_instance
  .datacentersLansNicsGet({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56,
    offset: 56,
    limit: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

LanNics

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacentersLansNicsPost

datacentersLansNicsPost(datacenterId, lanId, nic, opts)

Attach a nic

This will attach a pre-existing nic to a lan.

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Attach a nic
api_instance
  .datacentersLansNicsPost({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    nic: nic_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersLansPatch

datacentersLansPatch(datacenterId, lanId, lan, opts)

Partially modify a Lan

You can use update attributes of a resource

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Partially modify a Lan
api_instance
  .datacentersLansPatch({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    lan: lan_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Lan

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersLansPost

datacentersLansPost(datacenterId, lan, opts)

Create a Lan

Creates a LAN within the datacenter

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Create a Lan
api_instance
  .datacentersLansPost({
    datacenterId: datacenterId_example,
    lan: lan_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

LanPost

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacentersLansPut

datacentersLansPut(datacenterId, lanId, lan, opts)

Modify a Lan

You can use update attributes of a resource

Examples

const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.LanApi(config);
// Modify a Lan
api_instance
  .datacentersLansPut({
    datacenterId: datacenterId_example,
    lanId: lanId_example,
    lan: lan_example,
    pretty: true,
    depth: 56,
    xContractNumber: 56, 
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));

Parameters

Return type

Lan

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

Last updated