Skip to content

ionos-cloud/sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Gitter Quality Gate Status Bugs Maintainability Rating Reliability Rating Security Rating Vulnerabilities Release Release Date Go

Alt text

Go API client for ionoscloud

IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the "Data Center Designer" (DCD) browser-based tool.

Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.

Overview

The IONOS Cloud SDK for GO provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in GO . The SDK for GO wraps the IONOS Cloud API. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.

Installing

Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.

go get github.com/ionos-cloud/sdk-go/v6

To update the SDK use go get -u to retrieve the latest version of the SDK.

go get -u github.com/ionos-cloud/sdk-go/v6

Go Modules

If you are using Go modules, your go get will default to the latest tagged release version of the SDK. To get a specific release version of the SDK use @ in your go get command.

go get github.com/ionos-cloud/sdk-go/v6@v6.0.0

To get the latest SDK repository, use @latest.

go get github.com/ionos-cloud/sdk-go/v6@latest

Environment Variables

Environment Variable Description
IONOS_USERNAME Specify the username used to login, to authenticate against the IONOS Cloud API
IONOS_PASSWORD Specify the password used to login, to authenticate against the IONOS Cloud API
IONOS_TOKEN Specify the token used to login, if a token is being used instead of username and password
IONOS_API_URL Specify the API URL. It will overwrite the API endpoint default value api.ionos.com. Note: the host URL does not contain the /cloudapi/v6 path, so it should not be included in the IONOS_API_URL environment variable
IONOS_LOGLEVEL Specify the Log Level used to log messages. Possible values: Off, Debug, Trace
IONOS_PINNED_CERT Specify the SHA-256 public fingerprint here, enables certificate pinning

⚠️ Note: To overwrite the api endpoint - api.ionos.com, the environment variable $IONOS_API_URL can be set, and used with NewConfigurationFromEnv() function.

Examples

Examples for creating resources using the Go SDK can be found here

Authentication

Basic Authentication

  • Type: HTTP basic authentication

Example

import (
	"context"
	"fmt"
	"github.com/ionos-cloud/sdk-go/v6"
	"log"
)

func basicAuthExample() error {
	cfg := ionoscloud.NewConfiguration("username_here", "pwd_here", "", "")
	cfg.Debug = true
	apiClient := ionoscloud.NewAPIClient(cfg)
	datacenters, _, err := apiClient.DataCentersApi.DatacentersGet(context.Background()).Depth(1).Execute()
	if err != nil {
		return fmt.Errorf("error retrieving datacenters %w", err)
	}
	if datacenters.HasItems() {
		for _, dc := range *datacenters.GetItems() {
			if dc.HasProperties() && dc.GetProperties().HasName() {
				fmt.Println(*dc.GetProperties().GetName())
			}
		}
	}
	return nil
}

Token Authentication

There are 2 ways to generate your token:

Generate token using sdk-go-auth:

    import (
        "context"
        "fmt"
        authApi "github.com/ionos-cloud/sdk-go-auth"
        "github.com/ionos-cloud/sdk-go/v6"
        "log"
    )

    func TokenAuthExample() error {
        //note: to use NewConfigurationFromEnv(), you need to previously set IONOS_USERNAME and IONOS_PASSWORD as env variables
        authClient := authApi.NewAPIClient(authApi.NewConfigurationFromEnv())
        jwt, _, err := authClient.TokensApi.TokensGenerate(context.Background()).Execute()
        if err != nil {
            return fmt.Errorf("error occurred while generating token (%w)", err)
        }
        if !jwt.HasToken() {
            return fmt.Errorf("could not generate token")
        }
        cfg := ionoscloud.NewConfiguration("", "", *jwt.GetToken(), "")
        cfg.Debug = true
        apiClient := ionoscloud.NewAPIClient(cfg)
        datacenters, _, err := apiClient.DataCentersApi.DatacenterGet(context.Background()).Depth(1).Execute()
        if err != nil {
            return fmt.Errorf("error retrieving datacenters (%w)", err)
        }
        return nil
    }

Generate token using ionosctl:

Install ionosctl as explained here Run commands to login and generate your token.

ionosctl login
ionosctl token generate
export IONOS_TOKEN="insert_here_token_saved_from_generate_command"

Save the generated token and use it to authenticate:

    import (
        "context"
        "fmt"
        "github.com/ionos-cloud/sdk-go/v6"
        "log"
    )

    func TokenAuthExample() error {
        //note: to use NewConfigurationFromEnv(), you need to previously set IONOS_TOKEN as env variables
        authClient := authApi.NewAPIClient(authApi.NewConfigurationFromEnv())
        cfg.Debug = true
        apiClient := ionoscloud.NewAPIClient(cfg)
        datacenters, _, err := apiClient.DataCenter6Api.DatacentersGet(context.Background()).Depth(1).Execute()
        if err != nil {
            return fmt.Errorf("error retrieving datacenters (%w)", err)
        }
        return nil
    }

Certificate pinning:

You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following:

Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>

You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.

Depth

Many of the List or Get operations will accept an optional depth argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The details returned vary depending on the resource being queried, but it generally follows this pattern. By default, the SDK sets the depth argument to the maximum value.

Depth Description
0 Only direct properties are included. Children are not included.
1 Direct properties and children's references are returned.
2 Direct properties and children's properties are returned.
3 Direct properties, children's properties, and descendants' references are returned.
4 Direct properties, children's properties, and descendants' properties are returned.
5 Returns all available properties.

How to set Depth parameter:

⚠️ Please use this parameter with caution. We recommend using the default value and raising its value only if it is needed.

  • On the configuration level:
configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "URL")
configuration.SetDepth(5)

Using this method, the depth parameter will be set on all the API calls.

  • When calling a method:
request := apiClient.DataCenterApi.DatacentersGet(context.Background()).Depth(1)

Using this method, the depth parameter will be set on the current API call.

  • Using the default value:

If the depth parameter is not set, it will have the default value from the API that can be found here.

Note: The priority for setting the depth parameter is: set on function call > set on configuration level > set using the default value from the API

Pretty

The operations will also accept an optional pretty argument. Setting this to a value of true or false controls whether the response is pretty-printed (with indentation and new lines). By default, the SDK sets the pretty argument to true.

Changing the base URL

Base URL for the HTTP operation can be changed by using the following function:

requestProperties.SetURL("https://api.ionos.com/cloudapi/v6")

Debugging

You can now inject any logger that implements Printf as a logger instead of using the default sdk logger. There are now Loglevels that you can set: Off, Debug and Trace. Off - does not show any logs Debug - regular logs, no sensitive information Trace - we recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. It logs the full request and response without encryption, even for an HTTPS call. Verbose request and response logging can also significantly impact your application's performance.

package main
import "github.com/ionos-cloud/sdk-go/v6"
import "github.com/sirupsen/logrus"
func main() {
    // create your configuration. replace username, password, token and url with correct values, or use NewConfigurationFromEnv()
    // if you have set your env variables as explained above
    cfg := ionoscloud.NewConfiguration("username", "password", "token", "hostUrl")
    // enable request and response logging. this is the most verbose loglevel
    cfg.LogLevel = Trace
    // inject your own logger that implements Printf
    cfg.Logger = logrus.New()
    // create you api client with the configuration
    apiClient := ionoscloud.NewAPIClient(cfg)
}

If you want to see the API call request and response messages, you need to set the Debug field in the Configuration struct:

⚠️ **_Note: the field Debug is now deprecated and will be replaced with LogLevel in the future.

package main
import "github.com/ionos-cloud/sdk-go/v6"
func main() {
    // create your configuration. replace username, password, token and url with correct values, or use NewConfigurationFromEnv()
    // if you have set your env variables as explained above
    cfg := ionoscloud.NewConfiguration("username", "password", "token", "hostUrl")
    // enable request and response logging
    cfg.Debug = true
    // create you api client with the configuration
    apiClient := ionoscloud.NewAPIClient(cfg)
}

⚠️ Note: We recommend you only set this field for debugging purposes. Disable it in your production environments because it can log sensitive data. It logs the full request and response without encryption, even for an HTTPS call. Verbose request and response logging can also significantly impact your application's performance.

Documentation for API Endpoints

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

API Endpoints table
Class Method HTTP request Description
DefaultApi ApiInfoGet Get / Display API information
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Delete Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Retrieve Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Delete ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Retrieve ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsGet Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs List ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Partially modify ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPost Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs Create ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Modify ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Delete ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Retrieve ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesGet Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules List ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Partially modify ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPost Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules Create ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Modify ALB forwarding rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersGet Get /datacenters/{datacenterId}/applicationloadbalancers List Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Partially modify Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPost Post /datacenters/{datacenterId}/applicationloadbalancers Create Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Modify Application Load Balancers
BackupUnitsApi BackupunitsDelete Delete /backupunits/{backupunitId} Delete backup units
BackupUnitsApi BackupunitsFindById Get /backupunits/{backupunitId} Retrieve backup units
BackupUnitsApi BackupunitsGet Get /backupunits List backup units
BackupUnitsApi BackupunitsPatch Patch /backupunits/{backupunitId} Partially modify backup units
BackupUnitsApi BackupunitsPost Post /backupunits Create backup units
BackupUnitsApi BackupunitsPut Put /backupunits/{backupunitId} Modify backup units
BackupUnitsApi BackupunitsSsourlGet Get /backupunits/{backupunitId}/ssourl Retrieve BU single sign-on URLs
ContractResourcesApi ContractsGet Get /contracts Retrieve contracts
DataCentersApi DatacentersDelete Delete /datacenters/{datacenterId} Delete data centers
DataCentersApi DatacentersFindById Get /datacenters/{datacenterId} Retrieve data centers
DataCentersApi DatacentersGet Get /datacenters List your data centers
DataCentersApi DatacentersPatch Patch /datacenters/{datacenterId} Partially modify data centers
DataCentersApi DatacentersPost Post /datacenters Create data centers
DataCentersApi DatacentersPut Put /datacenters/{datacenterId} Modify data centers
FirewallRulesApi DatacentersServersNicsFirewallrulesDelete Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} Delete firewall rules
FirewallRulesApi DatacentersServersNicsFirewallrulesFindById Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} Retrieve firewall rules
FirewallRulesApi DatacentersServersNicsFirewallrulesGet Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules List firewall rules
FirewallRulesApi DatacentersServersNicsFirewallrulesPatch Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} Partially modify firewall rules
FirewallRulesApi DatacentersServersNicsFirewallrulesPost Post /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules Create firewall rules
FirewallRulesApi DatacentersServersNicsFirewallrulesPut Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} Modify firewall rules
FlowLogsApi DatacentersServersNicsFlowlogsDelete Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} Delete Flow Logs
FlowLogsApi DatacentersServersNicsFlowlogsFindById Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} Retrieve Flow Logs
FlowLogsApi DatacentersServersNicsFlowlogsGet Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs List Flow Logs
FlowLogsApi DatacentersServersNicsFlowlogsPatch Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} Partially modify Flow Logs
FlowLogsApi DatacentersServersNicsFlowlogsPost Post /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs Create Flow Logs
FlowLogsApi DatacentersServersNicsFlowlogsPut Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId} Modify Flow Logs
IPBlocksApi IpblocksDelete Delete /ipblocks/{ipblockId} Delete IP blocks
IPBlocksApi IpblocksFindById Get /ipblocks/{ipblockId} Retrieve IP blocks
IPBlocksApi IpblocksGet Get /ipblocks List IP blocks
IPBlocksApi IpblocksPatch Patch /ipblocks/{ipblockId} Partially modify IP blocks
IPBlocksApi IpblocksPost Post /ipblocks Reserve IP blocks
IPBlocksApi IpblocksPut Put /ipblocks/{ipblockId} Modify IP blocks
ImagesApi ImagesDelete Delete /images/{imageId} Delete images
ImagesApi ImagesFindById Get /images/{imageId} Retrieve images
ImagesApi ImagesGet Get /images List images
ImagesApi ImagesPatch Patch /images/{imageId} Partially modify images
ImagesApi ImagesPut Put /images/{imageId} Modify images
KubernetesApi K8sDelete Delete /k8s/{k8sClusterId} Delete Kubernetes clusters
KubernetesApi K8sFindByClusterId Get /k8s/{k8sClusterId} Retrieve Kubernetes clusters
KubernetesApi K8sGet Get /k8s List Kubernetes clusters
KubernetesApi K8sKubeconfigGet Get /k8s/{k8sClusterId}/kubeconfig Retrieve Kubernetes configuration files
KubernetesApi K8sNodepoolsDelete Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId} Delete Kubernetes node pools
KubernetesApi K8sNodepoolsFindById Get /k8s/{k8sClusterId}/nodepools/{nodepoolId} Retrieve Kubernetes node pools
KubernetesApi K8sNodepoolsGet Get /k8s/{k8sClusterId}/nodepools List Kubernetes node pools
KubernetesApi K8sNodepoolsNodesDelete Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} Delete Kubernetes nodes
KubernetesApi K8sNodepoolsNodesFindById Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} Retrieve Kubernetes nodes
KubernetesApi K8sNodepoolsNodesGet Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes List Kubernetes nodes
KubernetesApi K8sNodepoolsNodesReplacePost Post /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace Recreate Kubernetes nodes
KubernetesApi K8sNodepoolsPost Post /k8s/{k8sClusterId}/nodepools Create Kubernetes node pools
KubernetesApi K8sNodepoolsPut Put /k8s/{k8sClusterId}/nodepools/{nodepoolId} Modify Kubernetes node pools
KubernetesApi K8sPost Post /k8s Create Kubernetes clusters
KubernetesApi K8sPut Put /k8s/{k8sClusterId} Modify Kubernetes clusters
KubernetesApi K8sVersionsDefaultGet Get /k8s/versions/default Retrieve current default Kubernetes version
KubernetesApi K8sVersionsGet Get /k8s/versions List Kubernetes versions
LANsApi DatacentersLansDelete Delete /datacenters/{datacenterId}/lans/{lanId} Delete LANs
LANsApi DatacentersLansFindById Get /datacenters/{datacenterId}/lans/{lanId} Retrieve LANs
LANsApi DatacentersLansGet Get /datacenters/{datacenterId}/lans List LANs
LANsApi DatacentersLansNicsFindById Get /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId} Retrieve attached NICs
LANsApi DatacentersLansNicsGet Get /datacenters/{datacenterId}/lans/{lanId}/nics List LAN members
LANsApi DatacentersLansNicsPost Post /datacenters/{datacenterId}/lans/{lanId}/nics Attach NICs
LANsApi DatacentersLansPatch Patch /datacenters/{datacenterId}/lans/{lanId} Partially modify LANs
LANsApi DatacentersLansPost Post /datacenters/{datacenterId}/lans Create LANs
LANsApi DatacentersLansPut Put /datacenters/{datacenterId}/lans/{lanId} Modify LANs
LabelsApi DatacentersLabelsDelete Delete /datacenters/{datacenterId}/labels/{key} Delete data center labels
LabelsApi DatacentersLabelsFindByKey Get /datacenters/{datacenterId}/labels/{key} Retrieve data center labels
LabelsApi DatacentersLabelsGet Get /datacenters/{datacenterId}/labels List data center labels
LabelsApi DatacentersLabelsPost Post /datacenters/{datacenterId}/labels Create data center labels
LabelsApi DatacentersLabelsPut Put /datacenters/{datacenterId}/labels/{key} Modify data center labels
LabelsApi DatacentersServersLabelsDelete Delete /datacenters/{datacenterId}/servers/{serverId}/labels/{key} Delete server labels
LabelsApi DatacentersServersLabelsFindByKey Get /datacenters/{datacenterId}/servers/{serverId}/labels/{key} Retrieve server labels
LabelsApi DatacentersServersLabelsGet Get /datacenters/{datacenterId}/servers/{serverId}/labels List server labels
LabelsApi DatacentersServersLabelsPost Post /datacenters/{datacenterId}/servers/{serverId}/labels Create server labels
LabelsApi DatacentersServersLabelsPut Put /datacenters/{datacenterId}/servers/{serverId}/labels/{key} Modify server labels
LabelsApi DatacentersVolumesLabelsDelete Delete /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} Delete volume labels
LabelsApi DatacentersVolumesLabelsFindByKey Get /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} Retrieve volume labels
LabelsApi DatacentersVolumesLabelsGet Get /datacenters/{datacenterId}/volumes/{volumeId}/labels List volume labels
LabelsApi DatacentersVolumesLabelsPost Post /datacenters/{datacenterId}/volumes/{volumeId}/labels Create volume labels
LabelsApi DatacentersVolumesLabelsPut Put /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} Modify volume labels
LabelsApi IpblocksLabelsDelete Delete /ipblocks/{ipblockId}/labels/{key} Delete IP block labels
LabelsApi IpblocksLabelsFindByKey Get /ipblocks/{ipblockId}/labels/{key} Retrieve IP block labels
LabelsApi IpblocksLabelsGet Get /ipblocks/{ipblockId}/labels List IP block labels
LabelsApi IpblocksLabelsPost Post /ipblocks/{ipblockId}/labels Create IP block labels
LabelsApi IpblocksLabelsPut Put /ipblocks/{ipblockId}/labels/{key} Modify IP block labels
LabelsApi LabelsFindByUrn Get /labels/{labelurn} Retrieve labels by URN
LabelsApi LabelsGet Get /labels List labels
LabelsApi SnapshotsLabelsDelete Delete /snapshots/{snapshotId}/labels/{key} Delete snapshot labels
LabelsApi SnapshotsLabelsFindByKey Get /snapshots/{snapshotId}/labels/{key} Retrieve snapshot labels
LabelsApi SnapshotsLabelsGet Get /snapshots/{snapshotId}/labels List snapshot labels
LabelsApi SnapshotsLabelsPost Post /snapshots/{snapshotId}/labels Create snapshot labels
LabelsApi SnapshotsLabelsPut Put /snapshots/{snapshotId}/labels/{key} Modify snapshot labels
LoadBalancersApi DatacentersLoadbalancersBalancednicsDelete Delete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} Detach balanced NICs
LoadBalancersApi DatacentersLoadbalancersBalancednicsFindByNicId Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId} Retrieve balanced NICs
LoadBalancersApi DatacentersLoadbalancersBalancednicsGet Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics List balanced NICs
LoadBalancersApi DatacentersLoadbalancersBalancednicsPost Post /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics Attach balanced NICs
LoadBalancersApi DatacentersLoadbalancersDelete Delete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} Delete Load Balancers
LoadBalancersApi DatacentersLoadbalancersFindById Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} Retrieve Load Balancers
LoadBalancersApi DatacentersLoadbalancersGet Get /datacenters/{datacenterId}/loadbalancers List Load Balancers
LoadBalancersApi DatacentersLoadbalancersPatch Patch /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} Partially modify Load Balancers
LoadBalancersApi DatacentersLoadbalancersPost Post /datacenters/{datacenterId}/loadbalancers Create Load Balancers
LoadBalancersApi DatacentersLoadbalancersPut Put /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} Modify Load Balancers
LocationsApi LocationsFindByRegionId Get /locations/{regionId} List locations within regions
LocationsApi LocationsFindByRegionIdAndId Get /locations/{regionId}/{locationId} Retrieve specified locations
LocationsApi LocationsGet Get /locations List locations
NATGatewaysApi DatacentersNatgatewaysDelete Delete /datacenters/{datacenterId}/natgateways/{natGatewayId} Delete NAT Gateways
NATGatewaysApi DatacentersNatgatewaysFindByNatGatewayId Get /datacenters/{datacenterId}/natgateways/{natGatewayId} Retrieve NAT Gateways
NATGatewaysApi DatacentersNatgatewaysFlowlogsDelete Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} Delete NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysFlowlogsFindByFlowLogId Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} Retrieve NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysFlowlogsGet Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs List NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysFlowlogsPatch Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} Partially modify NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysFlowlogsPost Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs Create NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysFlowlogsPut Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId} Modify NAT Gateway Flow Logs
NATGatewaysApi DatacentersNatgatewaysGet Get /datacenters/{datacenterId}/natgateways List NAT Gateways
NATGatewaysApi DatacentersNatgatewaysPatch Patch /datacenters/{datacenterId}/natgateways/{natGatewayId} Partially modify NAT Gateways
NATGatewaysApi DatacentersNatgatewaysPost Post /datacenters/{datacenterId}/natgateways Create NAT Gateways
NATGatewaysApi DatacentersNatgatewaysPut Put /datacenters/{datacenterId}/natgateways/{natGatewayId} Modify NAT Gateways
NATGatewaysApi DatacentersNatgatewaysRulesDelete Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} Delete NAT Gateway rules
NATGatewaysApi DatacentersNatgatewaysRulesFindByNatGatewayRuleId Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} Retrieve NAT Gateway rules
NATGatewaysApi DatacentersNatgatewaysRulesGet Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules List NAT Gateway rules
NATGatewaysApi DatacentersNatgatewaysRulesPatch Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} Partially modify NAT Gateway rules
NATGatewaysApi DatacentersNatgatewaysRulesPost Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules Create NAT Gateway rules
NATGatewaysApi DatacentersNatgatewaysRulesPut Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} Modify NAT Gateway rules
NetworkInterfacesApi DatacentersServersNicsDelete Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} Delete NICs
NetworkInterfacesApi DatacentersServersNicsFindById Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} Retrieve NICs
NetworkInterfacesApi DatacentersServersNicsGet Get /datacenters/{datacenterId}/servers/{serverId}/nics List NICs
NetworkInterfacesApi DatacentersServersNicsPatch Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} Partially modify NICs
NetworkInterfacesApi DatacentersServersNicsPost Post /datacenters/{datacenterId}/servers/{serverId}/nics Create NICs
NetworkInterfacesApi DatacentersServersNicsPut Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId} Modify NICs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersDelete Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} Delete Network Load Balancers
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFindByNetworkLoadBalancerId Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} Retrieve Network Load Balancers
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsDelete Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} Delete NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsFindByFlowLogId Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} Retrieve NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsGet Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs List NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsPatch Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} Partially modify NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsPost Post /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs Create NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersFlowlogsPut Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId} Modify NLB Flow Logs
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesDelete Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} Delete NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleId Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} Retrieve NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesGet Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules List NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesPatch Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} Partially modify NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesPost Post /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules Create NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersForwardingrulesPut Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId} Modify NLB forwarding rules
NetworkLoadBalancersApi DatacentersNetworkloadbalancersGet Get /datacenters/{datacenterId}/networkloadbalancers List Network Load Balancers
NetworkLoadBalancersApi DatacentersNetworkloadbalancersPatch Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} Partially modify Network Load Balancers
NetworkLoadBalancersApi DatacentersNetworkloadbalancersPost Post /datacenters/{datacenterId}/networkloadbalancers Create Network Load Balancers
NetworkLoadBalancersApi DatacentersNetworkloadbalancersPut Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId} Modify Network Load Balancers
PrivateCrossConnectsApi PccsDelete Delete /pccs/{pccId} Delete private Cross-Connects
PrivateCrossConnectsApi PccsFindById Get /pccs/{pccId} Retrieve private Cross-Connects
PrivateCrossConnectsApi PccsGet Get /pccs List private Cross-Connects
PrivateCrossConnectsApi PccsPatch Patch /pccs/{pccId} Partially modify private Cross-Connects
PrivateCrossConnectsApi PccsPost Post /pccs Create private Cross-Connects
RequestsApi RequestsFindById Get /requests/{requestId} Retrieve requests
RequestsApi RequestsGet Get /requests List requests
RequestsApi RequestsStatusGet Get /requests/{requestId}/status Retrieve request status
ServersApi DatacentersServersCdromsDelete Delete /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} Detach CD-ROMs
ServersApi DatacentersServersCdromsFindById Get /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} Retrieve attached CD-ROMs
ServersApi DatacentersServersCdromsGet Get /datacenters/{datacenterId}/servers/{serverId}/cdroms List attached CD-ROMs
ServersApi DatacentersServersCdromsPost Post /datacenters/{datacenterId}/servers/{serverId}/cdroms Attach CD-ROMs
ServersApi DatacentersServersDelete Delete /datacenters/{datacenterId}/servers/{serverId} Delete servers
ServersApi DatacentersServersFindById Get /datacenters/{datacenterId}/servers/{serverId} Retrieve servers by ID
ServersApi DatacentersServersGet Get /datacenters/{datacenterId}/servers List servers
ServersApi DatacentersServersPatch Patch /datacenters/{datacenterId}/servers/{serverId} Partially modify servers
ServersApi DatacentersServersPost Post /datacenters/{datacenterId}/servers Create servers
ServersApi DatacentersServersPut Put /datacenters/{datacenterId}/servers/{serverId} Modify servers
ServersApi DatacentersServersRebootPost Post /datacenters/{datacenterId}/servers/{serverId}/reboot Reboot servers
ServersApi DatacentersServersRemoteConsoleGet Get /datacenters/{datacenterId}/servers/{serverId}/remoteconsole Get Remote Console link
ServersApi DatacentersServersResumePost Post /datacenters/{datacenterId}/servers/{serverId}/resume Resume Cubes instances
ServersApi DatacentersServersStartPost Post /datacenters/{datacenterId}/servers/{serverId}/start Start servers
ServersApi DatacentersServersStopPost Post /datacenters/{datacenterId}/servers/{serverId}/stop Stop VMs
ServersApi DatacentersServersSuspendPost Post /datacenters/{datacenterId}/servers/{serverId}/suspend Suspend Cubes instances
ServersApi DatacentersServersTokenGet Get /datacenters/{datacenterId}/servers/{serverId}/token Get JASON Web Token
ServersApi DatacentersServersUpgradePost Post /datacenters/{datacenterId}/servers/{serverId}/upgrade Upgrade servers
ServersApi DatacentersServersVolumesDelete Delete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} Detach volumes
ServersApi DatacentersServersVolumesFindById Get /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} Retrieve attached volumes
ServersApi DatacentersServersVolumesGet Get /datacenters/{datacenterId}/servers/{serverId}/volumes List attached volumes
ServersApi DatacentersServersVolumesPost Post /datacenters/{datacenterId}/servers/{serverId}/volumes Attach volumes
SnapshotsApi SnapshotsDelete Delete /snapshots/{snapshotId} Delete snapshots
SnapshotsApi SnapshotsFindById Get /snapshots/{snapshotId} Retrieve snapshots by ID
SnapshotsApi SnapshotsGet Get /snapshots List snapshots
SnapshotsApi SnapshotsPatch Patch /snapshots/{snapshotId} Partially modify snapshots
SnapshotsApi SnapshotsPut Put /snapshots/{snapshotId} Modify snapshots
TargetGroupsApi TargetGroupsDelete Delete /targetgroups/{targetGroupId} Remove target groups
TargetGroupsApi TargetgroupsFindByTargetGroupId Get /targetgroups/{targetGroupId} Retrieve target groups
TargetGroupsApi TargetgroupsGet Get /targetgroups List target groups
TargetGroupsApi TargetgroupsPatch Patch /targetgroups/{targetGroupId} Partially modify target groups
TargetGroupsApi TargetgroupsPost Post /targetgroups Create target groups
TargetGroupsApi TargetgroupsPut Put /targetgroups/{targetGroupId} Modify target groups
TemplatesApi TemplatesFindById Get /templates/{templateId} Retrieve Cubes Templates
TemplatesApi TemplatesGet Get /templates List Cubes Templates
UserManagementApi UmGroupsDelete Delete /um/groups/{groupId} Delete groups
UserManagementApi UmGroupsFindById Get /um/groups/{groupId} Retrieve groups
UserManagementApi UmGroupsGet Get /um/groups List all groups
UserManagementApi UmGroupsPost Post /um/groups Create groups
UserManagementApi UmGroupsPut Put /um/groups/{groupId} Modify groups
UserManagementApi UmGroupsResourcesGet Get /um/groups/{groupId}/resources Retrieve group resources
UserManagementApi UmGroupsSharesDelete Delete /um/groups/{groupId}/shares/{resourceId} Remove group shares
UserManagementApi UmGroupsSharesFindByResourceId Get /um/groups/{groupId}/shares/{resourceId} Retrieve group shares
UserManagementApi UmGroupsSharesGet Get /um/groups/{groupId}/shares List group shares
UserManagementApi UmGroupsSharesPost Post /um/groups/{groupId}/shares/{resourceId} Add group shares
UserManagementApi UmGroupsSharesPut Put /um/groups/{groupId}/shares/{resourceId} Modify group share privileges
UserManagementApi UmGroupsUsersDelete Delete /um/groups/{groupId}/users/{userId} Remove users from groups
UserManagementApi UmGroupsUsersGet Get /um/groups/{groupId}/users List group members
UserManagementApi UmGroupsUsersPost Post /um/groups/{groupId}/users Add group members
UserManagementApi UmResourcesFindByType Get /um/resources/{resourceType} List resources by type
UserManagementApi UmResourcesFindByTypeAndId Get /um/resources/{resourceType}/{resourceId} Retrieve resources by type
UserManagementApi UmResourcesGet Get /um/resources List all resources
UserManagementApi UmUsersDelete Delete /um/users/{userId} Delete users
UserManagementApi UmUsersFindById Get /um/users/{userId} Retrieve users
UserManagementApi UmUsersGet Get /um/users List all users
UserManagementApi UmUsersGroupsGet Get /um/users/{userId}/groups Retrieve group resources by user ID
UserManagementApi UmUsersOwnsGet Get /um/users/{userId}/owns Retrieve user resources by user ID
UserManagementApi UmUsersPost Post /um/users Create users
UserManagementApi UmUsersPut Put /um/users/{userId} Modify users
UserS3KeysApi UmUsersS3keysDelete Delete /um/users/{userId}/s3keys/{keyId} Delete S3 keys
UserS3KeysApi UmUsersS3keysFindByKeyId Get /um/users/{userId}/s3keys/{keyId} Retrieve user S3 keys by key ID
UserS3KeysApi UmUsersS3keysGet Get /um/users/{userId}/s3keys List user S3 keys
UserS3KeysApi UmUsersS3keysPost Post /um/users/{userId}/s3keys Create user S3 keys
UserS3KeysApi UmUsersS3keysPut Put /um/users/{userId}/s3keys/{keyId} Modify S3 keys by key ID
UserS3KeysApi UmUsersS3ssourlGet Get /um/users/{userId}/s3ssourl Retrieve S3 single sign-on URLs
VolumesApi DatacentersVolumesCreateSnapshotPost Post /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot Create volume snapshots
VolumesApi DatacentersVolumesDelete Delete /datacenters/{datacenterId}/volumes/{volumeId} Delete volumes
VolumesApi DatacentersVolumesFindById Get /datacenters/{datacenterId}/volumes/{volumeId} Retrieve volumes
VolumesApi DatacentersVolumesGet Get /datacenters/{datacenterId}/volumes List volumes
VolumesApi DatacentersVolumesPatch Patch /datacenters/{datacenterId}/volumes/{volumeId} Partially modify volumes
VolumesApi DatacentersVolumesPost Post /datacenters/{datacenterId}/volumes Create volumes
VolumesApi DatacentersVolumesPut Put /datacenters/{datacenterId}/volumes/{volumeId} Modify volumes
VolumesApi DatacentersVolumesRestoreSnapshotPost Post /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot Restore volume snapshots

Documentation For Models

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

API models list

[Back to API list] [Back to Model list]

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime