All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
DnsApiRecordsDelete | Delete /dns/api/Records | Deletes records which match the specified criterias |
DnsApiRecordsGet | Get /dns/api/Records | Retrieves the DNS zone's resource records |
DnsApiRecordsPost | Post /dns/api/Records | Creates a new DNS resource record |
DnsApiRecordsDelete(ctx).Zone(zone).RecordType(recordType).Name(name).XApiOptions(xApiOptions).Execute()
Deletes records which match the specified criterias
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
zone := "zone_example" // string | Name of the DNS zone to delete a record of.
recordType := openapiclient.RecordType("A") // RecordType | The record type of the record to delete.
name := "name_example" // string | The record name of the record to delete.
xApiOptions := "xApiOptions_example" // string | Data used to access the API <br /><br /> Schema: <br /> { <br /> \"access_options\": { <br /> \"provider\": \"provider\", <br /> \"environment\": \"environment\", <br /> \"credentials_id\": \"00000000-0000-0000-0000-000000000000\" <br /> }, <br /> \"meta\": { <br /> \"additionalKey\": \"keyValue\" <br /> } <br /> }
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RecordsApi.DnsApiRecordsDelete(context.Background()).Zone(zone).RecordType(recordType).Name(name).XApiOptions(xApiOptions).Execute()
if err.Error() != "" {
fmt.Fprintf(os.Stderr, "Error when calling `RecordsApi.DnsApiRecordsDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiDnsApiRecordsDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
zone | string | Name of the DNS zone to delete a record of. | |
recordType | RecordType | The record type of the record to delete. | |
name | string | The record name of the record to delete. | |
xApiOptions | string | Data used to access the API <br /><br /> Schema: <br /> { <br /> "access_options": { <br /> "provider": "provider", <br /> "environment": "environment", <br /> "credentials_id": "00000000-0000-0000-0000-000000000000" <br /> }, <br /> "meta": { <br /> "additionalKey": "keyValue" <br /> } <br /> } |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Record DnsApiRecordsGet(ctx).Zone(zone).XApiOptions(xApiOptions).RecordType(recordType).Name(name).Execute()
Retrieves the DNS zone's resource records
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
zone := "zone_example" // string | DNS zone to query.
xApiOptions := "xApiOptions_example" // string | Data used to access the API <br /><br /> Schema: <br /> { <br /> \"access_options\": { <br /> \"provider\": \"provider\", <br /> \"environment\": \"environment\", <br /> \"credentials_id\": \"00000000-0000-0000-0000-000000000000\" <br /> }, <br /> \"meta\": { <br /> \"additionalKey\": \"keyValue\" <br /> } <br /> }
recordType := openapiclient.RecordType("A") // RecordType | Filter by the record type. (optional)
name := "name_example" // string | Filter by the record name. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RecordsApi.DnsApiRecordsGet(context.Background()).Zone(zone).XApiOptions(xApiOptions).RecordType(recordType).Name(name).Execute()
if err.Error() != "" {
fmt.Fprintf(os.Stderr, "Error when calling `RecordsApi.DnsApiRecordsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DnsApiRecordsGet`: []Record
fmt.Fprintf(os.Stdout, "Response from `RecordsApi.DnsApiRecordsGet`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDnsApiRecordsGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
zone | string | DNS zone to query. | |
xApiOptions | string | Data used to access the API <br /><br /> Schema: <br /> { <br /> "access_options": { <br /> "provider": "provider", <br /> "environment": "environment", <br /> "credentials_id": "00000000-0000-0000-0000-000000000000" <br /> }, <br /> "meta": { <br /> "additionalKey": "keyValue" <br /> } <br /> } | |
recordType | RecordType | Filter by the record type. | |
name | string | Filter by the record name. |
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Record DnsApiRecordsPost(ctx).XApiOptions(xApiOptions).CreateRecordRequestModel(createRecordRequestModel).Execute()
Creates a new DNS resource record
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xApiOptions := "xApiOptions_example" // string | Data used to access the API <br /><br /> Schema: <br /> { <br /> \"access_options\": { <br /> \"provider\": \"provider\", <br /> \"environment\": \"environment\", <br /> \"credentials_id\": \"00000000-0000-0000-0000-000000000000\" <br /> }, <br /> \"meta\": { <br /> \"additionalKey\": \"keyValue\" <br /> } <br /> }
createRecordRequestModel := *openapiclient.NewCreateRecordRequestModel("Zone_example", "Name_example", openapiclient.RecordType("A"), "Data_example") // CreateRecordRequestModel | Data used to create a DNS resource record
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.RecordsApi.DnsApiRecordsPost(context.Background()).XApiOptions(xApiOptions).CreateRecordRequestModel(createRecordRequestModel).Execute()
if err.Error() != "" {
fmt.Fprintf(os.Stderr, "Error when calling `RecordsApi.DnsApiRecordsPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DnsApiRecordsPost`: Record
fmt.Fprintf(os.Stdout, "Response from `RecordsApi.DnsApiRecordsPost`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDnsApiRecordsPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
xApiOptions | string | Data used to access the API <br /><br /> Schema: <br /> { <br /> "access_options": { <br /> "provider": "provider", <br /> "environment": "environment", <br /> "credentials_id": "00000000-0000-0000-0000-000000000000" <br /> }, <br /> "meta": { <br /> "additionalKey": "keyValue" <br /> } <br /> } | |
createRecordRequestModel | CreateRecordRequestModel | Data used to create a DNS resource record |
- Content-Type: application/json, text/json, application/_*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]