LoadBalancerApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
DatacentersLoadbalancersBalancednicsDelete
var result map[string]interface{} = DatacentersLoadbalancersBalancednicsDelete(ctx, datacenterId, loadbalancerId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Detach a nic from loadbalancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
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.LoadBalancerApi.DatacentersLoadbalancersBalancednicsDelete(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersBalancednicsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersBalancednicsDelete`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsDeleteRequest struct via the builder pattern
Return type
map[string]interface{}
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersBalancednicsFindByNicId
var result Nic = DatacentersLoadbalancersBalancednicsFindByNicId(ctx, datacenterId, loadbalancerId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Retrieve a nic attached to Load Balancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
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.LoadBalancerApi.DatacentersLoadbalancersBalancednicsFindByNicId(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersBalancednicsFindByNicId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsFindByNicId`: Nic
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersBalancednicsFindByNicId`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsFindByNicIdRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersBalancednicsGet
var result BalancedNics = DatacentersLoadbalancersBalancednicsGet(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()
List Load Balancer Members
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
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.LoadBalancerApi.DatacentersLoadbalancersBalancednicsGet(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersBalancednicsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsGet`: BalancedNics
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersBalancednicsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsGetRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersBalancednicsPost
var result Nic = DatacentersLoadbalancersBalancednicsPost(ctx, datacenterId, loadbalancerId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Attach a nic to Load Balancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | Nic id 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.LoadBalancerApi.DatacentersLoadbalancersBalancednicsPost(context.Background(), datacenterId, loadbalancerId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersBalancednicsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsPost`: Nic
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersBalancednicsPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersBalancednicsPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersLoadbalancersDelete
var result map[string]interface{} = DatacentersLoadbalancersDelete(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Delete a Loadbalancer.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
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.LoadBalancerApi.DatacentersLoadbalancersDelete(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersDelete`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersDelete`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersDeleteRequest struct via the builder pattern
Return type
map[string]interface{}
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersFindById
var result Loadbalancer = DatacentersLoadbalancersFindById(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Retrieve a loadbalancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
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.LoadBalancerApi.DatacentersLoadbalancersFindById(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersFindById`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersFindById`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersFindByIdRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersGet
var result Loadbalancers = DatacentersLoadbalancersGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()
List Load Balancers
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
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.LoadBalancerApi.DatacentersLoadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersGet`: Loadbalancers
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersGetRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
DatacentersLoadbalancersPatch
var result Loadbalancer = DatacentersLoadbalancersPatch(ctx, datacenterId, loadbalancerId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Partially modify a Loadbalancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
loadbalancer := *openapiclient.NewLoadbalancerProperties() // LoadbalancerProperties | Modified Loadbalancer
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.LoadBalancerApi.DatacentersLoadbalancersPatch(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPatch`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersPatch`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPatchRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersLoadbalancersPost
var result Loadbalancer = DatacentersLoadbalancersPost(ctx, datacenterId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Create a Load Balancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | Loadbalancer 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.LoadBalancerApi.DatacentersLoadbalancersPost(context.Background(), datacenterId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPost`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
DatacentersLoadbalancersPut
var result Loadbalancer = DatacentersLoadbalancersPut(ctx, datacenterId, loadbalancerId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()
Modify a Load Balancer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the datacenter
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer
loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | Modified Loadbalancer
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.LoadBalancerApi.DatacentersLoadbalancersPut(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancerApi.DatacentersLoadbalancersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPut`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancerApi.DatacentersLoadbalancersPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiDatacentersLoadbalancersPutRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
Last updated