Skip to content

ionos-cloud/sdk-go-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for ionoscloud

Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.

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.

Installation

Install the following dependencies:

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

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

import ionoscloud "github.com/ionos-cloud/sdk-go-dns"

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(), ionoscloud.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(), ionoscloud.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

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

Documentation for API Endpoints

All URIs are relative to https://dns.de-fra.ionos.com

Class Method HTTP request Description
DNSSECApi ZonesKeysDelete Delete /zones/{zoneId}/keys Delete a DNSSEC key
DNSSECApi ZonesKeysGet Get /zones/{zoneId}/keys Retrieve a DNSSEC key
DNSSECApi ZonesKeysPost Post /zones/{zoneId}/keys Create a DNSSEC key
QuotaApi QuotaGet Get /quota Retrieve resources quota
RecordsApi RecordsGet Get /records Retrieve all records from primary zones
RecordsApi SecondaryzonesRecordsGet Get /secondaryzones/{secondaryZoneId}/records Retrieve records for a secondary zone
RecordsApi ZonesRecordsDelete Delete /zones/{zoneId}/records/{recordId} Delete a record
RecordsApi ZonesRecordsFindById Get /zones/{zoneId}/records/{recordId} Retrieve a record
RecordsApi ZonesRecordsGet Get /zones/{zoneId}/records Retrieve records
RecordsApi ZonesRecordsPost Post /zones/{zoneId}/records Create a record
RecordsApi ZonesRecordsPut Put /zones/{zoneId}/records/{recordId} Update a record
ReverseRecordsApi ReverserecordsDelete Delete /reverserecords/{reverserecordId} Delete a reverse DNS record
ReverseRecordsApi ReverserecordsFindById Get /reverserecords/{reverserecordId} Retrieve a reverse DNS record
ReverseRecordsApi ReverserecordsGet Get /reverserecords Retrieves existing reverse DNS records
ReverseRecordsApi ReverserecordsPost Post /reverserecords Create a reverse DNS record
ReverseRecordsApi ReverserecordsPut Put /reverserecords/{reverserecordId} Update a reverse DNS record
SecondaryZonesApi SecondaryzonesAxfrGet Get /secondaryzones/{secondaryZoneId}/axfr Get status of zone transfer
SecondaryZonesApi SecondaryzonesAxfrPut Put /secondaryzones/{secondaryZoneId}/axfr Start zone transfer
SecondaryZonesApi SecondaryzonesDelete Delete /secondaryzones/{secondaryZoneId} Delete a secondary zone
SecondaryZonesApi SecondaryzonesFindById Get /secondaryzones/{secondaryZoneId} Retrieve a secondary zone
SecondaryZonesApi SecondaryzonesGet Get /secondaryzones Retrieve secondary zones
SecondaryZonesApi SecondaryzonesPost Post /secondaryzones Create a secondary zone
SecondaryZonesApi SecondaryzonesPut Put /secondaryzones/{secondaryZoneId} Update a secondary zone
ZoneFilesApi ZonesZonefileGet Get /zones/{zoneId}/zonefile Retrieve a zone file
ZoneFilesApi ZonesZonefilePut Put /zones/{zoneId}/zonefile Updates a zone with a file
ZonesApi ZonesDelete Delete /zones/{zoneId} Delete a zone
ZonesApi ZonesFindById Get /zones/{zoneId} Retrieve a zone
ZonesApi ZonesGet Get /zones Retrieve zones
ZonesApi ZonesPost Post /zones Create a zone
ZonesApi ZonesPut Put /zones/{zoneId} Update a zone

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

tokenAuth

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

Example

auth := context.WithValue(
		context.Background(),
		sw.ContextAPIKeys,
		map[string]sw.APIKey{
			"Authorization": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

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

support@cloud.ionos.com