Categorygithub.com/ionos-cloud/sdk-go/v5
modulepackage
5.1.12
Repository: https://github.com/ionos-cloud/sdk-go.git
Documentation: pkg.go.dev

# 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

NOTE: Please consider using SDK Go v6 releases that are using IONOS Cloud API Version 6, the latest stable API version. New features and improvements will be integrated in IONOS Cloud API Version 6.

An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy-to-use API.

The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.

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: 5.0
  • Package version: 1.0.0
  • 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 "./ionoscloud"

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)

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

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 identified 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",
	},
})

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/v5 path, so it should not be included in the IONOS_API_URL environment variable

Documentation for API Endpoints

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

API Endpoints table
ClassMethodHTTP requestDescription
DefaultApiApiInfoGetGet /Display API information
BackupUnitApiBackupunitsDeleteDelete /backupunits/{backupunitId}Delete a Backup Unit
BackupUnitApiBackupunitsFindByIdGet /backupunits/{backupunitId}Returns the specified backup Unit
BackupUnitApiBackupunitsGetGet /backupunitsList Backup Units
BackupUnitApiBackupunitsPatchPatch /backupunits/{backupunitId}Partially modify a Backup Unit
BackupUnitApiBackupunitsPostPost /backupunitsCreate a Backup Unit
BackupUnitApiBackupunitsPutPut /backupunits/{backupunitId}Modify a Backup Unit
BackupUnitApiBackupunitsSsourlGetGet /backupunits/{backupunitId}/ssourlReturns a single signon URL for the specified backup Unit.
ContractApiContractsGetGet /contractsRetrieve a Contract
DataCenterApiDatacentersDeleteDelete /datacenters/{datacenterId}Delete a Data Center
DataCenterApiDatacentersFindByIdGet /datacenters/{datacenterId}Retrieve a Data Center
DataCenterApiDatacentersGetGet /datacentersList Data Centers under your account
DataCenterApiDatacentersPatchPatch /datacenters/{datacenterId}Partially modify a Data Center
DataCenterApiDatacentersPostPost /datacentersCreate a Data Center
DataCenterApiDatacentersPutPut /datacenters/{datacenterId}Modify a Data Center
IPBlocksApiIpblocksDeleteDelete /ipblocks/{ipblockId}Delete IP Block
IPBlocksApiIpblocksFindByIdGet /ipblocks/{ipblockId}Retrieve an IP Block
IPBlocksApiIpblocksGetGet /ipblocksList IP Blocks
IPBlocksApiIpblocksPatchPatch /ipblocks/{ipblockId}Partially modify IP Block
IPBlocksApiIpblocksPostPost /ipblocksReserve IP Block
IPBlocksApiIpblocksPutPut /ipblocks/{ipblockId}Modify IP Block
ImageApiImagesDeleteDelete /images/{imageId}Delete an Image
ImageApiImagesFindByIdGet /images/{imageId}Retrieve an Image
ImageApiImagesGetGet /imagesList Images
ImageApiImagesPatchPatch /images/{imageId}Partially modify an Image
ImageApiImagesPutPut /images/{imageId}Modify an Image
KubernetesApiK8sDeleteDelete /k8s/{k8sClusterId}Delete Kubernetes Cluster
KubernetesApiK8sFindByClusterIdGet /k8s/{k8sClusterId}Retrieve Kubernetes Cluster
KubernetesApiK8sGetGet /k8sList Kubernetes Clusters
KubernetesApiK8sKubeconfigGetGet /k8s/{k8sClusterId}/kubeconfigRetrieve Kubernetes Configuration File
KubernetesApiK8sNodepoolsDeleteDelete /k8s/{k8sClusterId}/nodepools/{nodepoolId}Delete Kubernetes Node Pool
KubernetesApiK8sNodepoolsFindByIdGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}Retrieve Kubernetes Node Pool
KubernetesApiK8sNodepoolsGetGet /k8s/{k8sClusterId}/nodepoolsList Kubernetes Node Pools
KubernetesApiK8sNodepoolsNodesDeleteDelete /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}Delete Kubernetes node
KubernetesApiK8sNodepoolsNodesFindByIdGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}Retrieve Kubernetes node
KubernetesApiK8sNodepoolsNodesGetGet /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodesRetrieve Kubernetes nodes.
KubernetesApiK8sNodepoolsNodesReplacePostPost /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replaceRecreate the Kubernetes node
KubernetesApiK8sNodepoolsPostPost /k8s/{k8sClusterId}/nodepoolsCreate a Kubernetes Node Pool
KubernetesApiK8sNodepoolsPutPut /k8s/{k8sClusterId}/nodepools/{nodepoolId}Modify Kubernetes Node Pool
KubernetesApiK8sPostPost /k8sCreate Kubernetes Cluster
KubernetesApiK8sPutPut /k8s/{k8sClusterId}Modify Kubernetes Cluster
KubernetesApiK8sVersionsCompatibilitiesGetGet /k8s/versions/{clusterVersion}/compatibilitiesRetrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster.
KubernetesApiK8sVersionsDefaultGetGet /k8s/versions/defaultRetrieve the current default kubernetes version for clusters and nodepools.
KubernetesApiK8sVersionsGetGet /k8s/versionsRetrieve available Kubernetes versions
LabelApiDatacentersLabelsDeleteDelete /datacenters/{datacenterId}/labels/{key}Delete a Label from Data Center
LabelApiDatacentersLabelsFindByKeyGet /datacenters/{datacenterId}/labels/{key}Retrieve a Label of Data Center
LabelApiDatacentersLabelsGetGet /datacenters/{datacenterId}/labelsList all Data Center Labels
LabelApiDatacentersLabelsPostPost /datacenters/{datacenterId}/labelsAdd a Label to Data Center
LabelApiDatacentersLabelsPutPut /datacenters/{datacenterId}/labels/{key}Modify a Label of Data Center
LabelApiDatacentersServersLabelsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Delete a Label from Server
LabelApiDatacentersServersLabelsFindByKeyGet /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Retrieve a Label of Server
LabelApiDatacentersServersLabelsGetGet /datacenters/{datacenterId}/servers/{serverId}/labelsList all Server Labels
LabelApiDatacentersServersLabelsPostPost /datacenters/{datacenterId}/servers/{serverId}/labelsAdd a Label to Server
LabelApiDatacentersServersLabelsPutPut /datacenters/{datacenterId}/servers/{serverId}/labels/{key}Modify a Label of Server
LabelApiDatacentersVolumesLabelsDeleteDelete /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Delete a Label from Volume
LabelApiDatacentersVolumesLabelsFindByKeyGet /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Retrieve a Label of Volume
LabelApiDatacentersVolumesLabelsGetGet /datacenters/{datacenterId}/volumes/{volumeId}/labelsList all Volume Labels
LabelApiDatacentersVolumesLabelsPostPost /datacenters/{datacenterId}/volumes/{volumeId}/labelsAdd a Label to Volume
LabelApiDatacentersVolumesLabelsPutPut /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}Modify a Label of Volume
LabelApiIpblocksLabelsDeleteDelete /ipblocks/{ipblockId}/labels/{key}Delete a Label from IP Block
LabelApiIpblocksLabelsFindByKeyGet /ipblocks/{ipblockId}/labels/{key}Retrieve a Label of IP Block
LabelApiIpblocksLabelsGetGet /ipblocks/{ipblockId}/labelsList all Ip Block Labels
LabelApiIpblocksLabelsPostPost /ipblocks/{ipblockId}/labelsAdd a Label to IP Block
LabelApiIpblocksLabelsPutPut /ipblocks/{ipblockId}/labels/{key}Modify a Label of IP Block
LabelApiLabelsFindByUrnGet /labels/{labelurn}Returns the label by its URN.
LabelApiLabelsGetGet /labelsList Labels
LabelApiSnapshotsLabelsDeleteDelete /snapshots/{snapshotId}/labels/{key}Delete a Label from Snapshot
LabelApiSnapshotsLabelsFindByKeyGet /snapshots/{snapshotId}/labels/{key}Retrieve a Label of Snapshot
LabelApiSnapshotsLabelsGetGet /snapshots/{snapshotId}/labelsList all Snapshot Labels
LabelApiSnapshotsLabelsPostPost /snapshots/{snapshotId}/labelsAdd a Label to Snapshot
LabelApiSnapshotsLabelsPutPut /snapshots/{snapshotId}/labels/{key}Modify a Label of Snapshot
LanApiDatacentersLansDeleteDelete /datacenters/{datacenterId}/lans/{lanId}Delete a Lan.
LanApiDatacentersLansFindByIdGet /datacenters/{datacenterId}/lans/{lanId}Retrieve a Lan
LanApiDatacentersLansGetGet /datacenters/{datacenterId}/lansList Lans
LanApiDatacentersLansNicsFindByIdGet /datacenters/{datacenterId}/lans/{lanId}/nics/{nicId}Retrieve a nic attached to lan
LanApiDatacentersLansNicsGetGet /datacenters/{datacenterId}/lans/{lanId}/nicsList Lan Members
LanApiDatacentersLansNicsPostPost /datacenters/{datacenterId}/lans/{lanId}/nicsAttach a nic
LanApiDatacentersLansPatchPatch /datacenters/{datacenterId}/lans/{lanId}Partially modify a Lan
LanApiDatacentersLansPostPost /datacenters/{datacenterId}/lansCreate a Lan
LanApiDatacentersLansPutPut /datacenters/{datacenterId}/lans/{lanId}Modify a Lan
LoadBalancerApiDatacentersLoadbalancersBalancednicsDeleteDelete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}Detach a nic from loadbalancer
LoadBalancerApiDatacentersLoadbalancersBalancednicsFindByNicIdGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednics/{nicId}Retrieve a nic attached to Load Balancer
LoadBalancerApiDatacentersLoadbalancersBalancednicsGetGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednicsList Load Balancer Members
LoadBalancerApiDatacentersLoadbalancersBalancednicsPostPost /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}/balancednicsAttach a nic to Load Balancer
LoadBalancerApiDatacentersLoadbalancersDeleteDelete /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Delete a Loadbalancer.
LoadBalancerApiDatacentersLoadbalancersFindByIdGet /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Retrieve a loadbalancer
LoadBalancerApiDatacentersLoadbalancersGetGet /datacenters/{datacenterId}/loadbalancersList Load Balancers
LoadBalancerApiDatacentersLoadbalancersPatchPatch /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Partially modify a Loadbalancer
LoadBalancerApiDatacentersLoadbalancersPostPost /datacenters/{datacenterId}/loadbalancersCreate a Load Balancer
LoadBalancerApiDatacentersLoadbalancersPutPut /datacenters/{datacenterId}/loadbalancers/{loadbalancerId}Modify a Load Balancer
LocationApiLocationsFindByRegionIdGet /locations/{regionId}List Locations within a region
LocationApiLocationsFindByRegionIdAndIdGet /locations/{regionId}/{locationId}Retrieve a Location
LocationApiLocationsGetGet /locationsList Locations
NicApiDatacentersServersNicsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Delete a Nic
NicApiDatacentersServersNicsFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Retrieve a Nic
NicApiDatacentersServersNicsFirewallrulesDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Delete a Firewall Rule
NicApiDatacentersServersNicsFirewallrulesFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Retrieve a Firewall Rule
NicApiDatacentersServersNicsFirewallrulesGetGet /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrulesList Firewall Rules
NicApiDatacentersServersNicsFirewallrulesPatchPatch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Partially modify a Firewall Rule
NicApiDatacentersServersNicsFirewallrulesPostPost /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrulesCreate a Firewall Rule
NicApiDatacentersServersNicsFirewallrulesPutPut /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}Modify a Firewall Rule
NicApiDatacentersServersNicsGetGet /datacenters/{datacenterId}/servers/{serverId}/nicsList Nics
NicApiDatacentersServersNicsPatchPatch /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Partially modify a Nic
NicApiDatacentersServersNicsPostPost /datacenters/{datacenterId}/servers/{serverId}/nicsCreate a Nic
NicApiDatacentersServersNicsPutPut /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}Modify a Nic
PrivateCrossConnectApiPccsDeleteDelete /pccs/{pccId}Delete a Private Cross-Connect
PrivateCrossConnectApiPccsFindByIdGet /pccs/{pccId}Retrieve a Private Cross-Connect
PrivateCrossConnectApiPccsGetGet /pccsList Private Cross-Connects
PrivateCrossConnectApiPccsPatchPatch /pccs/{pccId}Partially modify a private cross-connect
PrivateCrossConnectApiPccsPostPost /pccsCreate a Private Cross-Connect
RequestApiRequestsFindByIdGet /requests/{requestId}Retrieve a Request
RequestApiRequestsGetGet /requestsList Requests
RequestApiRequestsStatusGetGet /requests/{requestId}/statusRetrieve Request Status
ServerApiDatacentersServersCdromsDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}Detach a CD-ROM
ServerApiDatacentersServersCdromsFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/cdroms/{cdromId}Retrieve an attached CD-ROM
ServerApiDatacentersServersCdromsGetGet /datacenters/{datacenterId}/servers/{serverId}/cdromsList attached CD-ROMs
ServerApiDatacentersServersCdromsPostPost /datacenters/{datacenterId}/servers/{serverId}/cdromsAttach a CD-ROM
ServerApiDatacentersServersDeleteDelete /datacenters/{datacenterId}/servers/{serverId}Delete a Server
ServerApiDatacentersServersFindByIdGet /datacenters/{datacenterId}/servers/{serverId}Retrieve a Server
ServerApiDatacentersServersGetGet /datacenters/{datacenterId}/serversList Servers
ServerApiDatacentersServersPatchPatch /datacenters/{datacenterId}/servers/{serverId}Partially modify a Server
ServerApiDatacentersServersPostPost /datacenters/{datacenterId}/serversCreate a Server
ServerApiDatacentersServersPutPut /datacenters/{datacenterId}/servers/{serverId}Modify a Server
ServerApiDatacentersServersRebootPostPost /datacenters/{datacenterId}/servers/{serverId}/rebootReboot a Server
ServerApiDatacentersServersStartPostPost /datacenters/{datacenterId}/servers/{serverId}/startStart a Server
ServerApiDatacentersServersStopPostPost /datacenters/{datacenterId}/servers/{serverId}/stopStop a Server
ServerApiDatacentersServersUpgradePostPost /datacenters/{datacenterId}/servers/{serverId}/upgradeUpgrade a Server
ServerApiDatacentersServersVolumesDeleteDelete /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}Detach a volume
ServerApiDatacentersServersVolumesFindByIdGet /datacenters/{datacenterId}/servers/{serverId}/volumes/{volumeId}Retrieve an attached volume
ServerApiDatacentersServersVolumesGetGet /datacenters/{datacenterId}/servers/{serverId}/volumesList Attached Volumes
ServerApiDatacentersServersVolumesPostPost /datacenters/{datacenterId}/servers/{serverId}/volumesAttach a volume
SnapshotApiSnapshotsDeleteDelete /snapshots/{snapshotId}Delete a Snapshot
SnapshotApiSnapshotsFindByIdGet /snapshots/{snapshotId}Retrieve a Snapshot by its uuid.
SnapshotApiSnapshotsGetGet /snapshotsList Snapshots
SnapshotApiSnapshotsPatchPatch /snapshots/{snapshotId}Partially modify a Snapshot
SnapshotApiSnapshotsPutPut /snapshots/{snapshotId}Modify a Snapshot
UserManagementApiUmGroupsDeleteDelete /um/groups/{groupId}Delete a Group
UserManagementApiUmGroupsFindByIdGet /um/groups/{groupId}Retrieve a Group
UserManagementApiUmGroupsGetGet /um/groupsList All Groups.
UserManagementApiUmGroupsPostPost /um/groupsCreate a Group
UserManagementApiUmGroupsPutPut /um/groups/{groupId}Modify a group
UserManagementApiUmGroupsResourcesGetGet /um/groups/{groupId}/resourcesRetrieve resources assigned to a group
UserManagementApiUmGroupsSharesDeleteDelete /um/groups/{groupId}/shares/{resourceId}Remove a resource from a group
UserManagementApiUmGroupsSharesFindByResourceIdGet /um/groups/{groupId}/shares/{resourceId}Retrieve a group share
UserManagementApiUmGroupsSharesGetGet /um/groups/{groupId}/sharesList Group Shares
UserManagementApiUmGroupsSharesPostPost /um/groups/{groupId}/shares/{resourceId}Add a resource to a group
UserManagementApiUmGroupsSharesPutPut /um/groups/{groupId}/shares/{resourceId}Modify resource permissions of a group
UserManagementApiUmGroupsUsersDeleteDelete /um/groups/{groupId}/users/{userId}Remove a user from a group
UserManagementApiUmGroupsUsersGetGet /um/groups/{groupId}/usersList Group Members
UserManagementApiUmGroupsUsersPostPost /um/groups/{groupId}/usersAdd a user to a group
UserManagementApiUmResourcesFindByTypeGet /um/resources/{resourceType}Retrieve a list of Resources by type.
UserManagementApiUmResourcesFindByTypeAndIdGet /um/resources/{resourceType}/{resourceId}Retrieve a Resource by type.
UserManagementApiUmResourcesGetGet /um/resourcesList All Resources.
UserManagementApiUmUsersDeleteDelete /um/users/{userId}Delete a User
UserManagementApiUmUsersFindByIdGet /um/users/{userId}Retrieve a User
UserManagementApiUmUsersGetGet /um/usersList all Users
UserManagementApiUmUsersGroupsGetGet /um/users/{userId}/groupsRetrieve a User's group resources
UserManagementApiUmUsersOwnsGetGet /um/users/{userId}/ownsRetrieve a User's own resources
UserManagementApiUmUsersPostPost /um/usersCreate a user
UserManagementApiUmUsersPutPut /um/users/{userId}Modify a user
UserManagementApiUmUsersS3keysDeleteDelete /um/users/{userId}/s3keys/{keyId}Delete a S3 key
UserManagementApiUmUsersS3keysFindByKeyIdGet /um/users/{userId}/s3keys/{keyId}Retrieve given S3 key belonging to the given User
UserManagementApiUmUsersS3keysGetGet /um/users/{userId}/s3keysRetrieve a User's S3 keys
UserManagementApiUmUsersS3keysPostPost /um/users/{userId}/s3keysCreate a S3 key for the given user
UserManagementApiUmUsersS3keysPutPut /um/users/{userId}/s3keys/{keyId}Modify a S3 key having the given key id
UserManagementApiUmUsersS3ssourlGetGet /um/users/{userId}/s3ssourlRetrieve S3 object storage single signon URL for the given user
VolumeApiDatacentersVolumesCreateSnapshotPostPost /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshotCreate Volume Snapshot
VolumeApiDatacentersVolumesDeleteDelete /datacenters/{datacenterId}/volumes/{volumeId}Delete a Volume
VolumeApiDatacentersVolumesFindByIdGet /datacenters/{datacenterId}/volumes/{volumeId}Retrieve a Volume
VolumeApiDatacentersVolumesGetGet /datacenters/{datacenterId}/volumesList Volumes
VolumeApiDatacentersVolumesPatchPatch /datacenters/{datacenterId}/volumes/{volumeId}Partially modify a Volume
VolumeApiDatacentersVolumesPostPost /datacenters/{datacenterId}/volumesCreate a Volume
VolumeApiDatacentersVolumesPutPut /datacenters/{datacenterId}/volumes/{volumeId}Modify a Volume
VolumeApiDatacentersVolumesRestoreSnapshotPostPost /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshotRestore Volume Snapshot

Documentation For Models

API models list

Documentation For Authorization

Basic Authentication

  • 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)

Token Authentication

  • 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

Debugging

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

package main

import "github.com/ionos-cloud/sdk-go/v5"

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.

Author

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResonse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewConfiguration returns a new Configuration object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PtrBool is a helper routine that returns a pointer to given boolean value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Constants

List of Type.
List of Type.
List of Type.
List of Type.
No description provided by the author
No description provided by the author
No description provided by the author
Constants for APIs.
List of Type.
No description provided by the author
List of Type.
List of Type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
List of Type.
List of Type.
List of Type.
List of Type.
List of Type.
No description provided by the author
List of Type.

# Variables

ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKeys takes a string apikey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextServerIndex uses a server configuration from the index.
ContextServerVariables overrides a server configuration variables.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIClient manages communication with the CLOUD API API v5.0 In most cases there should be only one, shared, APIClient.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIResponse stores the API response returned by the server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AttachedVolumes struct for AttachedVolumes.
BackupUnit struct for BackupUnit.
BackupUnitProperties struct for BackupUnitProperties.
BackupUnits struct for BackupUnits.
BackupUnitSSO struct for BackupUnitSSO.
BalancedNics struct for BalancedNics.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Cdroms struct for Cdroms.
Configuration stores the configuration of the API client.
ConnectableDatacenter struct for ConnectableDatacenter.
Contract struct for Contract.
ContractProperties struct for ContractProperties.
Datacenter struct for Datacenter.
DatacenterElementMetadata struct for DatacenterElementMetadata.
DataCenterEntities struct for DataCenterEntities.
DatacenterProperties struct for DatacenterProperties.
Datacenters struct for Datacenters.
Error struct for Error.
ErrorMessage struct for ErrorMessage.
FirewallRule struct for FirewallRule.
FirewallruleProperties struct for FirewallruleProperties.
FirewallRules struct for FirewallRules.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
Group struct for Group.
GroupEntities struct for GroupEntities.
GroupMembers struct for GroupMembers.
GroupProperties struct for GroupProperties.
Groups struct for Groups.
GroupShare struct for GroupShare.
GroupShareProperties struct for GroupShareProperties.
GroupShares struct for GroupShares.
GroupUsers collection of groups a user is member of.
Image struct for Image.
ImageProperties struct for ImageProperties.
Images struct for Images.
Info struct for Info.
No description provided by the author
IpBlock struct for IpBlock.
IpBlockProperties struct for IpBlockProperties.
IpBlocks struct for IpBlocks.
IpConsumer struct for IpConsumer.
IPFailover struct for IPFailover.
KubernetesAutoScaling struct for KubernetesAutoScaling.
KubernetesCluster struct for KubernetesCluster.
KubernetesClusterEntities struct for KubernetesClusterEntities.
KubernetesClusterForPost struct for KubernetesClusterForPost.
KubernetesClusterForPut struct for KubernetesClusterForPut.
KubernetesClusterProperties struct for KubernetesClusterProperties.
KubernetesClusterPropertiesForPost struct for KubernetesClusterPropertiesForPost.
KubernetesClusterPropertiesForPut struct for KubernetesClusterPropertiesForPut.
KubernetesClusters struct for KubernetesClusters.
KubernetesConfig struct for KubernetesConfig.
KubernetesConfigProperties struct for KubernetesConfigProperties.
KubernetesMaintenanceWindow struct for KubernetesMaintenanceWindow.
KubernetesNode struct for KubernetesNode.
KubernetesNodeMetadata struct for KubernetesNodeMetadata.
KubernetesNodePool struct for KubernetesNodePool.
KubernetesNodePoolForPost struct for KubernetesNodePoolForPost.
KubernetesNodePoolForPut struct for KubernetesNodePoolForPut.
KubernetesNodePoolLan struct for KubernetesNodePoolLan.
KubernetesNodePoolProperties struct for KubernetesNodePoolProperties.
KubernetesNodePoolPropertiesForPost struct for KubernetesNodePoolPropertiesForPost.
KubernetesNodePoolPropertiesForPut struct for KubernetesNodePoolPropertiesForPut.
KubernetesNodePools struct for KubernetesNodePools.
KubernetesNodeProperties struct for KubernetesNodeProperties.
KubernetesNodes struct for KubernetesNodes.
Label struct for Label.
LabelProperties struct for LabelProperties.
LabelResource struct for LabelResource.
LabelResourceProperties struct for LabelResourceProperties.
LabelResources struct for LabelResources.
Labels struct for Labels.
Lan struct for Lan.
LanEntities struct for LanEntities.
LanNics struct for LanNics.
LanPost struct for LanPost.
LanProperties struct for LanProperties.
LanPropertiesPost struct for LanPropertiesPost.
Lans struct for Lans.
Loadbalancer struct for Loadbalancer.
LoadbalancerEntities struct for LoadbalancerEntities.
LoadbalancerProperties struct for LoadbalancerProperties.
Loadbalancers struct for Loadbalancers.
Location struct for Location.
LocationProperties struct for LocationProperties.
Locations struct for Locations.
Nic struct for Nic.
NicEntities struct for NicEntities.
NicProperties struct for NicProperties.
Nics struct for Nics.
NoStateMetaData struct for NoStateMetaData.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PaginationLinks struct for PaginationLinks.
Peer struct for Peer.
PrivateCrossConnect struct for PrivateCrossConnect.
PrivateCrossConnectProperties struct for PrivateCrossConnectProperties.
PrivateCrossConnects struct for PrivateCrossConnects.
Request struct for Request.
RequestMetadata struct for RequestMetadata.
RequestProperties struct for RequestProperties.
Requests struct for Requests.
RequestStatus struct for RequestStatus.
RequestStatusMetadata struct for RequestStatusMetadata.
RequestTarget struct for RequestTarget.
Resource datacenter resource representation.
ResourceEntities struct for ResourceEntities.
ResourceGroups Resources assigned to this group.
ResourceLimits struct for ResourceLimits.
ResourceProperties struct for ResourceProperties.
ResourceReference struct for ResourceReference.
Resources Collection to represent the resource.
ResourcesUsers Resources owned by a user.
S3Bucket struct for S3Bucket.
S3Key struct for S3Key.
S3KeyMetadata struct for S3KeyMetadata.
S3KeyProperties struct for S3KeyProperties.
S3Keys struct for S3Keys.
S3ObjectStorageSSO struct for S3ObjectStorageSSO.
Server struct for Server.
ServerConfiguration stores the information about a server.
ServerEntities struct for ServerEntities.
ServerProperties struct for ServerProperties.
Servers struct for Servers.
ServerVariable stores the information about a server variable.
Snapshot struct for Snapshot.
SnapshotProperties struct for SnapshotProperties.
Snapshots struct for Snapshots.
User struct for User.
UserMetadata struct for UserMetadata.
UserPost struct for UserPost.
UserProperties struct for UserProperties.
UserPropertiesPost struct for UserPropertiesPost.
UserPropertiesPut struct for UserPropertiesPut.
UserPut struct for UserPut.
Users struct for Users.
UsersEntities struct for UsersEntities.
Volume struct for Volume.
VolumeProperties struct for VolumeProperties.
Volumes struct for Volumes.

# Type aliases

BackupUnitApiService BackupUnitApi service.
ContractApiService ContractApi service.
DataCenterApiService DataCenterApi service.
DefaultApiService DefaultApi service.
ImageApiService ImageApi service.
IPBlocksApiService IPBlocksApi service.
KubernetesApiService KubernetesApi service.
LabelApiService LabelApi service.
LanApiService LanApi service.
LoadBalancerApiService LoadBalancerApi service.
LocationApiService LocationApi service.
NicApiService NicApi service.
PrivateCrossConnectApiService PrivateCrossConnectApi service.
RequestApiService RequestApi service.
ServerApiService ServerApi service.
ServerConfigurations stores multiple ServerConfiguration items.
SnapshotApiService SnapshotApi service.
Type the model 'Type'.
UserManagementApiService UserManagementApi service.
VolumeApiService VolumeApi service.