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_LOG_LEVEL 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
IONOS_CONTRACT_NUMBER Specify the contract number on which you wish to provision. Only valid for reseller accounts, for other types of accounts the header will be ignored

⚠️ 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 / Get API information
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Delete an Application Load Balancer by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFindByApplicationLoadBalancerId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Get an Application Load Balancer by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Delete an ALB Flow Log by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsFindByFlowLogId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Get an ALB Flow Log by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsGet Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs Get ALB Flow Logs
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Partially Modify an ALB Flow Log by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPost Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs Create an ALB Flow Log
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersFlowlogsPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId} Modify an ALB Flow Log by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesDelete Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Delete an ALB Forwarding Rule by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleId Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Get an ALB Forwarding Rule by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesGet Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules Get ALB Forwarding Rules
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Partially modify an ALB Forwarding Rule by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPost Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules Create an ALB Forwarding Rule
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersForwardingrulesPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId} Modify an ALB Forwarding Rule by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersGet Get /datacenters/{datacenterId}/applicationloadbalancers Get Application Load Balancers
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPatch Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Partially Modify an Application Load Balancer by ID
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPost Post /datacenters/{datacenterId}/applicationloadbalancers Create an Application Load Balancer
ApplicationLoadBalancersApi DatacentersApplicationloadbalancersPut Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId} Modify an Application Load Balancer by ID
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 Get Contract Information
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 a Data Center by ID
DataCentersApi DatacentersPost Post /datacenters Create a Data Center
DataCentersApi DatacentersPut Put /datacenters/{datacenterId} Modify a Data Center by ID
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 a Firewall Rule
FirewallRulesApi DatacentersServersNicsFirewallrulesPut Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId} Modify a Firewall Rule
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 a Flow Log
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 a IP Block
IPBlocksApi IpblocksPut Put /ipblocks/{ipblockId} Modify a IP Block by ID
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 an Image by ID
KubernetesApi K8sDelete Delete /k8s/{k8sClusterId} Delete a Kubernetes Cluster by ID
KubernetesApi K8sFindByClusterId Get /k8s/{k8sClusterId} Get a Kubernetes Cluster by ID
KubernetesApi K8sGet Get /k8s Get Kubernetes Clusters
KubernetesApi K8sKubeconfigGet Get /k8s/{k8sClusterId}/kubeconfig Get Kubernetes Configuration File
KubernetesApi K8sNodepoolsDelete Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId} Delete a Kubernetes Node Pool by ID
KubernetesApi K8sNodepoolsFindById Get /k8s/{k8sClusterId}/nodepools/{nodepoolId} Get a Kubernetes Node Pool by ID
KubernetesApi K8sNodepoolsGet Get /k8s/{k8sClusterId}/nodepools Get Kubernetes Node Pools
KubernetesApi K8sNodepoolsNodesDelete Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} Delete a Kubernetes Node by ID
KubernetesApi K8sNodepoolsNodesFindById Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} Get Kubernetes Node by ID
KubernetesApi K8sNodepoolsNodesGet Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes Get Kubernetes Nodes
KubernetesApi K8sNodepoolsNodesReplacePost Post /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace Recreate a Kubernetes Node by ID
KubernetesApi K8sNodepoolsPost Post /k8s/{k8sClusterId}/nodepools Create a Kubernetes Node Pool
KubernetesApi K8sNodepoolsPut Put /k8s/{k8sClusterId}/nodepools/{nodepoolId} Modify a Kubernetes Node Pool by ID
KubernetesApi K8sPost Post /k8s Create a Kubernetes Cluster
KubernetesApi K8sPut Put /k8s/{k8sClusterId} Modify a Kubernetes Cluster by ID
KubernetesApi K8sVersionsDefaultGet Get /k8s/versions/default Get Default Kubernetes Version
KubernetesApi K8sVersionsGet Get /k8s/versions Get 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 a Data Center Label
LabelsApi DatacentersLabelsPut Put /datacenters/{datacenterId}/labels/{key} Modify a Data Center Label by Key
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 a Server Label
LabelsApi DatacentersServersLabelsPut Put /datacenters/{datacenterId}/servers/{serverId}/labels/{key} Modify a Server Label
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 a Volume Label
LabelsApi DatacentersVolumesLabelsPut Put /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} Modify a Volume Label
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 a IP Block Label by ID
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 a Snapshot Label
LabelsApi SnapshotsLabelsPut Put /snapshots/{snapshotId}/labels/{key} Modify a Snapshot Label by ID
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 a Load Balancer
LoadBalancersApi DatacentersLoadbalancersPut Put /datacenters/{datacenterId}/loadbalancers/{loadbalancerId} Modify a Load Balancer by ID
LocationsApi LocationsFindByRegionId Get /locations/{regionId} Get Locations within a Region
LocationsApi LocationsFindByRegionIdAndId Get /locations/{regionId}/{locationId} Get Location by ID
LocationsApi LocationsGet Get /locations Get 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 a NAT Gateway Flow Log
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 a NAT Gateway
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 a NAT Gateway Rule by ID
NATGatewaysApi DatacentersNatgatewaysRulesPost Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules Create a NAT Gateway Rule
NATGatewaysApi DatacentersNatgatewaysRulesPut Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId} Modify a NAT Gateway Rule by ID
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 a NIC
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 a NLB Flow Log
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 a NLB Forwarding Rule
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 a Network Load Balancer
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 a Private Cross-Connect
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 a CD-ROM by ID
ServersApi DatacentersServersCdromsFindById Get /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId} Get Attached CD-ROM by ID
ServersApi DatacentersServersCdromsGet Get /datacenters/{datacenterId}/servers/{serverId}/cdroms Get Attached CD-ROMs
ServersApi DatacentersServersCdromsPost Post /datacenters/{datacenterId}/servers/{serverId}/cdroms Attach a CD-ROM
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 a Server
ServersApi DatacentersServersPut Put /datacenters/{datacenterId}/servers/{serverId} Modify a Server by ID
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 a Cube Server by ID
ServersApi DatacentersServersStartPost Post /datacenters/{datacenterId}/servers/{serverId}/start Start an Enterprise Server by ID
ServersApi DatacentersServersStopPost Post /datacenters/{datacenterId}/servers/{serverId}/stop Stop an Enterprise Server by ID
ServersApi DatacentersServersSuspendPost Post /datacenters/{datacenterId}/servers/{serverId}/suspend Suspend a Cube Server by ID
ServersApi DatacentersServersTokenGet Get /datacenters/{datacenterId}/servers/{serverId}/token Get JASON Web Token
ServersApi DatacentersServersUpgradePost Post /datacenters/{datacenterId}/servers/{serverId}/upgrade Upgrade a Server by ID
ServersApi DatacentersServersVolumesDelete Delete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} Detach a Volume by ID
ServersApi DatacentersServersVolumesFindById Get /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId} Get Attached Volume by ID
ServersApi DatacentersServersVolumesGet Get /datacenters/{datacenterId}/servers/{serverId}/volumes Get Attached Volumes
ServersApi DatacentersServersVolumesPost Post /datacenters/{datacenterId}/servers/{serverId}/volumes Attach a Volume to a Server
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 a Snapshot by ID
TargetGroupsApi TargetGroupsDelete Delete /targetgroups/{targetGroupId} Delete a Target Group by ID
TargetGroupsApi TargetgroupsFindByTargetGroupId Get /targetgroups/{targetGroupId} Get a Target Group by ID
TargetGroupsApi TargetgroupsGet Get /targetgroups Get Target Groups
TargetGroupsApi TargetgroupsPatch Patch /targetgroups/{targetGroupId} Partially Modify a Target Group by ID
TargetGroupsApi TargetgroupsPost Post /targetgroups Create a Target Group
TargetGroupsApi TargetgroupsPut Put /targetgroups/{targetGroupId} Modify a Target Group by ID
TemplatesApi TemplatesFindById Get /templates/{templateId} Get Cubes Template by ID
TemplatesApi TemplatesGet Get /templates Get 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 a Group Member
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 a S3 Key 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 a Volume
VolumesApi DatacentersVolumesPut Put /datacenters/{datacenterId}/volumes/{volumeId} Modify a Volume by ID
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:

Deprecated in favor of ToPtr that uses generics

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