var result map[string]interface{} =DatacentersLansDelete(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Delete a Lan.
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansDelete(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansDelete`: map[string]interface{} fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansDelete`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
Return type
map[string]interface{}
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLansFindById
var result Lan=DatacentersLansFindById(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Retrieve a Lan
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansFindById(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansFindById`: Lan fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansFindById`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
var result Lans=DatacentersLansGet(ctx, datacenterId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute()
List Lans
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansGet`: Lans fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansGet`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with <code>offset</code> for pagination)
var result Nic=DatacentersLansNicsFindById(ctx, datacenterId, lanId, nicId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Retrieve a nic attached to lan
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN nicId :="nicId_example"// string | The unique ID of the NIC pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansNicsFindById(context.Background(), datacenterId, lanId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansNicsFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansNicsFindById`: Nic fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansNicsFindById`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
nicId
string
The unique ID of the NIC
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansNicsFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
var result LanNics=DatacentersLansNicsGet(ctx, datacenterId, lanId) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Offset(offset) .Limit(limit) .Execute()
List Lan Members
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
offset := int32(56) // int32 | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (optional) (default to 0)
limit := int32(56) // int32 | the maximum number of elements to return (use together with <code>offset</code> for pagination) (optional) (default to 1000)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansNicsGet(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansNicsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansNicsGet`: LanNics fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansNicsGet`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansNicsGetRequest struct via the builder pattern
Name
Type
Description
Notes
pretty
bool
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
offset
int32
the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
[default to 0]
limit
int32
the maximum number of elements to return (use together with <code>offset</code> for pagination)
var result Nic=DatacentersLansNicsPost(ctx, datacenterId, lanId) .Nic(nic) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Attach a nic
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN nic :=*openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | Nic to be attached pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansNicsPost(context.Background(), datacenterId, lanId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansNicsPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansNicsPost`: Nic fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansNicsPost`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansNicsPostRequest struct via the builder pattern
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
var result Lan=DatacentersLansPatch(ctx, datacenterId, lanId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Partially modify a Lan
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN lan :=*openapiclient.NewLanProperties() // LanProperties | Modified Lan pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansPatch(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansPatch`: Lan fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansPatch`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansPatchRequest struct via the builder pattern
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
var result LanPost=DatacentersLansPost(ctx, datacenterId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Create a Lan
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lan :=*openapiclient.NewLanPost(*openapiclient.NewLanPropertiesPost()) // LanPost | Lan to be created pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansPost(context.Background(), datacenterId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansPost``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansPost`: LanPost fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansPost`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansPostRequest struct via the builder pattern
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
var result Lan=DatacentersLansPut(ctx, datacenterId, lanId) .Lan(lan) .Pretty(pretty) .Depth(depth) .XContractNumber(xContractNumber) .Execute()
Modify a Lan
Example
packagemainimport ("context""fmt""os" openapiclient "./openapi")funcmain() { datacenterId :="datacenterId_example"// string | The unique ID of the datacenter lanId :="lanId_example"// string | The unique ID of the LAN lan :=*openapiclient.NewLan(*openapiclient.NewLanProperties()) // Lan | Modified Lan pretty := true // bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to true)
depth := int32(56) // int32 | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (optional) (default to 0)
xContractNumber := int32(56) // int32 | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.LanApi.DatacentersLansPut(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err !=nil { fmt.Fprintf(os.Stderr, "Error when calling `LanApi.DatacentersLansPut``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) }// response from `DatacentersLansPut`: Lan fmt.Fprintf(os.Stdout, "Response from `LanApi.DatacentersLansPut`: %v\n", resp)}
Path Parameters
Name
Type
Description
Notes
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
datacenterId
string
The unique ID of the datacenter
lanId
string
The unique ID of the LAN
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLansPutRequest struct via the builder pattern
Controls whether response is pretty-printed (with indentation and new lines)
[default to true]
depth
int32
Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
[default to 0]
xContractNumber
int32
Users having more than 1 contract need to provide contract number, against which all API requests should be executed