Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
var result Info = ApiInfoGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DefaultApi.ApiInfoGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ApiInfoGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiInfoGet`: Info
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ApiInfoGet`: %v\n", resp)
}LoggingFormatkubernetesNodePoolForPutkubernetesNodePoolPassword field to UserPropertiesPut to allow user password updateFormatStringErrgofmtvar result Contracts = ContractsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ContractResourcesApi.ContractsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractResourcesApi.ContractsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ContractsGet`: Contracts
fmt.Fprintf(os.Stdout, "Response from `ContractResourcesApi.ContractsGet`: %v\n", resp)
}var result Template = TemplatesFindById(ctx, templateId)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
templateId := "templateId_example" // string | The unique template ID.
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TemplatesApi.TemplatesFindById(context.Background(), templateId).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TemplatesFindById`: Template
fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesFindById`: %v\n", resp)
}var result Templates = TemplatesGet(ctx)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TemplatesApi.TemplatesGet(context.Background()).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TemplatesGet`: Templates
fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.TemplatesGet`: %v\n", resp)
}var result Locations = LocationsFindByRegionId(ctx, regionId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
regionId := "regionId_example" // string | The unique ID of the region.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LocationsApi.LocationsFindByRegionId(context.Background(), regionId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsFindByRegionId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LocationsFindByRegionId`: Locations
fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsFindByRegionId`: %v\n", resp)
}var result Location = LocationsFindByRegionIdAndId(ctx, regionId, locationId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
regionId := "regionId_example" // string | The unique ID of the region.
locationId := "locationId_example" // string | The unique ID of the location.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LocationsApi.LocationsFindByRegionIdAndId(context.Background(), regionId, locationId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsFindByRegionIdAndId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LocationsFindByRegionIdAndId`: Location
fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsFindByRegionIdAndId`: %v\n", resp)
}var result Locations = LocationsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LocationsApi.LocationsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LocationsApi.LocationsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LocationsGet`: Locations
fmt.Fprintf(os.Stdout, "Response from `LocationsApi.LocationsGet`: %v\n", resp)
}var result Request = RequestsFindById(ctx, requestId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
requestId := "requestId_example" // string | The unique ID of the request.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.RequestsApi.RequestsFindById(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RequestsFindById`: Request
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsFindById`: %v\n", resp)
}var result Requests = RequestsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.FilterStatus(filterStatus)
.FilterCreatedAfter(filterCreatedAfter)
.FilterCreatedBefore(filterCreatedBefore)
.FilterCreatedDate(filterCreatedDate)
.FilterCreatedBy(filterCreatedBy)
.FilterEtag(filterEtag)
.FilterRequestStatus(filterRequestStatus)
.FilterMethod(filterMethod)
.FilterHeaders(filterHeaders)
.FilterBody(filterBody)
.FilterUrl(filterUrl)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
filterStatus := "filterStatus_example" // string | Filter the list by request status [QUEUED, RUNNING, DONE, FAILED]. Filter is not affected by the depth query parameter. (optional)
filterCreatedAfter := "filterCreatedAfter_example" // string | Filter the list to only include the requests created after the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional)
filterCreatedBefore := "filterCreatedBefore_example" // string | Filter the list to only include the requests created before the date, specified in the yyyy-MM-dd HH:mm:ss format. Filter is not affected by the depth query parameter. (optional)
filterCreatedDate := "filterCreatedDate_example" // string | Filter the list to only include the requests that contain the createdDate, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterCreatedBy := "filterCreatedBy_example" // string | Filter the list to only include the requests that contain the createdBy, specified in the yyyy-MM-dd HH:mm:ss format. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterEtag := "filterEtag_example" // string | Filter the list to only include the requests that contain the specified etag. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterRequestStatus := "filterRequestStatus_example" // string | Filter the list to only include the requests that contain the specified requestStatus. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterMethod := "filterMethod_example" // string | Filter the list to only include the requests that contain the specified method. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterHeaders := "filterHeaders_example" // string | Filter the list to only include the requests that contain the specified headers. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterBody := "filterBody_example" // string | Filter the list to only include the requests that contain the specified body. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
filterUrl := "filterUrl_example" // string | Filter the list to only include the requests that contain the specified URL. The value is not case-sensitive, and the filter requires that the depth query parameter value is greater than zero. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.RequestsApi.RequestsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).FilterStatus(filterStatus).FilterCreatedAfter(filterCreatedAfter).FilterCreatedBefore(filterCreatedBefore).FilterCreatedDate(filterCreatedDate).FilterCreatedBy(filterCreatedBy).FilterEtag(filterEtag).FilterRequestStatus(filterRequestStatus).FilterMethod(filterMethod).FilterHeaders(filterHeaders).FilterBody(filterBody).FilterUrl(filterUrl).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RequestsGet`: Requests
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsGet`: %v\n", resp)
}var result RequestStatus = RequestsStatusGet(ctx, requestId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
requestId := "requestId_example" // string | The unique ID of the request.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.RequestsApi.RequestsStatusGet(context.Background(), requestId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.RequestsStatusGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RequestsStatusGet`: RequestStatus
fmt.Fprintf(os.Stdout, "Response from `RequestsApi.RequestsStatusGet`: %v\n", resp)
}var result = SnapshotsDelete(ctx, snapshotId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.SnapshotsApi.SnapshotsDelete(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Snapshot = SnapshotsFindById(ctx, snapshotId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SnapshotsApi.SnapshotsFindById(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsFindById`: Snapshot
fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsFindById`: %v\n", resp)
}var result Snapshots = SnapshotsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SnapshotsApi.SnapshotsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsGet`: Snapshots
fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsGet`: %v\n", resp)
}var result Snapshot = SnapshotsPatch(ctx, snapshotId)
.Snapshot(snapshot)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
snapshot := *openapiclient.NewSnapshotProperties() // SnapshotProperties | The properties of the snapshot to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SnapshotsApi.SnapshotsPatch(context.Background(), snapshotId).Snapshot(snapshot).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsPatch`: Snapshot
fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsPatch`: %v\n", resp)
}var result Snapshot = SnapshotsPut(ctx, snapshotId)
.Snapshot(snapshot)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
snapshot := *openapiclient.NewSnapshot(*openapiclient.NewSnapshotProperties()) // Snapshot | The modified snapshot
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SnapshotsApi.SnapshotsPut(context.Background(), snapshotId).Snapshot(snapshot).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.SnapshotsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsPut`: Snapshot
fmt.Fprintf(os.Stdout, "Response from `SnapshotsApi.SnapshotsPut`: %v\n", resp)
}var result = PccsDelete(ctx, pccId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pccId := "pccId_example" // string | The unique ID of the Cross Connect.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.PrivateCrossConnectsApi.PccsDelete(context.Background(), pccId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result PrivateCrossConnect = PccsFindById(ctx, pccId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pccId := "pccId_example" // string | The unique ID of the Cross Connect.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsFindById(context.Background(), pccId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PccsFindById`: PrivateCrossConnect
fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsFindById`: %v\n", resp)
}var result PrivateCrossConnects = PccsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PccsGet`: PrivateCrossConnects
fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsGet`: %v\n", resp)
}var result PrivateCrossConnect = PccsPatch(ctx, pccId)
.Pcc(pcc)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pccId := "pccId_example" // string | The unique ID of the Cross Connect.
pcc := *openapiclient.NewPrivateCrossConnectProperties() // PrivateCrossConnectProperties | The properties of the Cross Connect to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsPatch(context.Background(), pccId).Pcc(pcc).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PccsPatch`: PrivateCrossConnect
fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsPatch`: %v\n", resp)
}var result PrivateCrossConnect = PccsPost(ctx)
.Pcc(pcc)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pcc := *openapiclient.NewPrivateCrossConnect(*openapiclient.NewPrivateCrossConnectProperties()) // PrivateCrossConnect | The Cross Connect to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.PrivateCrossConnectsApi.PccsPost(context.Background()).Pcc(pcc).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PrivateCrossConnectsApi.PccsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PccsPost`: PrivateCrossConnect
fmt.Fprintf(os.Stdout, "Response from `PrivateCrossConnectsApi.PccsPost`: %v\n", resp)
}var result = ImagesDelete(ctx, imageId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ImagesApi.ImagesDelete(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Image = ImagesFindById(ctx, imageId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ImagesApi.ImagesFindById(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesFindById`: Image
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesFindById`: %v\n", resp)
}var result Images = ImagesGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ImagesApi.ImagesGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesGet`: Images
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesGet`: %v\n", resp)
}var result Image = ImagesPatch(ctx, imageId)
.Image(image)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
image := *openapiclient.NewImageProperties("LINUX") // ImageProperties | The image properties to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ImagesApi.ImagesPatch(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesPatch`: Image
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPatch`: %v\n", resp)
}var result Image = ImagesPut(ctx, imageId)
.Image(image)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
image := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | The modified image
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ImagesApi.ImagesPut(context.Background(), imageId).Image(image).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImagesApi.ImagesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesPut`: Image
fmt.Fprintf(os.Stdout, "Response from `ImagesApi.ImagesPut`: %v\n", resp)
}var result = IpblocksDelete(ctx, ipblockId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.IPBlocksApi.IpblocksDelete(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result IpBlock = IpblocksFindById(ctx, ipblockId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.IPBlocksApi.IpblocksFindById(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksFindById`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksFindById`: %v\n", resp)
}var result IpBlocks = IpblocksGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 100)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.IPBlocksApi.IpblocksGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksGet`: IpBlocks
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksGet`: %v\n", resp)
}var result IpBlock = IpblocksPatch(ctx, ipblockId)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
ipblock := *openapiclient.NewIpBlockProperties("us/las", int32(5)) // IpBlockProperties | The properties of the IP block to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.IPBlocksApi.IpblocksPatch(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPatch`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPatch`: %v\n", resp)
}var result IpBlock = IpblocksPost(ctx)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The IP block to be reserved.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.IPBlocksApi.IpblocksPost(context.Background()).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPost`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPost`: %v\n", resp)
}var result IpBlock = IpblocksPut(ctx, ipblockId)
.Ipblock(ipblock)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
ipblock := *openapiclient.NewIpBlock(*openapiclient.NewIpBlockProperties("us/las", int32(5))) // IpBlock | The modified IP block.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.IPBlocksApi.IpblocksPut(context.Background(), ipblockId).Ipblock(ipblock).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IPBlocksApi.IpblocksPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksPut`: IpBlock
fmt.Fprintf(os.Stdout, "Response from `IPBlocksApi.IpblocksPut`: %v\n", resp)
}var result = UmUsersS3keysDelete(ctx, userId, keyId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
keyId := "keyId_example" // string | The unique ID of the Object storage key.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UserS3KeysApi.UmUsersS3keysDelete(context.Background(), userId, keyId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result S3Key = UmUsersS3keysFindByKeyId(ctx, userId, keyId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
keyId := "keyId_example" // string | The unique ID of the Object storage key.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysFindByKeyId(context.Background(), userId, keyId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysFindByKeyId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersS3keysFindByKeyId`: S3Key
fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysFindByKeyId`: %v\n", resp)
}var result S3Keys = UmUsersS3keysGet(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersS3keysGet`: S3Keys
fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysGet`: %v\n", resp)
}var result S3Key = UmUsersS3keysPost(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysPost(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersS3keysPost`: S3Key
fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysPost`: %v\n", resp)
}var result S3Key = UmUsersS3keysPut(ctx, userId, keyId)
.S3Key(s3Key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
keyId := "keyId_example" // string | The unique ID of the Object storage key.
s3Key := *openapiclient.NewS3Key(*openapiclient.NewS3KeyProperties()) // S3Key | The modified Object storage key.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3keysPut(context.Background(), userId, keyId).S3Key(s3Key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3keysPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersS3keysPut`: S3Key
fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3keysPut`: %v\n", resp)
}var result S3ObjectStorageSSO = UmUsersS3ssourlGet(ctx, userId)
.Pretty(pretty)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserS3KeysApi.UmUsersS3ssourlGet(context.Background(), userId).Pretty(pretty).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserS3KeysApi.UmUsersS3ssourlGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersS3ssourlGet`: S3ObjectStorageSSO
fmt.Fprintf(os.Stdout, "Response from `UserS3KeysApi.UmUsersS3ssourlGet`: %v\n", resp)
}var result = DatacentersDelete(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.DataCentersApi.DatacentersDelete(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Datacenter = DatacentersFindById(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DataCentersApi.DatacentersFindById(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersFindById`: Datacenter
fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersFindById`: %v\n", resp)
}var result Datacenters = DatacentersGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DataCentersApi.DatacentersGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersGet`: Datacenters
fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersGet`: %v\n", resp)
}var result Datacenter = DatacentersPatch(ctx, datacenterId)
.Datacenter(datacenter)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
datacenter := *openapiclient.NewDatacenterPropertiesPut() // DatacenterPropertiesPut | The properties of the data center to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DataCentersApi.DatacentersPatch(context.Background(), datacenterId).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersPatch`: Datacenter
fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPatch`: %v\n", resp)
}var result Datacenter = DatacentersPost(ctx)
.Datacenter(datacenter)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenter := *openapiclient.NewDatacenterPost(*openapiclient.NewDatacenterPropertiesPost("us/las")) // DatacenterPost | The data center to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DataCentersApi.DatacentersPost(context.Background()).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersPost`: Datacenter
fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPost`: %v\n", resp)
}var result Datacenter = DatacentersPut(ctx, datacenterId)
.Datacenter(datacenter)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
datacenter := *openapiclient.NewDatacenterPut(*openapiclient.NewDatacenterPropertiesPut()) // DatacenterPut | The modified data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.DataCentersApi.DatacentersPut(context.Background(), datacenterId).Datacenter(datacenter).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataCentersApi.DatacentersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersPut`: Datacenter
fmt.Fprintf(os.Stdout, "Response from `DataCentersApi.DatacentersPut`: %v\n", resp)
}var result = TargetGroupsDelete(ctx, targetGroupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
targetGroupId := "targetGroupId_example" // string | The unique ID of the target group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.TargetGroupsApi.TargetGroupsDelete(context.Background(), targetGroupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetGroupsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result TargetGroup = TargetgroupsFindByTargetGroupId(ctx, targetGroupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
targetGroupId := "targetGroupId_example" // string | The unique ID of the target group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsFindByTargetGroupId(context.Background(), targetGroupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsFindByTargetGroupId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TargetgroupsFindByTargetGroupId`: TargetGroup
fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsFindByTargetGroupId`: %v\n", resp)
}var result TargetGroups = TargetgroupsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (used together with <b><i>offset</i></b> for pagination). It must not exceed <b><i>200</i></b>. (optional) (default to 100)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TargetgroupsGet`: TargetGroups
fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsGet`: %v\n", resp)
}var result TargetGroup = TargetgroupsPatch(ctx, targetGroupId)
.TargetGroupProperties(targetGroupProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
targetGroupId := "targetGroupId_example" // string | The unique ID of the target group.
targetGroupProperties := *openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP") // TargetGroupProperties | The target group properties to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPatch(context.Background(), targetGroupId).TargetGroupProperties(targetGroupProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TargetgroupsPatch`: TargetGroup
fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPatch`: %v\n", resp)
}var result TargetGroup = TargetgroupsPost(ctx)
.TargetGroup(targetGroup)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
targetGroup := *openapiclient.NewTargetGroup(*openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP")) // TargetGroup | The target group to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPost(context.Background()).TargetGroup(targetGroup).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TargetgroupsPost`: TargetGroup
fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPost`: %v\n", resp)
}var result TargetGroup = TargetgroupsPut(ctx, targetGroupId)
.TargetGroup(targetGroup)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
targetGroupId := "targetGroupId_example" // string | The unique ID of the target group.
targetGroup := *openapiclient.NewTargetGroupPut(*openapiclient.NewTargetGroupProperties("My target group", "ROUND_ROBIN", "HTTP")) // TargetGroupPut | The modified target group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.TargetGroupsApi.TargetgroupsPut(context.Background(), targetGroupId).TargetGroup(targetGroup).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TargetGroupsApi.TargetgroupsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TargetgroupsPut`: TargetGroup
fmt.Fprintf(os.Stdout, "Response from `TargetGroupsApi.TargetgroupsPut`: %v\n", resp)
}var result = BackupunitsDelete(ctx, backupunitId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.BackupUnitsApi.BackupunitsDelete(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result BackupUnit = BackupunitsFindById(ctx, backupunitId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsFindById(context.Background(), backupunitId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsFindById`: BackupUnit
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsFindById`: %v\n", resp)
}var result BackupUnits = BackupunitsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsGet`: BackupUnits
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsGet`: %v\n", resp)
}var result BackupUnit = BackupunitsPatch(ctx, backupunitId)
.BackupUnit(backupUnit)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
backupUnit := *openapiclient.NewBackupUnitProperties("BackupUnitName") // BackupUnitProperties | The properties of the backup unit to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPatch(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsPatch`: BackupUnit
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPatch`: %v\n", resp)
}var result BackupUnit = BackupunitsPost(ctx)
.BackupUnit(backupUnit)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The backup unit to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPost(context.Background()).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsPost`: BackupUnit
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPost`: %v\n", resp)
}var result BackupUnit = BackupunitsPut(ctx, backupunitId)
.BackupUnit(backupUnit)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
backupUnit := *openapiclient.NewBackupUnit(*openapiclient.NewBackupUnitProperties("BackupUnitName")) // BackupUnit | The modified backup unit.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsPut(context.Background(), backupunitId).BackupUnit(backupUnit).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsPut`: BackupUnit
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsPut`: %v\n", resp)
}var result BackupUnitSSO = BackupunitsSsourlGet(ctx, backupunitId)
.Pretty(pretty)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
backupunitId := "backupunitId_example" // string | The unique ID of the backup unit.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
xContractNumber := int32(56) // int32 | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.BackupUnitsApi.BackupunitsSsourlGet(context.Background(), backupunitId).Pretty(pretty).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BackupUnitsApi.BackupunitsSsourlGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BackupunitsSsourlGet`: BackupUnitSSO
fmt.Fprintf(os.Stdout, "Response from `BackupUnitsApi.BackupunitsSsourlGet`: %v\n", resp)
}var result = DatacentersServersNicsFlowlogsDelete(ctx, datacenterId, serverId, nicId, flowlogId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsDelete(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FlowLog = DatacentersServersNicsFlowlogsFindById(ctx, datacenterId, serverId, nicId, flowlogId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsFindById(context.Background(), datacenterId, serverId, nicId, flowlogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFlowlogsFindById`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsFindById`: %v\n", resp)
}var result FlowLogs = DatacentersServersNicsFlowlogsGet(ctx, datacenterId, serverId, nicId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsGet(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsGet`: %v\n", resp)
}var result FlowLog = DatacentersServersNicsFlowlogsPatch(ctx, datacenterId, serverId, nicId, flowlogId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
flowlog := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The Flow Log record to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPatch(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPatch`: %v\n", resp)
}var result FlowLog = DatacentersServersNicsFlowlogsPost(ctx, datacenterId, serverId, nicId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPost(context.Background(), datacenterId, serverId, nicId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPost`: %v\n", resp)
}var result FlowLog = DatacentersServersNicsFlowlogsPut(ctx, datacenterId, serverId, nicId, flowlogId)
.Flowlog(flowlog)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
flowlogId := "flowlogId_example" // string | The unique ID of the Flow Log.
flowlog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FlowLogsApi.DatacentersServersNicsFlowlogsPut(context.Background(), datacenterId, serverId, nicId, flowlogId).Flowlog(flowlog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowLogsApi.DatacentersServersNicsFlowlogsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFlowlogsPut`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `FlowLogsApi.DatacentersServersNicsFlowlogsPut`: %v\n", resp)
}var result = DatacentersServersNicsDelete(ctx, datacenterId, serverId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsDelete(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Nic = DatacentersServersNicsFindById(ctx, datacenterId, serverId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsFindById(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFindById`: Nic
fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsFindById`: %v\n", resp)
}var result Nics = DatacentersServersNicsGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsGet`: Nics
fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsGet`: %v\n", resp)
}var result Nic = DatacentersServersNicsPatch(ctx, datacenterId, serverId, nicId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
nic := *openapiclient.NewNicProperties(int32(2)) // NicProperties | The properties of the NIC to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPatch(context.Background(), datacenterId, serverId, nicId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsPatch`: Nic
fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPatch`: %v\n", resp)
}var result Nic = DatacentersServersNicsPost(ctx, datacenterId, serverId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPost(context.Background(), datacenterId, serverId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsPost`: Nic
fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPost`: %v\n", resp)
}var result Nic = DatacentersServersNicsPut(ctx, datacenterId, serverId, nicId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
nic := *openapiclient.NewNicPut(*openapiclient.NewNicProperties(int32(2))) // NicPut | The modified NIC
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkInterfacesApi.DatacentersServersNicsPut(context.Background(), datacenterId, serverId, nicId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkInterfacesApi.DatacentersServersNicsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsPut`: Nic
fmt.Fprintf(os.Stdout, "Response from `NetworkInterfacesApi.DatacentersServersNicsPut`: %v\n", resp)
}var result = DatacentersServersNicsFirewallrulesDelete(ctx, datacenterId, serverId, nicId, firewallruleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesDelete(context.Background(), datacenterId, serverId, nicId, firewallruleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FirewallRule = DatacentersServersNicsFirewallrulesFindById(ctx, datacenterId, serverId, nicId, firewallruleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById(context.Background(), datacenterId, serverId, nicId, firewallruleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFirewallrulesFindById`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesFindById`: %v\n", resp)
}var result FirewallRules = DatacentersServersNicsFirewallrulesGet(ctx, datacenterId, serverId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesGet(context.Background(), datacenterId, serverId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFirewallrulesGet`: FirewallRules
fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesGet`: %v\n", resp)
}var result FirewallRule = DatacentersServersNicsFirewallrulesPatch(ctx, datacenterId, serverId, nicId, firewallruleId)
.Firewallrule(firewallrule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule.
firewallrule := *openapiclient.NewFirewallruleProperties() // FirewallruleProperties | The properties of the firewall rule to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch(context.Background(), datacenterId, serverId, nicId, firewallruleId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFirewallrulesPatch`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPatch`: %v\n", resp)
}var result FirewallRule = DatacentersServersNicsFirewallrulesPost(ctx, datacenterId, serverId, nicId)
.Firewallrule(firewallrule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
firewallrule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties()) // FirewallRule | The firewall rule to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPost(context.Background(), datacenterId, serverId, nicId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFirewallrulesPost`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPost`: %v\n", resp)
}var result FirewallRule = DatacentersServersNicsFirewallrulesPut(ctx, datacenterId, serverId, nicId, firewallruleId)
.Firewallrule(firewallrule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the NIC.
firewallruleId := "firewallruleId_example" // string | The unique ID of the firewall rule.
firewallrule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties()) // FirewallRule | The modified firewall rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.FirewallRulesApi.DatacentersServersNicsFirewallrulesPut(context.Background(), datacenterId, serverId, nicId, firewallruleId).Firewallrule(firewallrule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallRulesApi.DatacentersServersNicsFirewallrulesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsFirewallrulesPut`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `FirewallRulesApi.DatacentersServersNicsFirewallrulesPut`: %v\n", resp)
}var result Snapshot = DatacentersVolumesCreateSnapshotPost(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Snapshot(snapshot)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
snapshot := *openapiclient.NewCreateSnapshot() // CreateSnapshot | The payload of the snapshot. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesCreateSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Snapshot(snapshot).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesCreateSnapshotPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesCreateSnapshotPost`: Snapshot
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesCreateSnapshotPost`: %v\n", resp)
}var result = DatacentersVolumesDelete(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.VolumesApi.DatacentersVolumesDelete(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Volume = DatacentersVolumesFindById(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesFindById(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesFindById`: Volume
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesFindById`: %v\n", resp)
}var result Volumes = DatacentersVolumesGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesGet`: Volumes
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesGet`: %v\n", resp)
}var result Volume = DatacentersVolumesPatch(ctx, datacenterId, volumeId)
.Volume(volume)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
volume := *openapiclient.NewVolumeProperties() // VolumeProperties | The properties of the volume to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPatch(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesPatch`: Volume
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPatch`: %v\n", resp)
}var result Volume = DatacentersVolumesPost(ctx, datacenterId)
.Volume(volume)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volume := *openapiclient.NewVolume() // Volume | The volume to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPost(context.Background(), datacenterId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesPost`: Volume
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPost`: %v\n", resp)
}var result Volume = DatacentersVolumesPut(ctx, datacenterId, volumeId)
.Volume(volume)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
volume := *openapiclient.NewVolume() // Volume | The modified volume
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesPut(context.Background(), datacenterId, volumeId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesPut`: Volume
fmt.Fprintf(os.Stdout, "Response from `VolumesApi.DatacentersVolumesPut`: %v\n", resp)
}var result = DatacentersVolumesRestoreSnapshotPost(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.RestoreSnapshot(restoreSnapshot)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
restoreSnapshot := *openapiclient.NewRestoreSnapshot() // RestoreSnapshot | The payload used to restore a snapshot. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.VolumesApi.DatacentersVolumesRestoreSnapshotPost(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).RestoreSnapshot(restoreSnapshot).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VolumesApi.DatacentersVolumesRestoreSnapshotPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result = DatacentersLansDelete(ctx, datacenterId, lanId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LANsApi.DatacentersLansDelete(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Lan = DatacentersLansFindById(ctx, datacenterId, lanId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansFindById(context.Background(), datacenterId, lanId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansFindById`: Lan
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansFindById`: %v\n", resp)
}var result Lans = DatacentersLansGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.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 `LANsApi.DatacentersLansGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansGet`: Lans
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansGet`: %v\n", resp)
}var result Nic = DatacentersLansNicsFindById(ctx, datacenterId, lanId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
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 the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansNicsFindById(context.Background(), datacenterId, lanId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansNicsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansNicsFindById`: Nic
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsFindById`: %v\n", resp)
}var result LanNics = DatacentersLansNicsGet(ctx, datacenterId, lanId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.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 `LANsApi.DatacentersLansNicsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansNicsGet`: LanNics
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsGet`: %v\n", resp)
}var result Nic = DatacentersLansNicsPost(ctx, datacenterId, lanId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to be attached.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansNicsPost(context.Background(), datacenterId, lanId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansNicsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansNicsPost`: Nic
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansNicsPost`: %v\n", resp)
}var result Lan = DatacentersLansPatch(ctx, datacenterId, lanId)
.Lan(lan)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
lan := *openapiclient.NewLanProperties() // LanProperties | The properties of the LAN to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansPatch(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansPatch`: Lan
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPatch`: %v\n", resp)
}var result Lan = DatacentersLansPost(ctx, datacenterId)
.Lan(lan)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lan := *openapiclient.NewLan(*openapiclient.NewLanProperties()) // Lan | The LAN to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansPost(context.Background(), datacenterId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansPost`: Lan
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPost`: %v\n", resp)
}var result Lan = DatacentersLansPut(ctx, datacenterId, lanId)
.Lan(lan)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
lanId := "lanId_example" // string | The unique ID of the LAN.
lan := *openapiclient.NewLan(*openapiclient.NewLanProperties()) // Lan | The modified LAN
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LANsApi.DatacentersLansPut(context.Background(), datacenterId, lanId).Lan(lan).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LANsApi.DatacentersLansPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLansPut`: Lan
fmt.Fprintf(os.Stdout, "Response from `LANsApi.DatacentersLansPut`: %v\n", resp)
}var result = DatacentersLoadbalancersBalancednicsDelete(ctx, datacenterId, loadbalancerId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
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 the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsDelete(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Nic = DatacentersLoadbalancersBalancednicsFindByNicId(ctx, datacenterId, loadbalancerId, nicId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
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 the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId(context.Background(), datacenterId, loadbalancerId, nicId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsFindByNicId`: Nic
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsFindByNicId`: %v\n", resp)
}var result BalancedNics = DatacentersLoadbalancersBalancednicsGet(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsGet`: BalancedNics
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsGet`: %v\n", resp)
}var result Nic = DatacentersLoadbalancersBalancednicsPost(ctx, datacenterId, loadbalancerId)
.Nic(nic)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
nic := *openapiclient.NewNic(*openapiclient.NewNicProperties(int32(2))) // Nic | The NIC to be attached.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost(context.Background(), datacenterId, loadbalancerId).Nic(nic).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersBalancednicsPost`: Nic
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersBalancednicsPost`: %v\n", resp)
}var result = DatacentersLoadbalancersDelete(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersDelete(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Loadbalancer = DatacentersLoadbalancersFindById(ctx, datacenterId, loadbalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersFindById(context.Background(), datacenterId, loadbalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersFindById`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersFindById`: %v\n", resp)
}var result Loadbalancers = DatacentersLoadbalancersGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.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 `LoadBalancersApi.DatacentersLoadbalancersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersGet`: Loadbalancers
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersGet`: %v\n", resp)
}var result Loadbalancer = DatacentersLoadbalancersPatch(ctx, datacenterId, loadbalancerId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
loadbalancer := *openapiclient.NewLoadbalancerProperties() // LoadbalancerProperties | The properties of the Load Balancer to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPatch(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPatch`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPatch`: %v\n", resp)
}var result Loadbalancer = DatacentersLoadbalancersPost(ctx, datacenterId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | The Load Balancer to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPost(context.Background(), datacenterId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPost`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPost`: %v\n", resp)
}var result Loadbalancer = DatacentersLoadbalancersPut(ctx, datacenterId, loadbalancerId)
.Loadbalancer(loadbalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
loadbalancerId := "loadbalancerId_example" // string | The unique ID of the Load Balancer.
loadbalancer := *openapiclient.NewLoadbalancer(*openapiclient.NewLoadbalancerProperties()) // Loadbalancer | The modified Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LoadBalancersApi.DatacentersLoadbalancersPut(context.Background(), datacenterId, loadbalancerId).Loadbalancer(loadbalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancersApi.DatacentersLoadbalancersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLoadbalancersPut`: Loadbalancer
fmt.Fprintf(os.Stdout, "Response from `LoadBalancersApi.DatacentersLoadbalancersPut`: %v\n", resp)
}var result = DatacentersSecuritygroupsDelete(ctx, datacenterId, securityGroupId)
.Pretty(pretty)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the Security Group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsDelete(context.Background(), datacenterId, securityGroupId).Pretty(pretty).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result SecurityGroup = DatacentersSecuritygroupsFindById(ctx, datacenterId, securityGroupId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsFindById(context.Background(), datacenterId, securityGroupId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsFindById`: SecurityGroup
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsFindById`: %v\n", resp)
}var result = DatacentersSecuritygroupsFirewallrulesDelete(ctx, datacenterId, securityGroupId, ruleId)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
ruleId := "ruleId_example" // string | The unique ID of the firewall rule.
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsFirewallrulesDelete(context.Background(), datacenterId, securityGroupId, ruleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsFirewallrulesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FirewallRule = DatacentersSecuritygroupsFirewallrulesPost(ctx, datacenterId, securityGroupId)
.FirewallRule(firewallRule)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
firewallRule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties()) // FirewallRule | The firewall to be attached (or created and attached).
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsFirewallrulesPost(context.Background(), datacenterId, securityGroupId).FirewallRule(firewallRule).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsFirewallrulesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsFirewallrulesPost`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsFirewallrulesPost`: %v\n", resp)
}var result SecurityGroups = DatacentersSecuritygroupsGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsGet`: SecurityGroups
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsGet`: %v\n", resp)
}var result SecurityGroup = DatacentersSecuritygroupsPatch(ctx, datacenterId, securityGroupId)
.SecurityGroup(securityGroup)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the Security Group.
securityGroup := *openapiclient.NewSecurityGroupProperties("My security group") // SecurityGroupProperties | The modified Security Group
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsPatch(context.Background(), datacenterId, securityGroupId).SecurityGroup(securityGroup).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsPatch`: SecurityGroup
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsPatch`: %v\n", resp)
}var result SecurityGroup = DatacentersSecuritygroupsPost(ctx, datacenterId)
.SecurityGroup(securityGroup)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroup := *openapiclient.NewSecurityGroupRequest(*openapiclient.NewSecurityGroupProperties("My security group")) // SecurityGroupRequest | The security group to be created
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsPost(context.Background(), datacenterId).SecurityGroup(securityGroup).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsPost`: SecurityGroup
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsPost`: %v\n", resp)
}var result SecurityGroup = DatacentersSecuritygroupsPut(ctx, datacenterId, securityGroupId)
.SecurityGroup(securityGroup)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the Security Group.
securityGroup := *openapiclient.NewSecurityGroupRequest(*openapiclient.NewSecurityGroupProperties("My security group")) // SecurityGroupRequest | The modified Security Group
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsPut(context.Background(), datacenterId, securityGroupId).SecurityGroup(securityGroup).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsPut`: SecurityGroup
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsPut`: %v\n", resp)
}var result FirewallRule = DatacentersSecuritygroupsRulesFindById(ctx, datacenterId, securityGroupId, ruleId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the Security Group.
ruleId := "ruleId_example" // string | The unique ID of the Security Group rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsRulesFindById(context.Background(), datacenterId, securityGroupId, ruleId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsRulesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsRulesFindById`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsRulesFindById`: %v\n", resp)
}var result FirewallRules = DatacentersSecuritygroupsRulesGet(ctx, datacenterId, securityGroupId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsRulesGet(context.Background(), datacenterId, securityGroupId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsRulesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsRulesGet`: FirewallRules
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsRulesGet`: %v\n", resp)
}var result FirewallRule = DatacentersSecuritygroupsRulesPatch(ctx, datacenterId, securityGroupId, ruleId)
.Rule(rule)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
ruleId := "ruleId_example" // string | The unique ID of the Security Group Rule.
rule := *openapiclient.NewFirewallruleProperties() // FirewallruleProperties | The properties of the Security Group Rule to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsRulesPatch(context.Background(), datacenterId, securityGroupId, ruleId).Rule(rule).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsRulesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsRulesPatch`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsRulesPatch`: %v\n", resp)
}var result FirewallRule = DatacentersSecuritygroupsRulesPut(ctx, datacenterId, securityGroupId, ruleId)
.Rule(rule)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
securityGroupId := "securityGroupId_example" // string | The unique ID of the security group.
ruleId := "ruleId_example" // string | The unique ID of the Security Group Rule.
rule := *openapiclient.NewFirewallRule(*openapiclient.NewFirewallruleProperties()) // FirewallRule | The modified Security Group Rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersSecuritygroupsRulesPut(context.Background(), datacenterId, securityGroupId, ruleId).Rule(rule).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersSecuritygroupsRulesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersSecuritygroupsRulesPut`: FirewallRule
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersSecuritygroupsRulesPut`: %v\n", resp)
}var result SecurityGroups = DatacentersServersNicsSecuritygroupsPut(ctx, datacenterId, serverId, nicId)
.Securitygroups(securitygroups)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
nicId := "nicId_example" // string | The unique ID of the server.
securitygroups := *openapiclient.NewListOfIds([]string{"15f67991-0f51-4efc-a8ad-ef1fb31a480c"}) // ListOfIds | The list of NIC attached Security Groups IDs.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersServersNicsSecuritygroupsPut(context.Background(), datacenterId, serverId, nicId).Securitygroups(securitygroups).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersServersNicsSecuritygroupsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersNicsSecuritygroupsPut`: SecurityGroups
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersServersNicsSecuritygroupsPut`: %v\n", resp)
}var result SecurityGroups = DatacentersServersSecuritygroupsPut(ctx, datacenterId, serverId)
.Securitygroups(securitygroups)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
securitygroups := *openapiclient.NewListOfIds([]string{"15f67991-0f51-4efc-a8ad-ef1fb31a480c"}) // ListOfIds | The list of server attached Security Groups IDs.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.SecurityGroupsApi.DatacentersServersSecuritygroupsPut(context.Background(), datacenterId, serverId).Securitygroups(securitygroups).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityGroupsApi.DatacentersServersSecuritygroupsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersSecuritygroupsPut`: SecurityGroups
fmt.Fprintf(os.Stdout, "Response from `SecurityGroupsApi.DatacentersServersSecuritygroupsPut`: %v\n", resp)
}var result = DatacentersApplicationloadbalancersDelete(ctx, datacenterId, applicationLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersDelete(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(ctx, datacenterId, applicationLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId`: ApplicationLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId`: %v\n", resp)
}var result = DatacentersApplicationloadbalancersFlowlogsDelete(ctx, datacenterId, applicationLoadBalancerId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the flow log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsDelete(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FlowLog = DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(ctx, datacenterId, applicationLoadBalancerId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the flow log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId`: %v\n", resp)
}var result FlowLogs = DatacentersApplicationloadbalancersFlowlogsGet(ctx, datacenterId, applicationLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsGet`: %v\n", resp)
}var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPatch(ctx, datacenterId, applicationLoadBalancerId, flowLogId)
.ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the flow log.
applicationLoadBalancerFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the ALB flow log to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).ApplicationLoadBalancerFlowLogProperties(applicationLoadBalancerFlowLogProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPatch`: %v\n", resp)
}var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPost(ctx, datacenterId, applicationLoadBalancerId)
.ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
applicationLoadBalancerFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The flow log to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPost`: %v\n", resp)
}var result FlowLog = DatacentersApplicationloadbalancersFlowlogsPut(ctx, datacenterId, applicationLoadBalancerId, flowLogId)
.ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the flow log.
applicationLoadBalancerFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified ALB flow log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut(context.Background(), datacenterId, applicationLoadBalancerId, flowLogId).ApplicationLoadBalancerFlowLog(applicationLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersFlowlogsPut`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersFlowlogsPut`: %v\n", resp)
}var result = DatacentersApplicationloadbalancersForwardingrulesDelete(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesDelete(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId`: ApplicationLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId`: %v\n", resp)
}var result ApplicationLoadBalancerForwardingRules = DatacentersApplicationloadbalancersForwardingrulesGet(ctx, datacenterId, applicationLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet(context.Background(), datacenterId, applicationLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersForwardingrulesGet`: ApplicationLoadBalancerForwardingRules
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesGet`: %v\n", resp)
}var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPatch(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId)
.ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
applicationLoadBalancerForwardingRuleProperties := *openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080)) // ApplicationLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).ApplicationLoadBalancerForwardingRuleProperties(applicationLoadBalancerForwardingRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersForwardingrulesPatch`: ApplicationLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPatch`: %v\n", resp)
}var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPost(ctx, datacenterId, applicationLoadBalancerId)
.ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
applicationLoadBalancerForwardingRule := *openapiclient.NewApplicationLoadBalancerForwardingRule(*openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080))) // ApplicationLoadBalancerForwardingRule | The forwarding rule to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersForwardingrulesPost`: ApplicationLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPost`: %v\n", resp)
}var result ApplicationLoadBalancerForwardingRule = DatacentersApplicationloadbalancersForwardingrulesPut(ctx, datacenterId, applicationLoadBalancerId, forwardingRuleId)
.ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
applicationLoadBalancerForwardingRule := *openapiclient.NewApplicationLoadBalancerForwardingRulePut(*openapiclient.NewApplicationLoadBalancerForwardingRuleProperties("My Application Load Balancer forwarding rule", "HTTP", "81.173.1.2", int32(8080))) // ApplicationLoadBalancerForwardingRulePut | The modified ALB forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut(context.Background(), datacenterId, applicationLoadBalancerId, forwardingRuleId).ApplicationLoadBalancerForwardingRule(applicationLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersForwardingrulesPut`: ApplicationLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersForwardingrulesPut`: %v\n", resp)
}var result ApplicationLoadBalancers = DatacentersApplicationloadbalancersGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersGet`: ApplicationLoadBalancers
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersGet`: %v\n", resp)
}var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPatch(ctx, datacenterId, applicationLoadBalancerId)
.ApplicationLoadBalancerProperties(applicationLoadBalancerProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
applicationLoadBalancerProperties := *openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2)) // ApplicationLoadBalancerProperties | The Application Load Balancer properties to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancerProperties(applicationLoadBalancerProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersPatch`: ApplicationLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPatch`: %v\n", resp)
}var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPost(ctx, datacenterId)
.ApplicationLoadBalancer(applicationLoadBalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancer := *openapiclient.NewApplicationLoadBalancer(*openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2))) // ApplicationLoadBalancer | The Application Load Balancer to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost(context.Background(), datacenterId).ApplicationLoadBalancer(applicationLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersPost`: ApplicationLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPost`: %v\n", resp)
}var result ApplicationLoadBalancer = DatacentersApplicationloadbalancersPut(ctx, datacenterId, applicationLoadBalancerId)
.ApplicationLoadBalancer(applicationLoadBalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
applicationLoadBalancerId := "applicationLoadBalancerId_example" // string | The unique ID of the Application Load Balancer.
applicationLoadBalancer := *openapiclient.NewApplicationLoadBalancerPut(*openapiclient.NewApplicationLoadBalancerProperties("My Application Load Balancer", int32(1), int32(2))) // ApplicationLoadBalancerPut | The modified Application Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut(context.Background(), datacenterId, applicationLoadBalancerId).ApplicationLoadBalancer(applicationLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersApplicationloadbalancersPut`: ApplicationLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `ApplicationLoadBalancersApi.DatacentersApplicationloadbalancersPut`: %v\n", resp)
}var result = K8sDelete(ctx, k8sClusterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.KubernetesApi.K8sDelete(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result KubernetesCluster = K8sFindByClusterId(ctx, k8sClusterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the K8s cluster to be retrieved.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sFindByClusterId(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sFindByClusterId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sFindByClusterId`: KubernetesCluster
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sFindByClusterId`: %v\n", resp)
}var result KubernetesClusters = K8sGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sGet`: KubernetesClusters
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sGet`: %v\n", resp)
}var result string = K8sKubeconfigGet(ctx, k8sClusterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sKubeconfigGet(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sKubeconfigGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sKubeconfigGet`: string
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sKubeconfigGet`: %v\n", resp)
}var result = K8sNodepoolsDelete(ctx, k8sClusterId, nodepoolId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.KubernetesApi.K8sNodepoolsDelete(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result KubernetesNodePool = K8sNodepoolsFindById(ctx, k8sClusterId, nodepoolId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsFindById(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsFindById`: KubernetesNodePool
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsFindById`: %v\n", resp)
}var result KubernetesNodePools = K8sNodepoolsGet(ctx, k8sClusterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsGet(context.Background(), k8sClusterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsGet`: KubernetesNodePools
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsGet`: %v\n", resp)
}var result = K8sNodepoolsNodesDelete(ctx, k8sClusterId, nodepoolId, nodeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesDelete(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result KubernetesNode = K8sNodepoolsNodesFindById(ctx, k8sClusterId, nodepoolId, nodeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesFindById(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsNodesFindById`: KubernetesNode
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsNodesFindById`: %v\n", resp)
}var result KubernetesNodes = K8sNodepoolsNodesGet(ctx, k8sClusterId, nodepoolId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesGet(context.Background(), k8sClusterId, nodepoolId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsNodesGet`: KubernetesNodes
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsNodesGet`: %v\n", resp)
}var result = K8sNodepoolsNodesReplacePost(ctx, k8sClusterId, nodepoolId, nodeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
nodeId := "nodeId_example" // string | The unique ID of the Kubernetes node.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsNodesReplacePost(context.Background(), k8sClusterId, nodepoolId, nodeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsNodesReplacePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result KubernetesNodePool = K8sNodepoolsPost(ctx, k8sClusterId)
.KubernetesNodePool(kubernetesNodePool)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
kubernetesNodePool := *openapiclient.NewKubernetesNodePoolForPost(*openapiclient.NewKubernetesNodePoolPropertiesForPost("K8s-node-pool", "1e072e52-2ed3-492f-b6b6-c6b116907521", int32(2), int32(4), int32(2048), "AUTO", "HDD", int32(100))) // KubernetesNodePoolForPost | The Kubernetes node pool to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsPost(context.Background(), k8sClusterId).KubernetesNodePool(kubernetesNodePool).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsPost`: KubernetesNodePool
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsPost`: %v\n", resp)
}var result KubernetesNodePool = K8sNodepoolsPut(ctx, k8sClusterId, nodepoolId)
.KubernetesNodePool(kubernetesNodePool)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
nodepoolId := "nodepoolId_example" // string | The unique ID of the Kubernetes node pool.
kubernetesNodePool := *openapiclient.NewKubernetesNodePoolForPut(*openapiclient.NewKubernetesNodePoolPropertiesForPut(int32(2))) // KubernetesNodePoolForPut | Details of the Kubernetes Node Pool
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sNodepoolsPut(context.Background(), k8sClusterId, nodepoolId).KubernetesNodePool(kubernetesNodePool).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sNodepoolsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sNodepoolsPut`: KubernetesNodePool
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sNodepoolsPut`: %v\n", resp)
}var result KubernetesCluster = K8sPost(ctx)
.KubernetesCluster(kubernetesCluster)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
kubernetesCluster := *openapiclient.NewKubernetesClusterForPost(*openapiclient.NewKubernetesClusterPropertiesForPost("k8s")) // KubernetesClusterForPost | The Kubernetes cluster to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sPost(context.Background()).KubernetesCluster(kubernetesCluster).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sPost`: KubernetesCluster
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sPost`: %v\n", resp)
}var result KubernetesCluster = K8sPut(ctx, k8sClusterId)
.KubernetesCluster(kubernetesCluster)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
k8sClusterId := "k8sClusterId_example" // string | The unique ID of the Kubernetes cluster.
kubernetesCluster := *openapiclient.NewKubernetesClusterForPut(*openapiclient.NewKubernetesClusterPropertiesForPut("k8s")) // KubernetesClusterForPut | The modified Kubernetes cluster.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sPut(context.Background(), k8sClusterId).KubernetesCluster(kubernetesCluster).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sPut`: KubernetesCluster
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sPut`: %v\n", resp)
}var result string = K8sVersionsDefaultGet(ctx)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sVersionsDefaultGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sVersionsDefaultGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sVersionsDefaultGet`: string
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sVersionsDefaultGet`: %v\n", resp)
}var result []string = K8sVersionsGet(ctx)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.KubernetesApi.K8sVersionsGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KubernetesApi.K8sVersionsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `K8sVersionsGet`: []string
fmt.Fprintf(os.Stdout, "Response from `KubernetesApi.K8sVersionsGet`: %v\n", resp)
}var result = DatacentersNatgatewaysDelete(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysDelete(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result NatGateway = DatacentersNatgatewaysFindByNatGatewayId(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFindByNatGatewayId`: NatGateway
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFindByNatGatewayId`: %v\n", resp)
}var result = DatacentersNatgatewaysFlowlogsDelete(ctx, datacenterId, natGatewayId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FlowLog = DatacentersNatgatewaysFlowlogsFindByFlowLogId(ctx, datacenterId, natGatewayId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId(context.Background(), datacenterId, natGatewayId, flowLogId).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsFindByFlowLogId`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsFindByFlowLogId`: %v\n", resp)
}var result FlowLogs = DatacentersNatgatewaysFlowlogsGet(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsGet`: %v\n", resp)
}var result FlowLog = DatacentersNatgatewaysFlowlogsPatch(ctx, datacenterId, natGatewayId, flowLogId)
.NatGatewayFlowLogProperties(natGatewayFlowLogProperties)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
natGatewayFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the Flow Log to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch(context.Background(), datacenterId, natGatewayId, flowLogId).NatGatewayFlowLogProperties(natGatewayFlowLogProperties).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPatch`: %v\n", resp)
}var result FlowLog = DatacentersNatgatewaysFlowlogsPost(ctx, datacenterId, natGatewayId)
.NatGatewayFlowLog(natGatewayFlowLog)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost(context.Background(), datacenterId, natGatewayId).NatGatewayFlowLog(natGatewayFlowLog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPost`: %v\n", resp)
}var result FlowLog = DatacentersNatgatewaysFlowlogsPut(ctx, datacenterId, natGatewayId, flowLogId)
.NatGatewayFlowLog(natGatewayFlowLog)
.Pretty(pretty)
.Depth(depth)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
natGatewayFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified NAT Gateway Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut(context.Background(), datacenterId, natGatewayId, flowLogId).NatGatewayFlowLog(natGatewayFlowLog).Pretty(pretty).Depth(depth).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysFlowlogsPut`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysFlowlogsPut`: %v\n", resp)
}var result NatGateways = DatacentersNatgatewaysGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysGet`: NatGateways
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysGet`: %v\n", resp)
}var result NatGateway = DatacentersNatgatewaysPatch(ctx, datacenterId, natGatewayId)
.NatGatewayProperties(natGatewayProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayProperties := *openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"}) // NatGatewayProperties | The properties of the NAT Gateway to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPatch(context.Background(), datacenterId, natGatewayId).NatGatewayProperties(natGatewayProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysPatch`: NatGateway
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPatch`: %v\n", resp)
}var result NatGateway = DatacentersNatgatewaysPost(ctx, datacenterId)
.NatGateway(natGateway)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGateway := *openapiclient.NewNatGateway(*openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"})) // NatGateway | The NAT Gateway to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPost(context.Background(), datacenterId).NatGateway(natGateway).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysPost`: NatGateway
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPost`: %v\n", resp)
}var result NatGateway = DatacentersNatgatewaysPut(ctx, datacenterId, natGatewayId)
.NatGateway(natGateway)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGateway := *openapiclient.NewNatGatewayPut(*openapiclient.NewNatGatewayProperties("My NAT Gateway", []string{"PublicIps_example"})) // NatGatewayPut | The modified NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysPut(context.Background(), datacenterId, natGatewayId).NatGateway(natGateway).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysPut`: NatGateway
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysPut`: %v\n", resp)
}var result = DatacentersNatgatewaysRulesDelete(ctx, datacenterId, natGatewayId, natGatewayRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesDelete(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result NatGatewayRule = DatacentersNatgatewaysRulesFindByNatGatewayRuleId(ctx, datacenterId, natGatewayId, natGatewayRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysRulesFindByNatGatewayRuleId`: NatGatewayRule
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesFindByNatGatewayRuleId`: %v\n", resp)
}var result NatGatewayRules = DatacentersNatgatewaysRulesGet(ctx, datacenterId, natGatewayId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesGet(context.Background(), datacenterId, natGatewayId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysRulesGet`: NatGatewayRules
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesGet`: %v\n", resp)
}var result NatGatewayRule = DatacentersNatgatewaysRulesPatch(ctx, datacenterId, natGatewayId, natGatewayRuleId)
.NatGatewayRuleProperties(natGatewayRuleProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule.
natGatewayRuleProperties := *openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17") // NatGatewayRuleProperties | The properties of the NAT Gateway rule to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPatch(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).NatGatewayRuleProperties(natGatewayRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysRulesPatch`: NatGatewayRule
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPatch`: %v\n", resp)
}var result NatGatewayRule = DatacentersNatgatewaysRulesPost(ctx, datacenterId, natGatewayId)
.NatGatewayRule(natGatewayRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayRule := *openapiclient.NewNatGatewayRule(*openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17")) // NatGatewayRule | The NAT Gateway rule to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPost(context.Background(), datacenterId, natGatewayId).NatGatewayRule(natGatewayRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysRulesPost`: NatGatewayRule
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPost`: %v\n", resp)
}var result NatGatewayRule = DatacentersNatgatewaysRulesPut(ctx, datacenterId, natGatewayId, natGatewayRuleId)
.NatGatewayRule(natGatewayRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
natGatewayId := "natGatewayId_example" // string | The unique ID of the NAT Gateway.
natGatewayRuleId := "natGatewayRuleId_example" // string | The unique ID of the NAT Gateway rule.
natGatewayRule := *openapiclient.NewNatGatewayRulePut(*openapiclient.NewNatGatewayRuleProperties("My NAT Gateway rule", "10.0.1.0/24", "192.18.7.17")) // NatGatewayRulePut | The modified NAT Gateway rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NATGatewaysApi.DatacentersNatgatewaysRulesPut(context.Background(), datacenterId, natGatewayId, natGatewayRuleId).NatGatewayRule(natGatewayRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NATGatewaysApi.DatacentersNatgatewaysRulesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNatgatewaysRulesPut`: NatGatewayRule
fmt.Fprintf(os.Stdout, "Response from `NATGatewaysApi.DatacentersNatgatewaysRulesPut`: %v\n", resp)
}var result = DatacentersNetworkloadbalancersDelete(ctx, datacenterId, networkLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersDelete(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result NetworkLoadBalancer = DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId(ctx, datacenterId, networkLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId`: NetworkLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId`: %v\n", resp)
}var result = DatacentersNetworkloadbalancersFlowlogsDelete(ctx, datacenterId, networkLoadBalancerId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsDelete(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result FlowLog = DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId(ctx, datacenterId, networkLoadBalancerId, flowLogId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId`: %v\n", resp)
}var result FlowLogs = DatacentersNetworkloadbalancersFlowlogsGet(ctx, datacenterId, networkLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFlowlogsGet`: FlowLogs
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsGet`: %v\n", resp)
}var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPatch(ctx, datacenterId, networkLoadBalancerId, flowLogId)
.NetworkLoadBalancerFlowLogProperties(networkLoadBalancerFlowLogProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
networkLoadBalancerFlowLogProperties := *openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key") // FlowLogProperties | The properties of the Flow Log to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).NetworkLoadBalancerFlowLogProperties(networkLoadBalancerFlowLogProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFlowlogsPatch`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPatch`: %v\n", resp)
}var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPost(ctx, datacenterId, networkLoadBalancerId)
.NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
networkLoadBalancerFlowLog := *openapiclient.NewFlowLog(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLog | The Flow Log to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFlowlogsPost`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPost`: %v\n", resp)
}var result FlowLog = DatacentersNetworkloadbalancersFlowlogsPut(ctx, datacenterId, networkLoadBalancerId, flowLogId)
.NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
flowLogId := "flowLogId_example" // string | The unique ID of the Flow Log.
networkLoadBalancerFlowLog := *openapiclient.NewFlowLogPut(*openapiclient.NewFlowLogProperties("My resource", "ACCEPTED", "INGRESS", "bucketName/key")) // FlowLogPut | The modified NLB Flow Log.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut(context.Background(), datacenterId, networkLoadBalancerId, flowLogId).NetworkLoadBalancerFlowLog(networkLoadBalancerFlowLog).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersFlowlogsPut`: FlowLog
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersFlowlogsPut`: %v\n", resp)
}var result = DatacentersNetworkloadbalancersForwardingrulesDelete(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesDelete(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId`: NetworkLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId`: %v\n", resp)
}var result NetworkLoadBalancerForwardingRules = DatacentersNetworkloadbalancersForwardingrulesGet(ctx, datacenterId, networkLoadBalancerId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet(context.Background(), datacenterId, networkLoadBalancerId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersForwardingrulesGet`: NetworkLoadBalancerForwardingRules
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesGet`: %v\n", resp)
}var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPatch(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId)
.NetworkLoadBalancerForwardingRuleProperties(networkLoadBalancerForwardingRuleProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
networkLoadBalancerForwardingRuleProperties := *openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))}) // NetworkLoadBalancerForwardingRuleProperties | The properties of the forwarding rule to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).NetworkLoadBalancerForwardingRuleProperties(networkLoadBalancerForwardingRuleProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersForwardingrulesPatch`: NetworkLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPatch`: %v\n", resp)
}var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPost(ctx, datacenterId, networkLoadBalancerId)
.NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
networkLoadBalancerForwardingRule := *openapiclient.NewNetworkLoadBalancerForwardingRule(*openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))})) // NetworkLoadBalancerForwardingRule | The forwarding rule to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersForwardingrulesPost`: NetworkLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPost`: %v\n", resp)
}var result NetworkLoadBalancerForwardingRule = DatacentersNetworkloadbalancersForwardingrulesPut(ctx, datacenterId, networkLoadBalancerId, forwardingRuleId)
.NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
forwardingRuleId := "forwardingRuleId_example" // string | The unique ID of the forwarding rule.
networkLoadBalancerForwardingRule := *openapiclient.NewNetworkLoadBalancerForwardingRulePut(*openapiclient.NewNetworkLoadBalancerForwardingRuleProperties("My Network Load Balancer forwarding rule", "ROUND_ROBIN", "HTTP", "81.173.1.2", int32(8080), []openapiclient.NetworkLoadBalancerForwardingRuleTarget{*openapiclient.NewNetworkLoadBalancerForwardingRuleTarget("22.231.2.2", int32(8080), int32(123))})) // NetworkLoadBalancerForwardingRulePut | The modified NLB forwarding rule.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut(context.Background(), datacenterId, networkLoadBalancerId, forwardingRuleId).NetworkLoadBalancerForwardingRule(networkLoadBalancerForwardingRule).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersForwardingrulesPut`: NetworkLoadBalancerForwardingRule
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersForwardingrulesPut`: %v\n", resp)
}var result NetworkLoadBalancers = DatacentersNetworkloadbalancersGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersGet`: NetworkLoadBalancers
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersGet`: %v\n", resp)
}var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPatch(ctx, datacenterId, networkLoadBalancerId)
.NetworkLoadBalancerProperties(networkLoadBalancerProperties)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
networkLoadBalancerProperties := *openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2)) // NetworkLoadBalancerProperties | The properties of the Network Load Balancer to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancerProperties(networkLoadBalancerProperties).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersPatch`: NetworkLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPatch`: %v\n", resp)
}var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPost(ctx, datacenterId)
.NetworkLoadBalancer(networkLoadBalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancer := *openapiclient.NewNetworkLoadBalancer(*openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2))) // NetworkLoadBalancer | The Network Load Balancer to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost(context.Background(), datacenterId).NetworkLoadBalancer(networkLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersPost`: NetworkLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPost`: %v\n", resp)
}var result NetworkLoadBalancer = DatacentersNetworkloadbalancersPut(ctx, datacenterId, networkLoadBalancerId)
.NetworkLoadBalancer(networkLoadBalancer)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
networkLoadBalancerId := "networkLoadBalancerId_example" // string | The unique ID of the Network Load Balancer.
networkLoadBalancer := *openapiclient.NewNetworkLoadBalancerPut(*openapiclient.NewNetworkLoadBalancerProperties("My Network Load Balancer", int32(1), int32(2))) // NetworkLoadBalancerPut | The modified Network Load Balancer.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut(context.Background(), datacenterId, networkLoadBalancerId).NetworkLoadBalancer(networkLoadBalancer).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersNetworkloadbalancersPut`: NetworkLoadBalancer
fmt.Fprintf(os.Stdout, "Response from `NetworkLoadBalancersApi.DatacentersNetworkloadbalancersPut`: %v\n", resp)
}var result = DatacentersServersCdromsDelete(ctx, datacenterId, serverId, cdromId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
cdromId := "cdromId_example" // string | The unique ID of the CD-ROM.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ServersApi.DatacentersServersCdromsDelete(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Image = DatacentersServersCdromsFindById(ctx, datacenterId, serverId, cdromId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
cdromId := "cdromId_example" // string | The unique ID of the CD-ROM.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsFindById(context.Background(), datacenterId, serverId, cdromId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersCdromsFindById`: Image
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsFindById`: %v\n", resp)
}var result Cdroms = DatacentersServersCdromsGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersCdromsGet`: Cdroms
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsGet`: %v\n", resp)
}var result Image = DatacentersServersCdromsPost(ctx, datacenterId, serverId)
.Cdrom(cdrom)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
cdrom := *openapiclient.NewImage(*openapiclient.NewImageProperties("LINUX")) // Image | The CD-ROM to be attached.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersCdromsPost(context.Background(), datacenterId, serverId).Cdrom(cdrom).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersCdromsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersCdromsPost`: Image
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersCdromsPost`: %v\n", resp)
}var result = DatacentersServersDelete(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.DeleteVolumes(deleteVolumes)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
deleteVolumes := true // bool | If true, all attached storage volumes will also be deleted. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ServersApi.DatacentersServersDelete(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).DeleteVolumes(deleteVolumes).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Server = DatacentersServersFindById(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersFindById(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersFindById`: Server
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersFindById`: %v\n", resp)
}var result Servers = DatacentersServersGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersGet`: Servers
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersGet`: %v\n", resp)
}var result Server = DatacentersServersPatch(ctx, datacenterId, serverId)
.Server(server)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
server := *openapiclient.NewServerProperties() // ServerProperties | The properties of the server to be updated.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersPatch(context.Background(), datacenterId, serverId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersPatch`: Server
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPatch`: %v\n", resp)
}var result Server = DatacentersServersPost(ctx, datacenterId)
.Server(server)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
server := *openapiclient.NewServer(*openapiclient.NewServerProperties()) // Server | The server to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersPost(context.Background(), datacenterId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersPost`: Server
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPost`: %v\n", resp)
}var result Server = DatacentersServersPut(ctx, datacenterId, serverId)
.Server(server)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
server := *openapiclient.NewServer(*openapiclient.NewServerProperties()) // Server | The modified server
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersPut(context.Background(), datacenterId, serverId).Server(server).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersPut`: Server
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersPut`: %v\n", resp)
}var result = DatacentersServersRebootPost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersRebootPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersRebootPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result RemoteConsoleUrl = DatacentersServersRemoteConsoleGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersRemoteConsoleGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersRemoteConsoleGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersRemoteConsoleGet`: RemoteConsoleUrl
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersRemoteConsoleGet`: %v\n", resp)
}var result = DatacentersServersResumePost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersResumePost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersResumePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result = DatacentersServersStartPost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersStartPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersStartPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result = DatacentersServersStopPost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersStopPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersStopPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result = DatacentersServersSuspendPost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersSuspendPost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersSuspendPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Token = DatacentersServersTokenGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersTokenGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersTokenGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersTokenGet`: Token
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersTokenGet`: %v\n", resp)
}var result = DatacentersServersUpgradePost(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersUpgradePost(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersUpgradePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result = DatacentersServersVolumesDelete(ctx, datacenterId, serverId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.ServersApi.DatacentersServersVolumesDelete(context.Background(), datacenterId, serverId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Volume = DatacentersServersVolumesFindById(ctx, datacenterId, serverId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesFindById(context.Background(), datacenterId, serverId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersVolumesFindById`: Volume
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesFindById`: %v\n", resp)
}var result AttachedVolumes = DatacentersServersVolumesGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination). (optional) (default to 0)
limit := int32(56) // int32 | The maximum number of elements to return (use together with offset for pagination). (optional) (default to 1000)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersVolumesGet`: AttachedVolumes
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesGet`: %v\n", resp)
}var result Volume = DatacentersServersVolumesPost(ctx, datacenterId, serverId)
.Volume(volume)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
volume := *openapiclient.NewVolume() // Volume | The volume to be attached (or created and attached).
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.ServersApi.DatacentersServersVolumesPost(context.Background(), datacenterId, serverId).Volume(volume).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersApi.DatacentersServersVolumesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersVolumesPost`: Volume
fmt.Fprintf(os.Stdout, "Response from `ServersApi.DatacentersServersVolumesPost`: %v\n", resp)
}var result = UmGroupsDelete(ctx, groupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UserManagementApi.UmGroupsDelete(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result Group = UmGroupsFindById(ctx, groupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsFindById(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsFindById`: Group
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsFindById`: %v\n", resp)
}var result Groups = UmGroupsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsGet`: Groups
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsGet`: %v\n", resp)
}var result Group = UmGroupsPost(ctx)
.Group(group)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
group := *openapiclient.NewGroup(*openapiclient.NewGroupProperties()) // Group | The group to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsPost(context.Background()).Group(group).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsPost`: Group
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsPost`: %v\n", resp)
}var result Group = UmGroupsPut(ctx, groupId)
.Group(group)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
group := *openapiclient.NewGroup(*openapiclient.NewGroupProperties()) // Group | The modified group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsPut(context.Background(), groupId).Group(group).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsPut`: Group
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsPut`: %v\n", resp)
}var result ResourceGroups = UmGroupsResourcesGet(ctx, groupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsResourcesGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsResourcesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsResourcesGet`: ResourceGroups
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsResourcesGet`: %v\n", resp)
}var result = UmGroupsSharesDelete(ctx, groupId, resourceId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
resourceId := "resourceId_example" // string | The unique ID of the resource.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UserManagementApi.UmGroupsSharesDelete(context.Background(), groupId, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result GroupShare = UmGroupsSharesFindByResourceId(ctx, groupId, resourceId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
resourceId := "resourceId_example" // string | The unique ID of the resource.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesFindByResourceId(context.Background(), groupId, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesFindByResourceId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsSharesFindByResourceId`: GroupShare
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesFindByResourceId`: %v\n", resp)
}var result GroupShares = UmGroupsSharesGet(ctx, groupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsSharesGet`: GroupShares
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesGet`: %v\n", resp)
}var result GroupShare = UmGroupsSharesPost(ctx, groupId, resourceId)
.Resource(resource)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
resourceId := "resourceId_example" // string | The unique ID of the resource.
resource := *openapiclient.NewGroupShare(*openapiclient.NewGroupShareProperties()) // GroupShare | The resource to add.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesPost(context.Background(), groupId, resourceId).Resource(resource).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsSharesPost`: GroupShare
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesPost`: %v\n", resp)
}var result GroupShare = UmGroupsSharesPut(ctx, groupId, resourceId)
.Resource(resource)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
resourceId := "resourceId_example" // string | The unique ID of the resource.
resource := *openapiclient.NewGroupShare(*openapiclient.NewGroupShareProperties()) // GroupShare | The modified resource
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsSharesPut(context.Background(), groupId, resourceId).Resource(resource).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsSharesPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsSharesPut`: GroupShare
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsSharesPut`: %v\n", resp)
}var result = UmGroupsUsersDelete(ctx, groupId, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UserManagementApi.UmGroupsUsersDelete(context.Background(), groupId, userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result GroupMembers = UmGroupsUsersGet(ctx, groupId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsUsersGet(context.Background(), groupId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsUsersGet`: GroupMembers
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsUsersGet`: %v\n", resp)
}var result User = UmGroupsUsersPost(ctx, groupId)
.User(user)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
groupId := "groupId_example" // string | The unique ID of the group.
user := *openapiclient.NewUserGroupPost("15f67991-0f51-4efc-a8ad-ef1fb31a480c") // UserGroupPost | The user to add.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmGroupsUsersPost(context.Background(), groupId).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmGroupsUsersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmGroupsUsersPost`: User
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmGroupsUsersPost`: %v\n", resp)
}var result Resources = UmResourcesFindByType(ctx, resourceType)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
resourceType := "resourceType_example" // string | The resource type
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmResourcesFindByType(context.Background(), resourceType).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesFindByType``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmResourcesFindByType`: Resources
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesFindByType`: %v\n", resp)
}var result Resource = UmResourcesFindByTypeAndId(ctx, resourceType, resourceId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
resourceType := "resourceType_example" // string | The resource type
resourceId := "resourceId_example" // string | The resource ID
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmResourcesFindByTypeAndId(context.Background(), resourceType, resourceId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesFindByTypeAndId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmResourcesFindByTypeAndId`: Resource
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesFindByTypeAndId`: %v\n", resp)
}var result Resources = UmResourcesGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmResourcesGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmResourcesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmResourcesGet`: Resources
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmResourcesGet`: %v\n", resp)
}var result = UmUsersDelete(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.UserManagementApi.UmUsersDelete(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result User = UmUsersFindById(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersFindById(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersFindById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersFindById`: User
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersFindById`: %v\n", resp)
}var result Users = UmUsersGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Offset(offset)
.Limit(limit)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
offset := int32(56) // int32 | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> 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 100)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersGet`: Users
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersGet`: %v\n", resp)
}var result ResourceGroups = UmUsersGroupsGet(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersGroupsGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersGroupsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersGroupsGet`: ResourceGroups
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersGroupsGet`: %v\n", resp)
}var result ResourcesUsers = UmUsersOwnsGet(ctx, userId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersOwnsGet(context.Background(), userId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersOwnsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersOwnsGet`: ResourcesUsers
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersOwnsGet`: %v\n", resp)
}var result User = UmUsersPost(ctx)
.User(user)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
user := *openapiclient.NewUserPost(*openapiclient.NewUserPropertiesPost()) // UserPost | The user to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersPost(context.Background()).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersPost`: User
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersPost`: %v\n", resp)
}var result User = UmUsersPut(ctx, userId)
.User(user)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
userId := "userId_example" // string | The unique ID of the user.
user := *openapiclient.NewUserPut(*openapiclient.NewUserPropertiesPut()) // UserPut | The modified user
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.UserManagementApi.UmUsersPut(context.Background(), userId).User(user).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UmUsersPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UmUsersPut`: User
fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UmUsersPut`: %v\n", resp)
}var result = DatacentersLabelsDelete(ctx, datacenterId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.DatacentersLabelsDelete(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = DatacentersLabelsFindByKey(ctx, datacenterId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersLabelsFindByKey(context.Background(), datacenterId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsFindByKey`: %v\n", resp)
}var result LabelResources = DatacentersLabelsGet(ctx, datacenterId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersLabelsGet(context.Background(), datacenterId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsGet`: %v\n", resp)
}var result LabelResource = DatacentersLabelsPost(ctx, datacenterId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersLabelsPost(context.Background(), datacenterId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsPost`: %v\n", resp)
}var result LabelResource = DatacentersLabelsPut(ctx, datacenterId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersLabelsPut(context.Background(), datacenterId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersLabelsPut`: %v\n", resp)
}var result = DatacentersServersLabelsDelete(ctx, datacenterId, serverId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.DatacentersServersLabelsDelete(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = DatacentersServersLabelsFindByKey(ctx, datacenterId, serverId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsFindByKey(context.Background(), datacenterId, serverId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsFindByKey`: %v\n", resp)
}var result LabelResources = DatacentersServersLabelsGet(ctx, datacenterId, serverId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsGet(context.Background(), datacenterId, serverId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsGet`: %v\n", resp)
}var result LabelResource = DatacentersServersLabelsPost(ctx, datacenterId, serverId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsPost(context.Background(), datacenterId, serverId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsPost`: %v\n", resp)
}var result LabelResource = DatacentersServersLabelsPut(ctx, datacenterId, serverId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
serverId := "serverId_example" // string | The unique ID of the server.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersServersLabelsPut(context.Background(), datacenterId, serverId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersServersLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersServersLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersServersLabelsPut`: %v\n", resp)
}var result = DatacentersVolumesLabelsDelete(ctx, datacenterId, volumeId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsDelete(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = DatacentersVolumesLabelsFindByKey(ctx, datacenterId, volumeId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsFindByKey(context.Background(), datacenterId, volumeId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsFindByKey`: %v\n", resp)
}var result LabelResources = DatacentersVolumesLabelsGet(ctx, datacenterId, volumeId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsGet(context.Background(), datacenterId, volumeId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsGet`: %v\n", resp)
}var result LabelResource = DatacentersVolumesLabelsPost(ctx, datacenterId, volumeId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsPost(context.Background(), datacenterId, volumeId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsPost`: %v\n", resp)
}var result LabelResource = DatacentersVolumesLabelsPut(ctx, datacenterId, volumeId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
datacenterId := "datacenterId_example" // string | The unique ID of the data center.
volumeId := "volumeId_example" // string | The unique ID of the volume.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.DatacentersVolumesLabelsPut(context.Background(), datacenterId, volumeId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.DatacentersVolumesLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DatacentersVolumesLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.DatacentersVolumesLabelsPut`: %v\n", resp)
}var result = ImagesLabelsDelete(ctx, imageId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.ImagesLabelsDelete(context.Background(), imageId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = ImagesLabelsFindByKey(ctx, imageId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.ImagesLabelsFindByKey(context.Background(), imageId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsFindByKey`: %v\n", resp)
}var result LabelResources = ImagesLabelsGet(ctx, imageId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.ImagesLabelsGet(context.Background(), imageId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsGet`: %v\n", resp)
}var result LabelResource = ImagesLabelsPost(ctx, imageId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.ImagesLabelsPost(context.Background(), imageId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsPost`: %v\n", resp)
}var result LabelResource = ImagesLabelsPut(ctx, imageId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
imageId := "imageId_example" // string | The unique ID of the image.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.ImagesLabelsPut(context.Background(), imageId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.ImagesLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ImagesLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.ImagesLabelsPut`: %v\n", resp)
}var result = IpblocksLabelsDelete(ctx, ipblockId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.IpblocksLabelsDelete(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = IpblocksLabelsFindByKey(ctx, ipblockId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.IpblocksLabelsFindByKey(context.Background(), ipblockId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsFindByKey`: %v\n", resp)
}var result LabelResources = IpblocksLabelsGet(ctx, ipblockId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.IpblocksLabelsGet(context.Background(), ipblockId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsGet`: %v\n", resp)
}var result LabelResource = IpblocksLabelsPost(ctx, ipblockId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.IpblocksLabelsPost(context.Background(), ipblockId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsPost`: %v\n", resp)
}var result LabelResource = IpblocksLabelsPut(ctx, ipblockId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
ipblockId := "ipblockId_example" // string | The unique ID of the IP block.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.IpblocksLabelsPut(context.Background(), ipblockId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.IpblocksLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `IpblocksLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.IpblocksLabelsPut`: %v\n", resp)
}var result Label = LabelsFindByUrn(ctx, labelurn)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
labelurn := "labelurn_example" // string | The label URN; URN is unique for each label, and consists of: urn:label:<resource_type>:<resource_uuid>:<key><key>
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.LabelsFindByUrn(context.Background(), labelurn).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.LabelsFindByUrn``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LabelsFindByUrn`: Label
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.LabelsFindByUrn`: %v\n", resp)
}var result Labels = LabelsGet(ctx)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.LabelsGet(context.Background()).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.LabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LabelsGet`: Labels
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.LabelsGet`: %v\n", resp)
}var result = SnapshotsLabelsDelete(ctx, snapshotId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resp, err := apiClient.LabelsApi.SnapshotsLabelsDelete(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}var result LabelResource = SnapshotsLabelsFindByKey(ctx, snapshotId, key)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
key := "key_example" // string | The label key
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsFindByKey(context.Background(), snapshotId, key).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsFindByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsFindByKey`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsFindByKey`: %v\n", resp)
}var result LabelResources = SnapshotsLabelsGet(ctx, snapshotId)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsGet(context.Background(), snapshotId).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsGet`: LabelResources
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsGet`: %v\n", resp)
}var result LabelResource = SnapshotsLabelsPost(ctx, snapshotId)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The label to create.
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsPost(context.Background(), snapshotId).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsPost`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsPost`: %v\n", resp)
}var result LabelResource = SnapshotsLabelsPut(ctx, snapshotId, key)
.Label(label)
.Pretty(pretty)
.Depth(depth)
.XContractNumber(xContractNumber)
.Execute()package main
import (
"context"
"fmt"
"os"
ionoscloud "github.com/ionos-cloud/sdk-go/v6"
)
func main() {
snapshotId := "snapshotId_example" // string | The unique ID of the snapshot.
key := "key_example" // string | The label key
label := *openapiclient.NewLabelResource(*openapiclient.NewLabelResourceProperties()) // LabelResource | The modified label
pretty := true // bool | Controls whether the response is pretty-printed (with indentations and new lines). (optional) (default to true)
depth := int32(56) // int32 | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. (optional)
configuration := ionoscloud.NewConfiguration()
apiClient := ionoscloud.NewAPIClient(configuration)
resource, resp, err := apiClient.LabelsApi.SnapshotsLabelsPut(context.Background(), snapshotId, key).Label(label).Pretty(pretty).Depth(depth).XContractNumber(xContractNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsApi.SnapshotsLabelsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SnapshotsLabelsPut`: LabelResource
fmt.Fprintf(os.Stdout, "Response from `LabelsApi.SnapshotsLabelsPut`: %v\n", resp)
}