Compute

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

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 6.0

  • Package version: products/compute/v2.0.3

  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./compute"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

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

Class
Method
HTTP request
Description

DefaultApi

Get /

Get API information

ApplicationLoadBalancersApi

Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}

Delete an Application Load Balancer by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}

Get an Application Load Balancer by ID

ApplicationLoadBalancersApi

Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}

Delete an ALB Flow Log by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}

Get an ALB Flow Log by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs

Get ALB Flow Logs

ApplicationLoadBalancersApi

Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}

Partially Modify an ALB Flow Log by ID

ApplicationLoadBalancersApi

Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs

Create an ALB Flow Log

ApplicationLoadBalancersApi

Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/flowlogs/{flowLogId}

Modify an ALB Flow Log by ID

ApplicationLoadBalancersApi

Delete /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}

Delete an ALB Forwarding Rule by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}

Get an ALB Forwarding Rule by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules

Get ALB Forwarding Rules

ApplicationLoadBalancersApi

Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}

Partially modify an ALB Forwarding Rule by ID

ApplicationLoadBalancersApi

Post /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules

Create an ALB Forwarding Rule

ApplicationLoadBalancersApi

Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}/forwardingrules/{forwardingRuleId}

Modify an ALB Forwarding Rule by ID

ApplicationLoadBalancersApi

Get /datacenters/{datacenterId}/applicationloadbalancers

Get Application Load Balancers

ApplicationLoadBalancersApi

Patch /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}

Partially Modify an Application Load Balancer by ID

ApplicationLoadBalancersApi

Post /datacenters/{datacenterId}/applicationloadbalancers

Create an Application Load Balancer

ApplicationLoadBalancersApi

Put /datacenters/{datacenterId}/applicationloadbalancers/{applicationLoadBalancerId}

Modify an Application Load Balancer by ID

BackupUnitsApi

Delete /backupunits/{backupunitId}

Delete backup units

BackupUnitsApi

Get /backupunits/{backupunitId}

Retrieve backup units

BackupUnitsApi

Get /backupunits

List backup units

BackupUnitsApi

Patch /backupunits/{backupunitId}

Partially modify backup units

BackupUnitsApi

Post /backupunits

Create backup units

BackupUnitsApi

Put /backupunits/{backupunitId}

Modify backup units

BackupUnitsApi

Get /backupunits/{backupunitId}/ssourl

Retrieve BU single sign-on URLs

ContractResourcesApi

Get /contracts

Get Contract Information

DataCentersApi

Delete /datacenters/{datacenterId}

Delete data centers

DataCentersApi

Get /datacenters/{datacenterId}

Retrieve data centers

DataCentersApi

Get /datacenters

List your data centers

DataCentersApi

Patch /datacenters/{datacenterId}

Partially modify a Data Center by ID

DataCentersApi

Post /datacenters

Create a Data Center

DataCentersApi

Put /datacenters/{datacenterId}

Modify a Data Center by ID

FirewallRulesApi

Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Delete firewall rules

FirewallRulesApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Retrieve firewall rules

FirewallRulesApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules

List firewall rules

FirewallRulesApi

Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Partially modify firewall rules

FirewallRulesApi

Post /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules

Create a Firewall Rule

FirewallRulesApi

Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Modify a Firewall Rule

FlowLogsApi

Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}

Delete Flow Logs

FlowLogsApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}

Retrieve Flow Logs

FlowLogsApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs

List Flow Logs

FlowLogsApi

Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}

Partially modify Flow Logs

FlowLogsApi

Post /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs

Create a Flow Log

FlowLogsApi

Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/flowlogs/{flowlogId}

Modify Flow Logs

IPBlocksApi

Delete /ipblocks/{ipblockId}

Delete IP blocks

IPBlocksApi

Get /ipblocks/{ipblockId}

Retrieve IP blocks

IPBlocksApi

Get /ipblocks

List IP blocks

IPBlocksApi

Patch /ipblocks/{ipblockId}

Partially modify IP blocks

IPBlocksApi

Post /ipblocks

Reserve a IP Block

IPBlocksApi

Put /ipblocks/{ipblockId}

Modify a IP Block by ID

ImagesApi

Delete /images/{imageId}

Delete images

ImagesApi

Get /images/{imageId}

Retrieve images

ImagesApi

Get /images

List images

ImagesApi

Patch /images/{imageId}

Partially modify images

ImagesApi

Put /images/{imageId}

Modify an Image by ID

KubernetesApi

Delete /k8s/{k8sClusterId}

Delete a Kubernetes Cluster by ID

KubernetesApi

Get /k8s/{k8sClusterId}

Get a Kubernetes Cluster by ID

KubernetesApi

Get /k8s

Get Kubernetes Clusters

KubernetesApi

Get /k8s/{k8sClusterId}/kubeconfig

Get Kubernetes Configuration File

KubernetesApi

Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId}

Delete a Kubernetes Node Pool by ID

KubernetesApi

Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}

Get a Kubernetes Node Pool by ID

KubernetesApi

Get /k8s/{k8sClusterId}/nodepools

Get Kubernetes Node Pools

KubernetesApi

Delete /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}

Delete a Kubernetes Node by ID

KubernetesApi

Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}

Get Kubernetes Node by ID

KubernetesApi

Get /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes

Get Kubernetes Nodes

KubernetesApi

Post /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace

Recreate a Kubernetes Node by ID

KubernetesApi

Post /k8s/{k8sClusterId}/nodepools

Create a Kubernetes Node Pool

KubernetesApi

Put /k8s/{k8sClusterId}/nodepools/{nodepoolId}

Modify a Kubernetes Node Pool by ID

KubernetesApi

Post /k8s

Create a Kubernetes Cluster

KubernetesApi

Put /k8s/{k8sClusterId}

Modify a Kubernetes Cluster by ID

KubernetesApi

Get /k8s/versions/default

Get Default Kubernetes Version

KubernetesApi

Get /k8s/versions

Get Kubernetes Versions

LANsApi

Delete /datacenters/{datacenterId}/lans/{lanId}

Delete LANs

LANsApi

Get /datacenters/{datacenterId}/lans/{lanId}

Retrieve LANs

LANsApi

Get /datacenters/{datacenterId}/lans

List LANs

LANsApi

Get /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}

Retrieve attached NICs

LANsApi

Get /datacenters/{datacenterId}/lans/{lanId}/nics

List LAN members

LANsApi

Post /datacenters/{datacenterId}/lans/{lanId}/nics

Attach NICs

LANsApi

Patch /datacenters/{datacenterId}/lans/{lanId}

Partially modify LANs

LANsApi

Post /datacenters/{datacenterId}/lans

Create LANs

LANsApi

Put /datacenters/{datacenterId}/lans/{lanId}

Modify LANs

LabelsApi

Delete /datacenters/{datacenterId}/labels/{key}

Delete data center labels

LabelsApi

Get /datacenters/{datacenterId}/labels/{key}

Retrieve data center labels

LabelsApi

Get /datacenters/{datacenterId}/labels

List data center labels

LabelsApi

Post /datacenters/{datacenterId}/labels

Create a Data Center Label

LabelsApi

Put /datacenters/{datacenterId}/labels/{key}

Modify a Data Center Label by Key

LabelsApi

Delete /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Delete server labels

LabelsApi

Get /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Retrieve server labels

LabelsApi

Get /datacenters/{datacenterId}/servers/{serverId}/labels

List server labels

LabelsApi

Post /datacenters/{datacenterId}/servers/{serverId}/labels

Create a Server Label

LabelsApi

Put /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Modify a Server Label

LabelsApi

Delete /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Delete volume labels

LabelsApi

Get /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Retrieve volume labels

LabelsApi

Get /datacenters/{datacenterId}/volumes/{volumeId}/labels

List volume labels

LabelsApi

Post /datacenters/{datacenterId}/volumes/{volumeId}/labels

Create a Volume Label

LabelsApi

Put /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Modify a Volume Label

LabelsApi

Delete /images/{imageId}/labels/{key}

Delete image label

LabelsApi

Get /images/{imageId}/labels/{key}

Retrieve image labels

LabelsApi

Get /images/{imageId}/labels

List image labels

LabelsApi

Post /images/{imageId}/labels

Create an Image Label

LabelsApi

Put /images/{imageId}/labels/{key}

Modify an Image Label by Key

LabelsApi

Delete /ipblocks/{ipblockId}/labels/{key}

Delete IP block labels

LabelsApi

Get /ipblocks/{ipblockId}/labels/{key}

Retrieve IP block labels

LabelsApi

Get /ipblocks/{ipblockId}/labels

List IP block labels

LabelsApi

Post /ipblocks/{ipblockId}/labels

Create IP block labels

LabelsApi

Put /ipblocks/{ipblockId}/labels/{key}

Modify a IP Block Label by ID

LabelsApi

Get /labels/{labelurn}

Retrieve labels by URN

LabelsApi

Get /labels

List labels

LabelsApi

Delete /snapshots/{snapshotId}/labels/{key}

Delete snapshot labels

LabelsApi

Get /snapshots/{snapshotId}/labels/{key}

Retrieve snapshot labels

LabelsApi

Get /snapshots/{snapshotId}/labels

List snapshot labels

LabelsApi

Post /snapshots/{snapshotId}/labels

Create a Snapshot Label

LabelsApi

Put /snapshots/{snapshotId}/labels/{key}

Modify a Snapshot Label by ID

LoadBalancersApi

Delete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}

Detach balanced NICs

LoadBalancersApi

Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}

Retrieve balanced NICs

LoadBalancersApi

Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics

List balanced NICs

LoadBalancersApi

Post /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics

Attach balanced NICs

LoadBalancersApi

Delete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}

Delete Load Balancers

LoadBalancersApi

Get /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}

Retrieve Load Balancers

LoadBalancersApi

Get /datacenters/{datacenterId}/loadbalancers

List Load Balancers

LoadBalancersApi

Patch /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}

Partially modify Load Balancers

LoadBalancersApi

Post /datacenters/{datacenterId}/loadbalancers

Create a Load Balancer

LoadBalancersApi

Put /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}

Modify a Load Balancer by ID

LocationsApi

Get /locations/{regionId}

Get Locations within a Region

LocationsApi

Get /locations/{regionId}/{locationId}

Get Location by ID

LocationsApi

Get /locations

Get Locations

NATGatewaysApi

Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}

Delete NAT Gateways

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways/{natGatewayId}

Retrieve NAT Gateways

NATGatewaysApi

Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}

Delete NAT Gateway Flow Logs

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}

Retrieve NAT Gateway Flow Logs

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs

List NAT Gateway Flow Logs

NATGatewaysApi

Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}

Partially modify NAT Gateway Flow Logs

NATGatewaysApi

Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs

Create a NAT Gateway Flow Log

NATGatewaysApi

Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/flowlogs/{flowLogId}

Modify NAT Gateway Flow Logs

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways

List NAT Gateways

NATGatewaysApi

Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}

Partially modify NAT Gateways

NATGatewaysApi

Post /datacenters/{datacenterId}/natgateways

Create a NAT Gateway

NATGatewaysApi

Put /datacenters/{datacenterId}/natgateways/{natGatewayId}

Modify NAT Gateways

NATGatewaysApi

Delete /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}

Delete NAT Gateway rules

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}

Retrieve NAT Gateway rules

NATGatewaysApi

Get /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules

List NAT Gateway rules

NATGatewaysApi

Patch /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}

Partially Modify a NAT Gateway Rule by ID

NATGatewaysApi

Post /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules

Create a NAT Gateway Rule

NATGatewaysApi

Put /datacenters/{datacenterId}/natgateways/{natGatewayId}/rules/{natGatewayRuleId}

Modify a NAT Gateway Rule by ID

NetworkInterfacesApi

Delete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Delete NICs

NetworkInterfacesApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Retrieve NICs

NetworkInterfacesApi

Get /datacenters/{datacenterId}/servers/{serverId}/nics

List NICs

NetworkInterfacesApi

Patch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Partially modify NICs

NetworkInterfacesApi

Post /datacenters/{datacenterId}/servers/{serverId}/nics

Create a NIC

NetworkInterfacesApi

Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Modify NICs

NetworkLoadBalancersApi

Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}

Delete Network Load Balancers

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}

Retrieve Network Load Balancers

NetworkLoadBalancersApi

Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}

Delete NLB Flow Logs

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}

Retrieve NLB Flow Logs

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs

List NLB Flow Logs

NetworkLoadBalancersApi

Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}

Partially modify NLB Flow Logs

NetworkLoadBalancersApi

Post /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs

Create a NLB Flow Log

NetworkLoadBalancersApi

Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/flowlogs/{flowLogId}

Modify NLB Flow Logs

NetworkLoadBalancersApi

Delete /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}

Delete NLB forwarding rules

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}

Retrieve NLB forwarding rules

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules

List NLB forwarding rules

NetworkLoadBalancersApi

Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}

Partially modify NLB forwarding rules

NetworkLoadBalancersApi

Post /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules

Create a NLB Forwarding Rule

NetworkLoadBalancersApi

Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}/forwardingrules/{forwardingRuleId}

Modify NLB forwarding rules

NetworkLoadBalancersApi

Get /datacenters/{datacenterId}/networkloadbalancers

List Network Load Balancers

NetworkLoadBalancersApi

Patch /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}

Partially modify Network Load Balancers

NetworkLoadBalancersApi

Post /datacenters/{datacenterId}/networkloadbalancers

Create a Network Load Balancer

NetworkLoadBalancersApi

Put /datacenters/{datacenterId}/networkloadbalancers/{networkLoadBalancerId}

Modify Network Load Balancers

PrivateCrossConnectsApi

Delete /pccs/{pccId}

Delete Private Cross-Connects

PrivateCrossConnectsApi

Get /pccs/{pccId}

Retrieve a Cross Connect

PrivateCrossConnectsApi

Get /pccs

List Private Cross-Connects

PrivateCrossConnectsApi

Patch /pccs/{pccId}

Partially modify a Private Cross-Connects

PrivateCrossConnectsApi

Post /pccs

Create a Cross Connect

RequestsApi

Get /requests/{requestId}

Retrieve requests

RequestsApi

Get /requests

List requests

RequestsApi

Get /requests/{requestId}/status

Retrieve request status

SecurityGroupsApi

Delete /datacenters/{datacenterId}/securitygroups/{securityGroupId}

Delete a Security Group

SecurityGroupsApi

Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}

Retrieve a Security Group

SecurityGroupsApi

Delete /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}

Remove a Firewall Rule from a Security Group

SecurityGroupsApi

Post /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules

Create Firewall rule to a Security Group

SecurityGroupsApi

Get /datacenters/{datacenterId}/securitygroups

List Security Groups

SecurityGroupsApi

Patch /datacenters/{datacenterId}/securitygroups/{securityGroupId}

Partially modify Security Group

SecurityGroupsApi

Post /datacenters/{datacenterId}/securitygroups

Create a Security Group

SecurityGroupsApi

Put /datacenters/{datacenterId}/securitygroups/{securityGroupId}

Modify Security Group

SecurityGroupsApi

Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}

Retrieve security group rule by id

SecurityGroupsApi

Get /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules

List Security Group rules

SecurityGroupsApi

Patch /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}

Partially modify Security Group Rules

SecurityGroupsApi

Put /datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId}

Modify a Security Group Rule

SecurityGroupsApi

Put /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups

Attach a list of Security Groups to a NIC

SecurityGroupsApi

Put /datacenters/{datacenterId}/servers/{serverId}/securitygroups

Attach a list of Security Groups to a Server

ServersApi

Delete /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}

Detach a CD-ROM by ID

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}

Get Attached CD-ROM by ID

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/cdroms

Get Attached CD-ROMs

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/cdroms

Attach a CD-ROM

ServersApi

Delete /datacenters/{datacenterId}/servers/{serverId}

Delete servers

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}

Retrieve servers by ID

ServersApi

Get /datacenters/{datacenterId}/servers

List servers

ServersApi

Patch /datacenters/{datacenterId}/servers/{serverId}

Partially modify servers

ServersApi

Post /datacenters/{datacenterId}/servers

Create a Server

ServersApi

Put /datacenters/{datacenterId}/servers/{serverId}

Modify a Server by ID

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/reboot

Reboot servers

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/remoteconsole

Get Remote Console link

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/resume

Resume a Cube Server by ID

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/start

Start an Enterprise Server by ID

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/stop

Stop an Enterprise Server by ID

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/suspend

Suspend a Cube Server by ID

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/token

Get JSON Web Token

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/upgrade

Upgrade a Server by ID

ServersApi

Delete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}

Detach a Volume by ID

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}

Get Attached Volume by ID

ServersApi

Get /datacenters/{datacenterId}/servers/{serverId}/volumes

Get Attached Volumes

ServersApi

Post /datacenters/{datacenterId}/servers/{serverId}/volumes

Attach a Volume to a Server

SnapshotsApi

Delete /snapshots/{snapshotId}

Delete snapshots

SnapshotsApi

Get /snapshots/{snapshotId}

Retrieve snapshots by ID

SnapshotsApi

Get /snapshots

List snapshots

SnapshotsApi

Patch /snapshots/{snapshotId}

Partially modify snapshots

SnapshotsApi

Put /snapshots/{snapshotId}

Modify a Snapshot by ID

TargetGroupsApi

Delete /targetgroups/{targetGroupId}

Delete a Target Group by ID

TargetGroupsApi

Get /targetgroups/{targetGroupId}

Get a Target Group by ID

TargetGroupsApi

Get /targetgroups

Get Target Groups

TargetGroupsApi

Patch /targetgroups/{targetGroupId}

Partially Modify a Target Group by ID

TargetGroupsApi

Post /targetgroups

Create a Target Group

TargetGroupsApi

Put /targetgroups/{targetGroupId}

Modify a Target Group by ID

TemplatesApi

Get /templates/{templateId}

Get Cubes Template by ID

TemplatesApi

Get /templates

Get Cubes Templates

UserManagementApi

Delete /um/groups/{groupId}

Delete groups

UserManagementApi

Get /um/groups/{groupId}

Retrieve groups

UserManagementApi

Get /um/groups

List all groups

UserManagementApi

Post /um/groups

Create groups

UserManagementApi

Put /um/groups/{groupId}

Modify groups

UserManagementApi

Get /um/groups/{groupId}/resources

Retrieve group resources

UserManagementApi

Delete /um/groups/{groupId}/shares/{resourceId}

Remove group shares

UserManagementApi

Get /um/groups/{groupId}/shares/{resourceId}

Retrieve group shares

UserManagementApi

Get /um/groups/{groupId}/shares

List group shares

UserManagementApi

Post /um/groups/{groupId}/shares/{resourceId}

Add group shares

UserManagementApi

Put /um/groups/{groupId}/shares/{resourceId}

Modify group share privileges

UserManagementApi

Delete /um/groups/{groupId}/users/{userId}

Remove users from groups

UserManagementApi

Get /um/groups/{groupId}/users

List group members

UserManagementApi

Post /um/groups/{groupId}/users

Add a Group Member

UserManagementApi

Get /um/resources/{resourceType}

List resources by type

UserManagementApi

Get /um/resources/{resourceType}/{resourceId}

Retrieve resources by type

UserManagementApi

Get /um/resources

List all resources

UserManagementApi

Delete /um/users/{userId}

Delete users

UserManagementApi

Get /um/users/{userId}

Retrieve users

UserManagementApi

Get /um/users

List all users

UserManagementApi

Get /um/users/{userId}/groups

Retrieve group resources by user ID

UserManagementApi

Get /um/users/{userId}/owns

Retrieve user resources by user ID

UserManagementApi

Post /um/users

Create users

UserManagementApi

Put /um/users/{userId}

Modify users

UserS3KeysApi

Delete /um/users/{userId}/s3keys/{keyId}

Delete Object storage keys

UserS3KeysApi

Get /um/users/{userId}/s3keys/{keyId}

Retrieve user Object storage keys by key ID

UserS3KeysApi

Get /um/users/{userId}/s3keys

List user Object storage keys

UserS3KeysApi

Post /um/users/{userId}/s3keys

Create user Object storage keys

UserS3KeysApi

Put /um/users/{userId}/s3keys/{keyId}

Modify a Object storage Key by Key ID

UserS3KeysApi

Get /um/users/{userId}/s3ssourl

Retrieve Object storage single sign-on URLs

VolumesApi

Post /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot

Create volume snapshots

VolumesApi

Delete /datacenters/{datacenterId}/volumes/{volumeId}

Delete volumes

VolumesApi

Get /datacenters/{datacenterId}/volumes/{volumeId}

Retrieve volumes

VolumesApi

Get /datacenters/{datacenterId}/volumes

List volumes

VolumesApi

Patch /datacenters/{datacenterId}/volumes/{volumeId}

Partially modify volumes

VolumesApi

Post /datacenters/{datacenterId}/volumes

Create a Volume

VolumesApi

Put /datacenters/{datacenterId}/volumes/{volumeId}

Modify a Volume by ID

VolumesApi

Post /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot

Restore volume snapshots

Documentation For Models

Documentation For Authorization

BasicAuthentication

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

TokenAuthentication

  • Type: API key

  • API key parameter name: Authorization

  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: Authorization and passed in as the auth context for each request.

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

Author

Last updated