All URIs are relative to https://napi.arvancloud.ir/cdn/4.0
Method | HTTP request | Description |
---|---|---|
DomainsPlans | Get /domains/{domain}/plans | Get the list of feature defintions for plans based on different sets |
DomainsPlansUpdate | Put /domains/{domain}/plan | Update the domain's plan |
DomainsPlansUsages | Get /domains/{domain}/plan/usages | Get usages based on features and an estimated cost |
DomainsPlansViolations | Get /domains/{domain}/plan/violations | Get violations based on plans |
PlansIndex | Get /plans | Get the list of feature defintions for plans based on different sets |
PlanResponse DomainsPlans(ctx, domain).IgnoredPlans(ignoredPlans).Execute()
Get the list of feature defintions for plans based on different sets
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
ignoredPlans := "0,1" // string | Comma separaterd plan levels to ignore (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlanApi.DomainsPlans(context.Background(), domain).IgnoredPlans(ignoredPlans).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlans``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DomainsPlans`: PlanResponse
fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlans`: %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 apiDomainsPlansRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
ignoredPlans | string | Comma separaterd plan levels to ignore |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MessageResponse DomainsPlansUpdate(ctx, domain).PlanUpdate(planUpdate).Execute()
Update the domain's plan
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
planUpdate := *openapiclient.NewPlanUpdate(int32(123)) // PlanUpdate | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlanApi.DomainsPlansUpdate(context.Background(), domain).PlanUpdate(planUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansUpdate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DomainsPlansUpdate`: MessageResponse
fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansUpdate`: %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 apiDomainsPlansUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
planUpdate | PlanUpdate | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainsPlansUsages200Response DomainsPlansUsages(ctx, domain).TargetPlan(targetPlan).Execute()
Get usages based on features and an estimated cost
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
targetPlan := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlanApi.DomainsPlansUsages(context.Background(), domain).TargetPlan(targetPlan).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansUsages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DomainsPlansUsages`: DomainsPlansUsages200Response
fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansUsages`: %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 apiDomainsPlansUsagesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
targetPlan | int32 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainsPlansViolations200Response DomainsPlansViolations(ctx, domain).Execute()
Get violations based on plans
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.PlanApi.DomainsPlansViolations(context.Background(), domain).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.DomainsPlansViolations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DomainsPlansViolations`: DomainsPlansViolations200Response
fmt.Fprintf(os.Stdout, "Response from `PlanApi.DomainsPlansViolations`: %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 apiDomainsPlansViolationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DomainsPlansViolations200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PlanResponse PlansIndex(ctx).Domain(domain).IgnoredPlans(ignoredPlans).Execute()
Get the list of feature defintions for plans based on different sets
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := *openapiclient.NewPlansIndexDomainParameter() // PlansIndexDomainParameter | Domain name or id (optional)
ignoredPlans := "0,1" // string | Comma separaterd plan levels to ignore (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PlanApi.PlansIndex(context.Background()).Domain(domain).IgnoredPlans(ignoredPlans).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlanApi.PlansIndex``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PlansIndex`: PlanResponse
fmt.Fprintf(os.Stdout, "Response from `PlanApi.PlansIndex`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPlansIndexRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
domain | PlansIndexDomainParameter | Domain name or id | |
ignoredPlans | string | Comma separaterd plan levels to ignore |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]