Skip to content

Latest commit

 

History

History
215 lines (142 loc) · 8.9 KB

RecordsApi.md

File metadata and controls

215 lines (142 loc) · 8.9 KB

\RecordsApi

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

DnsApiRecordsDelete(ctx).Zone(zone).RecordType(recordType).Name(name).XApiOptions(xApiOptions).Execute()

Deletes records which match the specified criterias

Example

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

Path Parameters

Other Parameters

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 /> &quot;access_options&quot;: { <br /> &quot;provider&quot;: &quot;provider&quot;, <br /> &quot;environment&quot;: &quot;environment&quot;, <br /> &quot;credentials_id&quot;: &quot;00000000-0000-0000-0000-000000000000&quot; <br /> }, <br /> &quot;meta&quot;: { <br /> &quot;additionalKey&quot;: &quot;keyValue&quot; <br /> } <br /> }

Return type

(empty response body)

Authorization

oidc

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DnsApiRecordsGet

[]Record DnsApiRecordsGet(ctx).Zone(zone).XApiOptions(xApiOptions).RecordType(recordType).Name(name).Execute()

Retrieves the DNS zone's resource records

Example

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

Path Parameters

Other Parameters

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 /> &quot;access_options&quot;: { <br /> &quot;provider&quot;: &quot;provider&quot;, <br /> &quot;environment&quot;: &quot;environment&quot;, <br /> &quot;credentials_id&quot;: &quot;00000000-0000-0000-0000-000000000000&quot; <br /> }, <br /> &quot;meta&quot;: { <br /> &quot;additionalKey&quot;: &quot;keyValue&quot; <br /> } <br /> }
recordType RecordType Filter by the record type.
name string Filter by the record name.

Return type

[]Record

Authorization

oidc

HTTP request headers

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

DnsApiRecordsPost

Record DnsApiRecordsPost(ctx).XApiOptions(xApiOptions).CreateRecordRequestModel(createRecordRequestModel).Execute()

Creates a new DNS resource record

Example

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

Path Parameters

Other Parameters

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 /> &quot;access_options&quot;: { <br /> &quot;provider&quot;: &quot;provider&quot;, <br /> &quot;environment&quot;: &quot;environment&quot;, <br /> &quot;credentials_id&quot;: &quot;00000000-0000-0000-0000-000000000000&quot; <br /> }, <br /> &quot;meta&quot;: { <br /> &quot;additionalKey&quot;: &quot;keyValue&quot; <br /> } <br /> }
createRecordRequestModel CreateRecordRequestModel Data used to create a DNS resource record

Return type

Record

Authorization

oidc

HTTP request headers

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