Skip to content

Latest commit

 

History

History
1552 lines (1019 loc) · 51.4 KB

LoadBalancingApi.md

File metadata and controls

1552 lines (1019 loc) · 51.4 KB

\LoadBalancingApi

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

Method HTTP request Description
LoadBalancersDestroy Delete /domains/{domain}/load-balancers/{loadBalancerId} Remove a load balancer
LoadBalancersIndex Get /domains/{domain}/load-balancers Get list of load balancers
LoadBalancersPoolsDestroy Delete /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} Remove a load balancer pool
LoadBalancersPoolsIndex Get /domains/{domain}/load-balancers/{loadBalancerId}/pools Get the list of pools of a load balancers
LoadBalancersPoolsOriginsDestroy Delete /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} Remove an origin from the pool of the load balancer
LoadBalancersPoolsOriginsIndex Get /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins Get list of origins of a pool
LoadBalancersPoolsOriginsShow Get /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} Get load balancer origin information
LoadBalancersPoolsOriginsStore Post /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins Create a new origin in the pool of the load balancer
LoadBalancersPoolsOriginsUpdate Patch /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId}/origins/{loadBalancerPoolOriginId} Update an existing origin of the pool
LoadBalancersPoolsShow Get /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} Get load balancer pool information
LoadBalancersPoolsStore Post /domains/{domain}/load-balancers/{loadBalancerId}/pools Create a new pool for the load balancer
LoadBalancersPoolsUpdate Put /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} Update an existing load balancer pool with origins
LoadBalancersPoolsUpdatePool Patch /domains/{domain}/load-balancers/{loadBalancerId}/pools/{loadBalancerPoolId} Update an existing load balancer pool without origins
LoadBalancersPrioritizePool Post /domains/{domain}/load-balancers/{loadBalancerId}/prioritize Reorder the priority of load balancer pools
LoadBalancersRegionsIndex Get /load-balancers/regions Get list of regions for load balancers
LoadBalancersSettingsShow Get /domains/{domain}/load-balancers/settings Get list of domain load balancer global settings
LoadBalancersSettingsUpdate Patch /domains/{domain}/load-balancers/settings Update domain's global load balancer settings
LoadBalancersShow Get /domains/{domain}/load-balancers/{loadBalancerId} Get load balancer information
LoadBalancersStore Post /domains/{domain}/load-balancers Create a new load balancer
LoadBalancersUpdate Patch /domains/{domain}/load-balancers/{loadBalancerId} Update a load balancer
LoadBalancersUpdateWithPools Put /domains/{domain}/load-balancers/{loadBalancerId} Update a load balancer

LoadBalancersDestroy

MessageResponse LoadBalancersDestroy(ctx, domain, loadBalancerId).Execute()

Remove a load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

Other parameters are passed through a pointer to a apiLoadBalancersDestroyRequest 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]

LoadBalancersIndex

LoadBalancersIndex200Response LoadBalancersIndex(ctx, domain).Execute()

Get list of load balancers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

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

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LoadBalancingApi.LoadBalancersIndex(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersIndex``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `LoadBalancersIndex`: LoadBalancersIndex200Response
    fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersIndex`: %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 apiLoadBalancersIndexRequest struct via the builder pattern

Name Type Description Notes

Return type

LoadBalancersIndex200Response

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]

LoadBalancersPoolsDestroy

MessageResponse LoadBalancersPoolsDestroy(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute()

Remove a load balancer pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

Other parameters are passed through a pointer to a apiLoadBalancersPoolsDestroyRequest 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]

LoadBalancersPoolsIndex

LoadBalancersPoolsIndex200Response LoadBalancersPoolsIndex(ctx, domain, loadBalancerId).Execute()

Get the list of pools of a load balancers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

Return type

LoadBalancersPoolsIndex200Response

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]

LoadBalancersPoolsOriginsDestroy

MessageResponse LoadBalancersPoolsOriginsDestroy(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute()

Remove an origin from the pool of the load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer
loadBalancerPoolOriginId string ID of an origin of the pool in the load balancer

Other Parameters

Other parameters are passed through a pointer to a apiLoadBalancersPoolsOriginsDestroyRequest 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]

LoadBalancersPoolsOriginsIndex

LoadBalancersPoolsOriginsIndex200Response LoadBalancersPoolsOriginsIndex(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute()

Get list of origins of a pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

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

Name Type Description Notes

Return type

LoadBalancersPoolsOriginsIndex200Response

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]

LoadBalancersPoolsOriginsShow

LoadBalancerOriginData LoadBalancersPoolsOriginsShow(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).Execute()

Get load balancer origin information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer
loadBalancerPoolOriginId string ID of an origin of the pool in the load balancer

Other Parameters

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

Name Type Description Notes

Return type

LoadBalancerOriginData

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]

LoadBalancersPoolsOriginsStore

LoadBalancerOriginResponse LoadBalancersPoolsOriginsStore(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerOriginStore(loadBalancerOriginStore).Execute()

Create a new origin in the pool of the load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerOriginStore := *openapiclient.NewLoadBalancerOriginStore(false, "Address_example", int32(123), int32(123), "Protocol_example") // LoadBalancerOriginStore |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerOriginStore | LoadBalancerOriginStore | |

Return type

LoadBalancerOriginResponse

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]

LoadBalancersPoolsOriginsUpdate

LoadBalancerOriginResponse LoadBalancersPoolsOriginsUpdate(ctx, domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).LoadBalancerOriginStore(loadBalancerOriginStore).Execute()

Update an existing origin of the pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerPoolOriginId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of an origin of the pool in the load balancer
    loadBalancerOriginStore := *openapiclient.NewLoadBalancerOriginStore(false, "Address_example", int32(123), int32(123), "Protocol_example") // LoadBalancerOriginStore |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LoadBalancingApi.LoadBalancersPoolsOriginsUpdate(context.Background(), domain, loadBalancerId, loadBalancerPoolId, loadBalancerPoolOriginId).LoadBalancerOriginStore(loadBalancerOriginStore).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersPoolsOriginsUpdate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `LoadBalancersPoolsOriginsUpdate`: LoadBalancerOriginResponse
    fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersPoolsOriginsUpdate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer
loadBalancerPoolOriginId string ID of an origin of the pool in the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerOriginStore | LoadBalancerOriginStore | |

Return type

LoadBalancerOriginResponse

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]

LoadBalancersPoolsShow

LoadBalancerPoolData LoadBalancersPoolsShow(ctx, domain, loadBalancerId, loadBalancerPoolId).Execute()

Get load balancer pool information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

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

Name Type Description Notes

Return type

LoadBalancerPoolData

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]

LoadBalancersPoolsStore

LoadBalancerPoolResponse LoadBalancersPoolsStore(ctx, domain, loadBalancerId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute()

Create a new pool for the load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolStore := *openapiclient.NewLoadBalancerPoolStore("Name_example", false, "Method_example", "Keepalive_example", "NextUpstreamTcp_example") // LoadBalancerPoolStore |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerPoolStore | LoadBalancerPoolStore | |

Return type

LoadBalancerPoolResponse

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]

LoadBalancersPoolsUpdate

LoadBalancerPoolResponse LoadBalancersPoolsUpdate(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute()

Update an existing load balancer pool with origins

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerPoolStore := *openapiclient.NewLoadBalancerPoolStore("Name_example", false, "Method_example", "Keepalive_example", "NextUpstreamTcp_example") // LoadBalancerPoolStore |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerPoolStore | LoadBalancerPoolStore | |

Return type

LoadBalancerPoolResponse

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]

LoadBalancersPoolsUpdatePool

LoadBalancerPoolResponse LoadBalancersPoolsUpdatePool(ctx, domain, loadBalancerId, loadBalancerPoolId).LoadBalancerPoolStore(loadBalancerPoolStore).Execute()

Update an existing load balancer pool without origins

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerPoolId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of a pool of the load balancer
    loadBalancerPoolStore := *openapiclient.NewLoadBalancerPoolStore("Name_example", false, "Method_example", "Keepalive_example", "NextUpstreamTcp_example") // LoadBalancerPoolStore |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer
loadBalancerPoolId string ID of a pool of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerPoolStore | LoadBalancerPoolStore | |

Return type

LoadBalancerPoolResponse

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]

LoadBalancersPrioritizePool

LoadBalancerResponse LoadBalancersPrioritizePool(ctx, domain, loadBalancerId).PrioritizePool(prioritizePool).Execute()

Reorder the priority of load balancer pools

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    prioritizePool := *openapiclient.NewPrioritizePool("PoolId_example", "AfterPoolId_example", "BeforePoolId_example") // PrioritizePool |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

prioritizePool | PrioritizePool | |

Return type

LoadBalancerResponse

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]

LoadBalancersRegionsIndex

LoadBalancersRegionsIndex200Response LoadBalancersRegionsIndex(ctx).Execute()

Get list of regions for load balancers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

LoadBalancersRegionsIndex200Response

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]

LoadBalancersSettingsShow

LoadBalancerSettingsData LoadBalancersSettingsShow(ctx, domain).Execute()

Get list of domain load balancer global settings

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

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

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LoadBalancingApi.LoadBalancersSettingsShow(context.Background(), domain).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersSettingsShow``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `LoadBalancersSettingsShow`: LoadBalancerSettingsData
    fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersSettingsShow`: %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 apiLoadBalancersSettingsShowRequest struct via the builder pattern

Name Type Description Notes

Return type

LoadBalancerSettingsData

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]

LoadBalancersSettingsUpdate

LoadBalancersSettingsUpdate200Response LoadBalancersSettingsUpdate(ctx, domain).LoadBalancerSetting(loadBalancerSetting).Execute()

Update domain's global load balancer settings

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerSetting := *openapiclient.NewLoadBalancerSetting() // LoadBalancerSetting |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LoadBalancingApi.LoadBalancersSettingsUpdate(context.Background(), domain).LoadBalancerSetting(loadBalancerSetting).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersSettingsUpdate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `LoadBalancersSettingsUpdate`: LoadBalancersSettingsUpdate200Response
    fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersSettingsUpdate`: %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 apiLoadBalancersSettingsUpdateRequest struct via the builder pattern

Name Type Description Notes

loadBalancerSetting | LoadBalancerSetting | |

Return type

LoadBalancersSettingsUpdate200Response

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]

LoadBalancersShow

LoadBalancerData LoadBalancersShow(ctx, domain, loadBalancerId).Execute()

Get load balancer information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

Return type

LoadBalancerData

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]

LoadBalancersStore

LoadBalancerResponse LoadBalancersStore(ctx, domain).LoadBalancerStore(loadBalancerStore).Execute()

Create a new load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerStore := *openapiclient.NewLoadBalancerStore("lb1", false, "Method_example") // LoadBalancerStore |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.LoadBalancingApi.LoadBalancersStore(context.Background(), domain).LoadBalancerStore(loadBalancerStore).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoadBalancingApi.LoadBalancersStore``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `LoadBalancersStore`: LoadBalancerResponse
    fmt.Fprintf(os.Stdout, "Response from `LoadBalancingApi.LoadBalancersStore`: %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 apiLoadBalancersStoreRequest struct via the builder pattern

Name Type Description Notes

loadBalancerStore | LoadBalancerStore | |

Return type

LoadBalancerResponse

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]

LoadBalancersUpdate

LoadBalancerResponse LoadBalancersUpdate(ctx, domain, loadBalancerId).LoadBalancer(loadBalancer).Execute()

Update a load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancer := *openapiclient.NewLoadBalancer() // LoadBalancer |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancer | LoadBalancer | |

Return type

LoadBalancerResponse

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]

LoadBalancersUpdateWithPools

LoadBalancerResponse LoadBalancersUpdateWithPools(ctx, domain, loadBalancerId).LoadBalancerStore(loadBalancerStore).Execute()

Update a load balancer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/arash-r1c/cdn-go-sdk"
)

func main() {
    domain := "example.com" // string | Domain name
    loadBalancerId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | ID of the load balancer
    loadBalancerStore := *openapiclient.NewLoadBalancerStore("lb1", false, "Method_example") // LoadBalancerStore |  (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string Domain name
loadBalancerId string ID of the load balancer

Other Parameters

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

Name Type Description Notes

loadBalancerStore | LoadBalancerStore | |

Return type

LoadBalancerResponse

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]