Skip to content

Latest commit

 

History

History
276 lines (179 loc) · 10.5 KB

ZonesApi.md

File metadata and controls

276 lines (179 loc) · 10.5 KB

\ZonesApi

All URIs are relative to http://localhost

Method HTTP request Description
DnsApiZonesDelete Delete /dns/api/Zones Deletes a DNS zone from the passed provider
DnsApiZonesGet Get /dns/api/Zones Retrieves the DNS zones assigned to the account
DnsApiZonesPost Post /dns/api/Zones Creates a new DNS zone
DnsApiZonesZoneGet Get /dns/api/Zones/{zone} Loads the specified DNS zone

DnsApiZonesDelete

DnsApiZonesDelete(ctx).Name(name).XApiOptions(xApiOptions).Execute()

Deletes a DNS zone from the passed provider

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    name := "name_example" // string | Name of the DNS zone 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.ZonesApi.DnsApiZonesDelete(context.Background()).Name(name).XApiOptions(xApiOptions).Execute()
    if err.Error() != "" {
        fmt.Fprintf(os.Stderr, "Error when calling `ZonesApi.DnsApiZonesDelete``: %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 apiDnsApiZonesDeleteRequest struct via the builder pattern

Name Type Description Notes
name string Name of the DNS zone 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]

DnsApiZonesGet

[]Zone DnsApiZonesGet(ctx).XApiOptions(xApiOptions).Execute()

Retrieves the DNS zones assigned to the account

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

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ZonesApi.DnsApiZonesGet(context.Background()).XApiOptions(xApiOptions).Execute()
    if err.Error() != "" {
        fmt.Fprintf(os.Stderr, "Error when calling `ZonesApi.DnsApiZonesGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DnsApiZonesGet`: []Zone
    fmt.Fprintf(os.Stdout, "Response from `ZonesApi.DnsApiZonesGet`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDnsApiZonesGetRequest 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 /> }

Return type

[]Zone

Authorization

oidc

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

DnsApiZonesPost

Zone DnsApiZonesPost(ctx).XApiOptions(xApiOptions).CreateZoneRequestModel(createZoneRequestModel).Execute()

Creates a new DNS zone

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 />  }
    createZoneRequestModel := *openapiclient.NewCreateZoneRequestModel("Name_example") // CreateZoneRequestModel | Data used to create a DNS zone

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ZonesApi.DnsApiZonesPost(context.Background()).XApiOptions(xApiOptions).CreateZoneRequestModel(createZoneRequestModel).Execute()
    if err.Error() != "" {
        fmt.Fprintf(os.Stderr, "Error when calling `ZonesApi.DnsApiZonesPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DnsApiZonesPost`: Zone
    fmt.Fprintf(os.Stdout, "Response from `ZonesApi.DnsApiZonesPost`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDnsApiZonesPostRequest 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 /> }
createZoneRequestModel CreateZoneRequestModel Data used to create a DNS zone

Return type

Zone

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]

DnsApiZonesZoneGet

Zone DnsApiZonesZoneGet(ctx, zone).XApiOptions(xApiOptions).Execute()

Loads the specified DNS zone

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    zone := "zone_example" // string | The name of the 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 />  }

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ZonesApi.DnsApiZonesZoneGet(context.Background(), zone).XApiOptions(xApiOptions).Execute()
    if err.Error() != "" {
        fmt.Fprintf(os.Stderr, "Error when calling `ZonesApi.DnsApiZonesZoneGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DnsApiZonesZoneGet`: Zone
    fmt.Fprintf(os.Stdout, "Response from `ZonesApi.DnsApiZonesZoneGet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
zone string The name of the zone to query.

Other Parameters

Other parameters are passed through a pointer to a apiDnsApiZonesZoneGetRequest 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 /> } |

Return type

Zone

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]