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 |
MessageResponse DomainsClone(ctx, domain).CloneDomain(cloneDomain).Execute()
Clone a domain config from another one
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsCloneRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
cloneDomain | CloneDomain | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsCnameSetupCheck(ctx, domain).Execute()
Check Cname Setup to find whether domain is activated
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsCnameSetupCheckRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsCnameSetupConvert(ctx, domain).Execute()
Convert domain setup to cname
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsCnameSetupConvertRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsCnameSetupReset(ctx, domain).Execute()
Reset the custom record of CNAME Setup to the default value
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsCnameSetupResetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsCnameSetupSet(ctx, domain).CustomCname(customCname).Execute()
Set a custom record for using CNAME Setup
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsCnameSetupSetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
customCname | CustomCname | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MessageResponse DomainsDestroy(ctx, domain).Id(id).Execute()
Remove the domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsDestroyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
id | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainsIndex200Response DomainsIndex(ctx).Search(search).PerPage(perPage).Page(page).Execute()
Get the list of domains
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}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] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainsNameserversCheck200Response DomainsNameserversCheck(ctx, domain).Execute()
Check NS to find whether domain is activated
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsNameserversCheckRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
DomainsNameserversCheck200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainsNameserversDeprecatedCheck200Response DomainsNameserversDeprecatedCheck(ctx, domain).Execute()
Deprecated in favor /ns-keys/check
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsNameserversDeprecatedCheckRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
DomainsNameserversDeprecatedCheck200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NsKeysResponse DomainsNameserversOptional(ctx, domain).Execute()
Use optional NS keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsNameserversOptionalRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NsKeysResponse DomainsNameserversReset(ctx, domain).Execute()
Reset custom Nameserver keys to the default values for the domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsNameserversResetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NsKeysResponse DomainsNameserversSet(ctx, domain).NsKeys(nsKeys).Execute()
Set custom NS records for the domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsNameserversSetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
nsKeys | NsKeys | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MessageResponse DomainsRegenerate(ctx, domain).Execute()
Regenerate domain settings for edge servers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsRegenerateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsShow(ctx, domain).Execute()
Get information of the domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| domain | string | Domain name |
Other parameters are passed through a pointer to a apiDomainsShowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse DomainsStore(ctx).DomainStore(domainStore).Execute()
Create new domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
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)
}Other parameters are passed through a pointer to a apiDomainsStoreRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| domainStore | DomainStore |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]