Skip to content

Latest commit

 

History

History
1049 lines (685 loc) · 29.6 KB

DomainAPI.md

File metadata and controls

1049 lines (685 loc) · 29.6 KB

\DomainAPI

All URIs are relative to https://napi.arvancloud.ir/cdn/4.0

Method HTTP request Description
DomainsClone Post /domains/{domain}/clone Clone a domain config from another one
DomainsCnameSetupCheck Get /domains/{domain}/cname-setup/check Check Cname Setup to find whether domain is activated
DomainsCnameSetupConvert Post /domains/{domain}/cname-setup/convert Convert domain setup to cname
DomainsCnameSetupReset Delete /domains/{domain}/cname-setup/custom Reset the custom record of CNAME Setup to the default value
DomainsCnameSetupSet Put /domains/{domain}/cname-setup/custom Set a custom record for using CNAME Setup
DomainsDestroy Delete /domains/{domain} Remove the domain
DomainsIndex Get /domains Get the list of domains
DomainsNameserversCheck Get /domains/{domain}/ns-keys/check Check NS to find whether domain is activated
DomainsNameserversDeprecatedCheck Put /domains/{domain}/dns-service/check-ns Deprecated in favor /ns-keys/check
DomainsNameserversOptional Post /domains/{domain}/ns-keys/use-optional-keys Use optional NS keys
DomainsNameserversReset Delete /domains/{domain}/ns-keys Reset custom Nameserver keys to the default values for the domain
DomainsNameserversSet Put /domains/{domain}/ns-keys Set custom NS records for the domain
DomainsRegenerate Post /domains/{domain}/regenerate Regenerate domain settings for edge servers
DomainsShow Get /domains/{domain} Get information of the domain
DomainsStore Post /domains/dns-service Create new domain

DomainsClone

MessageResponse DomainsClone(ctx, domain).CloneDomain(cloneDomain).Execute()

Clone a domain config from another one

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name
    cloneDomain := *openapiclient.NewCloneDomain("From_example") // CloneDomain |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsClone(context.Background(), domain).CloneDomain(cloneDomain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsClone``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsClone`: MessageResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsClone`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsCloneRequest struct via the builder pattern

Name Type Description Notes

cloneDomain | CloneDomain | |

Return type

MessageResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsCnameSetupCheck

DomainResponse DomainsCnameSetupCheck(ctx, domain).Execute()

Check Cname Setup to find whether domain is activated

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsCnameSetupCheck(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsCnameSetupCheck``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsCnameSetupCheck`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsCnameSetupCheck`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsCnameSetupCheckRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsCnameSetupConvert

DomainResponse DomainsCnameSetupConvert(ctx, domain).Execute()

Convert domain setup to cname

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsCnameSetupConvert(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsCnameSetupConvert``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsCnameSetupConvert`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsCnameSetupConvert`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsCnameSetupConvertRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsCnameSetupReset

DomainResponse DomainsCnameSetupReset(ctx, domain).Execute()

Reset the custom record of CNAME Setup to the default value

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsCnameSetupReset(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsCnameSetupReset``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsCnameSetupReset`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsCnameSetupReset`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsCnameSetupResetRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsCnameSetupSet

DomainResponse DomainsCnameSetupSet(ctx, domain).CustomCname(customCname).Execute()

Set a custom record for using CNAME Setup

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name
    customCname := *openapiclient.NewCustomCname("Address_example") // CustomCname |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsCnameSetupSet(context.Background(), domain).CustomCname(customCname).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsCnameSetupSet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsCnameSetupSet`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsCnameSetupSet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsCnameSetupSetRequest struct via the builder pattern

Name Type Description Notes

customCname | CustomCname | |

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsDestroy

MessageResponse DomainsDestroy(ctx, domain).Id(id).Execute()

Remove the domain

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsDestroy(context.Background(), domain).Id(id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsDestroy``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsDestroy`: MessageResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsDestroy`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsDestroyRequest struct via the builder pattern

Name Type Description Notes

id | string | |

Return type

MessageResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsIndex

DomainsIndex200Response DomainsIndex(ctx).Search(search).PerPage(perPage).Page(page).Execute()

Get the list of domains

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    search := "search_example" // string | Search term (optional)
    perPage := int32(56) // int32 | Set how many items returned per page (optional)
    page := int32(56) // int32 | Set the desired page number (optional) (default to 1)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsIndex(context.Background()).Search(search).PerPage(perPage).Page(page).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsIndex``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsIndex`: DomainsIndex200Response
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsIndex`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDomainsIndexRequest struct via the builder pattern

Name Type Description Notes
search string Search term
perPage int32 Set how many items returned per page
page int32 Set the desired page number [default to 1]

Return type

DomainsIndex200Response

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsNameserversCheck

DomainsNameserversCheck200Response DomainsNameserversCheck(ctx, domain).Execute()

Check NS to find whether domain is activated

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsNameserversCheck(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsNameserversCheck``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsNameserversCheck`: DomainsNameserversCheck200Response
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsNameserversCheck`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsNameserversCheckRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainsNameserversCheck200Response

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsNameserversDeprecatedCheck

DomainsNameserversDeprecatedCheck200Response DomainsNameserversDeprecatedCheck(ctx, domain).Execute()

Deprecated in favor /ns-keys/check

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsNameserversDeprecatedCheck(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsNameserversDeprecatedCheck``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsNameserversDeprecatedCheck`: DomainsNameserversDeprecatedCheck200Response
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsNameserversDeprecatedCheck`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsNameserversDeprecatedCheckRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainsNameserversDeprecatedCheck200Response

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsNameserversOptional

NsKeysResponse DomainsNameserversOptional(ctx, domain).Execute()

Use optional NS keys

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsNameserversOptional(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsNameserversOptional``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsNameserversOptional`: NsKeysResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsNameserversOptional`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsNameserversOptionalRequest struct via the builder pattern

Name Type Description Notes

Return type

NsKeysResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsNameserversReset

NsKeysResponse DomainsNameserversReset(ctx, domain).Execute()

Reset custom Nameserver keys to the default values for the domain

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsNameserversReset(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsNameserversReset``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsNameserversReset`: NsKeysResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsNameserversReset`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsNameserversResetRequest struct via the builder pattern

Name Type Description Notes

Return type

NsKeysResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsNameserversSet

NsKeysResponse DomainsNameserversSet(ctx, domain).NsKeys(nsKeys).Execute()

Set custom NS records for the domain

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name
    nsKeys := *openapiclient.NewNsKeys() // NsKeys |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsNameserversSet(context.Background(), domain).NsKeys(nsKeys).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsNameserversSet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsNameserversSet`: NsKeysResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsNameserversSet`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsNameserversSetRequest struct via the builder pattern

Name Type Description Notes

nsKeys | NsKeys | |

Return type

NsKeysResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsRegenerate

MessageResponse DomainsRegenerate(ctx, domain).Execute()

Regenerate domain settings for edge servers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsRegenerate(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsRegenerate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsRegenerate`: MessageResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsRegenerate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsRegenerateRequest struct via the builder pattern

Name Type Description Notes

Return type

MessageResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsShow

DomainResponse DomainsShow(ctx, domain).Execute()

Get information of the domain

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domain := "example.com" // string | Domain name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsShow(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsShow``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsShow`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsShow`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name

Other Parameters

Other parameters are passed through a pointer to a apiDomainsShowRequest struct via the builder pattern

Name Type Description Notes

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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

DomainsStore

DomainResponse DomainsStore(ctx).DomainStore(domainStore).Execute()

Create new domain

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/hamidfzm/arvancloud-go/cdn"
)

func main() {
    domainStore := *openapiclient.NewDomainStore("Domain_example") // DomainStore |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DomainAPI.DomainsStore(context.Background()).DomainStore(domainStore).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DomainAPI.DomainsStore``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DomainsStore`: DomainResponse
    fmt.Fprintf(os.Stdout, "Response from `DomainAPI.DomainsStore`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDomainsStoreRequest struct via the builder pattern

Name Type Description Notes
domainStore DomainStore

Return type

DomainResponse

Authorization

ApiKey, UserToken

HTTP request headers

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

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