Categorygithub.com/ionos-cloud/sdk-go/v6
package
6.1.11
Repository: https://github.com/ionos-cloud/sdk-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

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/[email protected]

To get the latest SDK repository, use @latest.

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

Environment Variables

Environment VariableDescription
IONOS_USERNAMESpecify the username used to login, to authenticate against the IONOS Cloud API
IONOS_PASSWORDSpecify the password used to login, to authenticate against the IONOS Cloud API
IONOS_TOKENSpecify the token used to login, if a token is being used instead of username and password
IONOS_API_URLSpecify 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_LEVELSpecify the Log Level used to log messages. Possible values: Off, Debug, Trace
IONOS_PINNED_CERTSpecify the SHA-256 public fingerprint here, enables certificate pinning
IONOS_CONTRACT_NUMBERSpecify 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.

DepthDescription
0Only direct properties are included. Children are not included.
1Direct properties and children's references are returned.
2Direct properties and children's properties are returned.
3Direct properties, children's properties, and descendants' references are returned.
4Direct properties, children's properties, and descendants' properties are returned.
5Returns 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
ClassMethodHTTP requestDescription
DefaultApiApiInfoGetGet /Get API information
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersDeleteDelete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}Delete an Application Load Balancer by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFindByApplicationLoadBalancerIdGet /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}Get an Application Load Balancer by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsDeleteDelete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}Delete an ALB Flow Log by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsFindByFlowLogIdGet /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}Get an ALB Flow Log by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsGetGet /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogsGet ALB Flow Logs
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsPatchPatch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}Partially Modify an ALB Flow Log by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsPostPost /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogsCreate an ALB Flow Log
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersFlowlogsPutPut /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}Modify an ALB Flow Log by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesDeleteDelete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}Delete an ALB Forwarding Rule by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesFindByForwardingRuleIdGet /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}Get an ALB Forwarding Rule by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesGetGet /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrulesGet ALB Forwarding Rules
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesPatchPatch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}Partially modify an ALB Forwarding Rule by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesPostPost /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrulesCreate an ALB Forwarding Rule
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersForwardingrulesPutPut /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}Modify an ALB Forwarding Rule by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersGetGet /datacenters/{datacenterId}/applicationloadbalancersGet Application Load Balancers
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersPatchPatch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}Partially Modify an Application Load Balancer by ID
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersPostPost /datacenters/{datacenterId}/applicationloadbalancersCreate an Application Load Balancer
ApplicationLoadBalancersApiDatacentersApplicationloadbalancersPutPut /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}Modify an Application Load Balancer by ID
BackupUnitsApiBackupunitsDeleteDelete /backupunits/{backupunitId}Delete backup units
BackupUnitsApiBackupunitsFindByIdGet /backupunits/{backupunitId}Retrieve backup units
BackupUnitsApiBackupunitsGetGet /backupunitsList backup units
BackupUnitsApiBackupunitsPatchPatch /backupunits/{backupunitId}Partially modify backup units
BackupUnitsApiBackupunitsPostPost /backupunitsCreate backup units
BackupUnitsApiBackupunitsPutPut /backupunits/{backupunitId}Modify backup units
BackupUnitsApiBackupunitsSsourlGetGet /backupunits/{backupunitId}/ssourlRetrieve BU single sign-on URLs
ContractResourcesApiContractsGetGet /contractsGet Contract Information
DataCentersApiDatacentersDeleteDelete /datacenters/{datacenterId}Delete data centers
DataCentersApiDatacentersFindByIdGet /datacenters/{datacenterId}Retrieve data centers
DataCentersApiDatacentersGetGet /datacentersList your data centers
DataCentersApiDatacentersPatchPatch /datacenters/{datacenterId}Partially modify a Data Center by ID
DataCentersApiDatacentersPostPost /datacentersCreate a Data Center
DataCentersApiDatacentersPutPut /datacenters/{datacenterId}Modify a Data Center by ID
FirewallRulesApiDatacentersServersNicsFirewallrulesDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Delete firewall rules
FirewallRulesApiDatacentersServersNicsFirewallrulesFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Retrieve firewall rules
FirewallRulesApiDatacentersServersNicsFirewallrulesGetGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrulesList firewall rules
FirewallRulesApiDatacentersServersNicsFirewallrulesPatchPatch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Partially modify firewall rules
FirewallRulesApiDatacentersServersNicsFirewallrulesPostPost /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrulesCreate a Firewall Rule
FirewallRulesApiDatacentersServersNicsFirewallrulesPutPut /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Modify a Firewall Rule
FlowLogsApiDatacentersServersNicsFlowlogsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}Delete Flow Logs
FlowLogsApiDatacentersServersNicsFlowlogsFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}Retrieve Flow Logs
FlowLogsApiDatacentersServersNicsFlowlogsGetGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogsList Flow Logs
FlowLogsApiDatacentersServersNicsFlowlogsPatchPatch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}Partially modify Flow Logs
FlowLogsApiDatacentersServersNicsFlowlogsPostPost /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogsCreate a Flow Log
FlowLogsApiDatacentersServersNicsFlowlogsPutPut /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}Modify Flow Logs
IPBlocksApiIpblocksDeleteDelete /ipblocks/{ipblockId}Delete IP blocks
IPBlocksApiIpblocksFindByIdGet /ipblocks/{ipblockId}Retrieve IP blocks
IPBlocksApiIpblocksGetGet /ipblocksList IP blocks
IPBlocksApiIpblocksPatchPatch /ipblocks/{ipblockId}Partially modify IP blocks
IPBlocksApiIpblocksPostPost /ipblocksReserve a IP Block
IPBlocksApiIpblocksPutPut /ipblocks/{ipblockId}Modify a IP Block by ID
ImagesApiImagesDeleteDelete /images/{imageId}Delete images
ImagesApiImagesFindByIdGet /images/{imageId}Retrieve images
ImagesApiImagesGetGet /imagesList images
ImagesApiImagesPatchPatch /images/{imageId}Partially modify images
ImagesApiImagesPutPut /images/{imageId}Modify an Image by ID
KubernetesApiK8sDeleteDelete /k8s/{k8sClusterId}Delete a Kubernetes Cluster by ID
KubernetesApiK8sFindByClusterIdGet /k8s/{k8sClusterId}Get a Kubernetes Cluster by ID
KubernetesApiK8sGetGet /k8sGet Kubernetes Clusters
KubernetesApiK8sKubeconfigGetGet /k8s/{k8sClusterId}/kubeconfigGet Kubernetes Configuration File
KubernetesApiK8sNodepoolsDeleteDelete /k8s/{k8sClusterId}/nodepools/{nodepoolId}Delete a Kubernetes Node Pool by ID
KubernetesApiK8sNodepoolsFindByIdGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}Get a Kubernetes Node Pool by ID
KubernetesApiK8sNodepoolsGetGet /k8s/{k8sClusterId}/nodepoolsGet Kubernetes Node Pools
KubernetesApiK8sNodepoolsNodesDeleteDelete /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}Delete a Kubernetes Node by ID
KubernetesApiK8sNodepoolsNodesFindByIdGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}Get Kubernetes Node by ID
KubernetesApiK8sNodepoolsNodesGetGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodesGet Kubernetes Nodes
KubernetesApiK8sNodepoolsNodesReplacePostPost /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replaceRecreate a Kubernetes Node by ID
KubernetesApiK8sNodepoolsPostPost /k8s/{k8sClusterId}/nodepoolsCreate a Kubernetes Node Pool
KubernetesApiK8sNodepoolsPutPut /k8s/{k8sClusterId}/nodepools/{nodepoolId}Modify a Kubernetes Node Pool by ID
KubernetesApiK8sPostPost /k8sCreate a Kubernetes Cluster
KubernetesApiK8sPutPut /k8s/{k8sClusterId}Modify a Kubernetes Cluster by ID
KubernetesApiK8sVersionsDefaultGetGet /k8s/versions/defaultGet Default Kubernetes Version
KubernetesApiK8sVersionsGetGet /k8s/versionsGet Kubernetes Versions
LANsApiDatacentersLansDeleteDelete /datacenters/{datacenterId}/lans/{lanId}Delete LANs
LANsApiDatacentersLansFindByIdGet /datacenters/{datacenterId}/lans/{lanId}Retrieve LANs
LANsApiDatacentersLansGetGet /datacenters/{datacenterId}/lansList LANs
LANsApiDatacentersLansNicsFindByIdGet /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}Retrieve attached NICs
LANsApiDatacentersLansNicsGetGet /datacenters/{datacenterId}/lans/{lanId}/nicsList LAN members
LANsApiDatacentersLansNicsPostPost /datacenters/{datacenterId}/lans/{lanId}/nicsAttach NICs
LANsApiDatacentersLansPatchPatch /datacenters/{datacenterId}/lans/{lanId}Partially modify LANs
LANsApiDatacentersLansPostPost /datacenters/{datacenterId}/lansCreate LANs
LANsApiDatacentersLansPutPut /datacenters/{datacenterId}/lans/{lanId}Modify LANs
LabelsApiDatacentersLabelsDeleteDelete /datacenters/{datacenterId}/labels/{key}Delete data center labels
LabelsApiDatacentersLabelsFindByKeyGet /datacenters/{datacenterId}/labels/{key}Retrieve data center labels
LabelsApiDatacentersLabelsGetGet /datacenters/{datacenterId}/labelsList data center labels
LabelsApiDatacentersLabelsPostPost /datacenters/{datacenterId}/labelsCreate a Data Center Label
LabelsApiDatacentersLabelsPutPut /datacenters/{datacenterId}/labels/{key}Modify a Data Center Label by Key
LabelsApiDatacentersServersLabelsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Delete server labels
LabelsApiDatacentersServersLabelsFindByKeyGet /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Retrieve server labels
LabelsApiDatacentersServersLabelsGetGet /datacenters/{datacenterId}/servers/{serverId}/labelsList server labels
LabelsApiDatacentersServersLabelsPostPost /datacenters/{datacenterId}/servers/{serverId}/labelsCreate a Server Label
LabelsApiDatacentersServersLabelsPutPut /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Modify a Server Label
LabelsApiDatacentersVolumesLabelsDeleteDelete /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Delete volume labels
LabelsApiDatacentersVolumesLabelsFindByKeyGet /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Retrieve volume labels
LabelsApiDatacentersVolumesLabelsGetGet /datacenters/{datacenterId}/volumes/{volumeId}/labelsList volume labels
LabelsApiDatacentersVolumesLabelsPostPost /datacenters/{datacenterId}/volumes/{volumeId}/labelsCreate a Volume Label
LabelsApiDatacentersVolumesLabelsPutPut /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Modify a Volume Label
LabelsApiIpblocksLabelsDeleteDelete /ipblocks/{ipblockId}/labels/{key}Delete IP block labels
LabelsApiIpblocksLabelsFindByKeyGet /ipblocks/{ipblockId}/labels/{key}Retrieve IP block labels
LabelsApiIpblocksLabelsGetGet /ipblocks/{ipblockId}/labelsList IP block labels
LabelsApiIpblocksLabelsPostPost /ipblocks/{ipblockId}/labelsCreate IP block labels
LabelsApiIpblocksLabelsPutPut /ipblocks/{ipblockId}/labels/{key}Modify a IP Block Label by ID
LabelsApiLabelsFindByUrnGet /labels/{labelurn}Retrieve labels by URN
LabelsApiLabelsGetGet /labelsList labels
LabelsApiSnapshotsLabelsDeleteDelete /snapshots/{snapshotId}/labels/{key}Delete snapshot labels
LabelsApiSnapshotsLabelsFindByKeyGet /snapshots/{snapshotId}/labels/{key}Retrieve snapshot labels
LabelsApiSnapshotsLabelsGetGet /snapshots/{snapshotId}/labelsList snapshot labels
LabelsApiSnapshotsLabelsPostPost /snapshots/{snapshotId}/labelsCreate a Snapshot Label
LabelsApiSnapshotsLabelsPutPut /snapshots/{snapshotId}/labels/{key}Modify a Snapshot Label by ID
LoadBalancersApiDatacentersLoadbalancersBalancednicsDeleteDelete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}Detach balanced NICs
LoadBalancersApiDatacentersLoadbalancersBalancednicsFindByNicIdGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}Retrieve balanced NICs
LoadBalancersApiDatacentersLoadbalancersBalancednicsGetGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednicsList balanced NICs
LoadBalancersApiDatacentersLoadbalancersBalancednicsPostPost /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednicsAttach balanced NICs
LoadBalancersApiDatacentersLoadbalancersDeleteDelete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Delete Load Balancers
LoadBalancersApiDatacentersLoadbalancersFindByIdGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Retrieve Load Balancers
LoadBalancersApiDatacentersLoadbalancersGetGet /datacenters/{datacenterId}/loadbalancersList Load Balancers
LoadBalancersApiDatacentersLoadbalancersPatchPatch /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Partially modify Load Balancers
LoadBalancersApiDatacentersLoadbalancersPostPost /datacenters/{datacenterId}/loadbalancersCreate a Load Balancer
LoadBalancersApiDatacentersLoadbalancersPutPut /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Modify a Load Balancer by ID
LocationsApiLocationsFindByRegionIdGet /locations/{regionId}Get Locations within a Region
LocationsApiLocationsFindByRegionIdAndIdGet /locations/{regionId}/{locationId}Get Location by ID
LocationsApiLocationsGetGet /locationsGet Locations
NATGatewaysApiDatacentersNatgatewaysDeleteDelete /datacenters/{datacenterId}/natgateways/{natGatewayId}Delete NAT Gateways
NATGatewaysApiDatacentersNatgatewaysFindByNatGatewayIdGet /datacenters/{datacenterId}/natgateways/{natGatewayId}Retrieve NAT Gateways
NATGatewaysApiDatacentersNatgatewaysFlowlogsDeleteDelete /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}Delete NAT Gateway Flow Logs
NATGatewaysApiDatacentersNatgatewaysFlowlogsFindByFlowLogIdGet /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}Retrieve NAT Gateway Flow Logs
NATGatewaysApiDatacentersNatgatewaysFlowlogsGetGet /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogsList NAT Gateway Flow Logs
NATGatewaysApiDatacentersNatgatewaysFlowlogsPatchPatch /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}Partially modify NAT Gateway Flow Logs
NATGatewaysApiDatacentersNatgatewaysFlowlogsPostPost /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogsCreate a NAT Gateway Flow Log
NATGatewaysApiDatacentersNatgatewaysFlowlogsPutPut /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}Modify NAT Gateway Flow Logs
NATGatewaysApiDatacentersNatgatewaysGetGet /datacenters/{datacenterId}/natgatewaysList NAT Gateways
NATGatewaysApiDatacentersNatgatewaysPatchPatch /datacenters/{datacenterId}/natgateways/{natGatewayId}Partially modify NAT Gateways
NATGatewaysApiDatacentersNatgatewaysPostPost /datacenters/{datacenterId}/natgatewaysCreate a NAT Gateway
NATGatewaysApiDatacentersNatgatewaysPutPut /datacenters/{datacenterId}/natgateways/{natGatewayId}Modify NAT Gateways
NATGatewaysApiDatacentersNatgatewaysRulesDeleteDelete /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}Delete NAT Gateway rules
NATGatewaysApiDatacentersNatgatewaysRulesFindByNatGatewayRuleIdGet /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}Retrieve NAT Gateway rules
NATGatewaysApiDatacentersNatgatewaysRulesGetGet /datacenters/{datacenterId}/natgateways/{natGatewayId}/rulesList NAT Gateway rules
NATGatewaysApiDatacentersNatgatewaysRulesPatchPatch /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}Partially Modify a NAT Gateway Rule by ID
NATGatewaysApiDatacentersNatgatewaysRulesPostPost /datacenters/{datacenterId}/natgateways/{natGatewayId}/rulesCreate a NAT Gateway Rule
NATGatewaysApiDatacentersNatgatewaysRulesPutPut /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}Modify a NAT Gateway Rule by ID
NetworkInterfacesApiDatacentersServersNicsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Delete NICs
NetworkInterfacesApiDatacentersServersNicsFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Retrieve NICs
NetworkInterfacesApiDatacentersServersNicsGetGet /datacenters/{datacenterId}/servers/{serverId}/nicsList NICs
NetworkInterfacesApiDatacentersServersNicsPatchPatch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Partially modify NICs
NetworkInterfacesApiDatacentersServersNicsPostPost /datacenters/{datacenterId}/servers/{serverId}/nicsCreate a NIC
NetworkInterfacesApiDatacentersServersNicsPutPut /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Modify NICs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersDeleteDelete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}Delete Network Load Balancers
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFindByNetworkLoadBalancerIdGet /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}Retrieve Network Load Balancers
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsDeleteDelete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}Delete NLB Flow Logs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsFindByFlowLogIdGet /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}Retrieve NLB Flow Logs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsGetGet /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogsList NLB Flow Logs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsPatchPatch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}Partially modify NLB Flow Logs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsPostPost /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogsCreate a NLB Flow Log
NetworkLoadBalancersApiDatacentersNetworkloadbalancersFlowlogsPutPut /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}Modify NLB Flow Logs
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesDeleteDelete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}Delete NLB forwarding rules
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesFindByForwardingRuleIdGet /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}Retrieve NLB forwarding rules
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesGetGet /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrulesList NLB forwarding rules
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesPatchPatch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}Partially modify NLB forwarding rules
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesPostPost /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrulesCreate a NLB Forwarding Rule
NetworkLoadBalancersApiDatacentersNetworkloadbalancersForwardingrulesPutPut /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}Modify NLB forwarding rules
NetworkLoadBalancersApiDatacentersNetworkloadbalancersGetGet /datacenters/{datacenterId}/networkloadbalancersList Network Load Balancers
NetworkLoadBalancersApiDatacentersNetworkloadbalancersPatchPatch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}Partially modify Network Load Balancers
NetworkLoadBalancersApiDatacentersNetworkloadbalancersPostPost /datacenters/{datacenterId}/networkloadbalancersCreate a Network Load Balancer
NetworkLoadBalancersApiDatacentersNetworkloadbalancersPutPut /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}Modify Network Load Balancers
PrivateCrossConnectsApiPccsDeleteDelete /pccs/{pccId}Delete private Cross-Connects
PrivateCrossConnectsApiPccsFindByIdGet /pccs/{pccId}Retrieve private Cross-Connects
PrivateCrossConnectsApiPccsGetGet /pccsList private Cross-Connects
PrivateCrossConnectsApiPccsPatchPatch /pccs/{pccId}Partially modify private Cross-Connects
PrivateCrossConnectsApiPccsPostPost /pccsCreate a Private Cross-Connect
RequestsApiRequestsFindByIdGet /requests/{requestId}Retrieve requests
RequestsApiRequestsGetGet /requestsList requests
RequestsApiRequestsStatusGetGet /requests/{requestId}/statusRetrieve request status
ServersApiDatacentersServersCdromsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}Detach a CD-ROM by ID
ServersApiDatacentersServersCdromsFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}Get Attached CD-ROM by ID
ServersApiDatacentersServersCdromsGetGet /datacenters/{datacenterId}/servers/{serverId}/cdromsGet Attached CD-ROMs
ServersApiDatacentersServersCdromsPostPost /datacenters/{datacenterId}/servers/{serverId}/cdromsAttach a CD-ROM
ServersApiDatacentersServersDeleteDelete /datacenters/{datacenterId}/servers/{serverId}Delete servers
ServersApiDatacentersServersFindByIdGet /datacenters/{datacenterId}/servers/{serverId}Retrieve servers by ID
ServersApiDatacentersServersGetGet /datacenters/{datacenterId}/serversList servers
ServersApiDatacentersServersPatchPatch /datacenters/{datacenterId}/servers/{serverId}Partially modify servers
ServersApiDatacentersServersPostPost /datacenters/{datacenterId}/serversCreate a Server
ServersApiDatacentersServersPutPut /datacenters/{datacenterId}/servers/{serverId}Modify a Server by ID
ServersApiDatacentersServersRebootPostPost /datacenters/{datacenterId}/servers/{serverId}/rebootReboot servers
ServersApiDatacentersServersRemoteConsoleGetGet /datacenters/{datacenterId}/servers/{serverId}/remoteconsoleGet Remote Console link
ServersApiDatacentersServersResumePostPost /datacenters/{datacenterId}/servers/{serverId}/resumeResume a Cube Server by ID
ServersApiDatacentersServersStartPostPost /datacenters/{datacenterId}/servers/{serverId}/startStart an Enterprise Server by ID
ServersApiDatacentersServersStopPostPost /datacenters/{datacenterId}/servers/{serverId}/stopStop an Enterprise Server by ID
ServersApiDatacentersServersSuspendPostPost /datacenters/{datacenterId}/servers/{serverId}/suspendSuspend a Cube Server by ID
ServersApiDatacentersServersTokenGetGet /datacenters/{datacenterId}/servers/{serverId}/tokenGet JASON Web Token
ServersApiDatacentersServersUpgradePostPost /datacenters/{datacenterId}/servers/{serverId}/upgradeUpgrade a Server by ID
ServersApiDatacentersServersVolumesDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}Detach a Volume by ID
ServersApiDatacentersServersVolumesFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}Get Attached Volume by ID
ServersApiDatacentersServersVolumesGetGet /datacenters/{datacenterId}/servers/{serverId}/volumesGet Attached Volumes
ServersApiDatacentersServersVolumesPostPost /datacenters/{datacenterId}/servers/{serverId}/volumesAttach a Volume to a Server
SnapshotsApiSnapshotsDeleteDelete /snapshots/{snapshotId}Delete snapshots
SnapshotsApiSnapshotsFindByIdGet /snapshots/{snapshotId}Retrieve snapshots by ID
SnapshotsApiSnapshotsGetGet /snapshotsList snapshots
SnapshotsApiSnapshotsPatchPatch /snapshots/{snapshotId}Partially modify snapshots
SnapshotsApiSnapshotsPutPut /snapshots/{snapshotId}Modify a Snapshot by ID
TargetGroupsApiTargetGroupsDeleteDelete /targetgroups/{targetGroupId}Delete a Target Group by ID
TargetGroupsApiTargetgroupsFindByTargetGroupIdGet /targetgroups/{targetGroupId}Get a Target Group by ID
TargetGroupsApiTargetgroupsGetGet /targetgroupsGet Target Groups
TargetGroupsApiTargetgroupsPatchPatch /targetgroups/{targetGroupId}Partially Modify a Target Group by ID
TargetGroupsApiTargetgroupsPostPost /targetgroupsCreate a Target Group
TargetGroupsApiTargetgroupsPutPut /targetgroups/{targetGroupId}Modify a Target Group by ID
TemplatesApiTemplatesFindByIdGet /templates/{templateId}Get Cubes Template by ID
TemplatesApiTemplatesGetGet /templatesGet Cubes Templates
UserManagementApiUmGroupsDeleteDelete /um/groups/{groupId}Delete groups
UserManagementApiUmGroupsFindByIdGet /um/groups/{groupId}Retrieve groups
UserManagementApiUmGroupsGetGet /um/groupsList all groups
UserManagementApiUmGroupsPostPost /um/groupsCreate groups
UserManagementApiUmGroupsPutPut /um/groups/{groupId}Modify groups
UserManagementApiUmGroupsResourcesGetGet /um/groups/{groupId}/resourcesRetrieve group resources
UserManagementApiUmGroupsSharesDeleteDelete /um/groups/{groupId}/shares/{resourceId}Remove group shares
UserManagementApiUmGroupsSharesFindByResourceIdGet /um/groups/{groupId}/shares/{resourceId}Retrieve group shares
UserManagementApiUmGroupsSharesGetGet /um/groups/{groupId}/sharesList group shares
UserManagementApiUmGroupsSharesPostPost /um/groups/{groupId}/shares/{resourceId}Add group shares
UserManagementApiUmGroupsSharesPutPut /um/groups/{groupId}/shares/{resourceId}Modify group share privileges
UserManagementApiUmGroupsUsersDeleteDelete /um/groups/{groupId}/users/{userId}Remove users from groups
UserManagementApiUmGroupsUsersGetGet /um/groups/{groupId}/usersList group members
UserManagementApiUmGroupsUsersPostPost /um/groups/{groupId}/usersAdd a Group Member
UserManagementApiUmResourcesFindByTypeGet /um/resources/{resourceType}List resources by type
UserManagementApiUmResourcesFindByTypeAndIdGet /um/resources/{resourceType}/{resourceId}Retrieve resources by type
UserManagementApiUmResourcesGetGet /um/resourcesList all resources
UserManagementApiUmUsersDeleteDelete /um/users/{userId}Delete users
UserManagementApiUmUsersFindByIdGet /um/users/{userId}Retrieve users
UserManagementApiUmUsersGetGet /um/usersList all users
UserManagementApiUmUsersGroupsGetGet /um/users/{userId}/groupsRetrieve group resources by user ID
UserManagementApiUmUsersOwnsGetGet /um/users/{userId}/ownsRetrieve user resources by user ID
UserManagementApiUmUsersPostPost /um/usersCreate users
UserManagementApiUmUsersPutPut /um/users/{userId}Modify users
UserS3KeysApiUmUsersS3keysDeleteDelete /um/users/{userId}/s3keys/{keyId}Delete S3 keys
UserS3KeysApiUmUsersS3keysFindByKeyIdGet /um/users/{userId}/s3keys/{keyId}Retrieve user S3 keys by key ID
UserS3KeysApiUmUsersS3keysGetGet /um/users/{userId}/s3keysList user S3 keys
UserS3KeysApiUmUsersS3keysPostPost /um/users/{userId}/s3keysCreate user S3 keys
UserS3KeysApiUmUsersS3keysPutPut /um/users/{userId}/s3keys/{keyId}Modify a S3 Key by Key ID
UserS3KeysApiUmUsersS3ssourlGetGet /um/users/{userId}/s3ssourlRetrieve S3 single sign-on URLs
VolumesApiDatacentersVolumesCreateSnapshotPostPost /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshotCreate volume snapshots
VolumesApiDatacentersVolumesDeleteDelete /datacenters/{datacenterId}/volumes/{volumeId}Delete volumes
VolumesApiDatacentersVolumesFindByIdGet /datacenters/{datacenterId}/volumes/{volumeId}Retrieve volumes
VolumesApiDatacentersVolumesGetGet /datacenters/{datacenterId}/volumesList volumes
VolumesApiDatacentersVolumesPatchPatch /datacenters/{datacenterId}/volumes/{volumeId}Partially modify volumes
VolumesApiDatacentersVolumesPostPost /datacenters/{datacenterId}/volumesCreate a Volume
VolumesApiDatacentersVolumesPutPut /datacenters/{datacenterId}/volumes/{volumeId}Modify a Volume by ID
VolumesApiDatacentersVolumesRestoreSnapshotPostPost /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshotRestore 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