Skip to content

Latest commit

 

History

History
335 lines (212 loc) · 7.93 KB

File metadata and controls

335 lines (212 loc) · 7.93 KB

\HAAPI

All URIs are relative to http://localhost

Method HTTP request Description
CreateHAConfig Post /api/v1/settings/ha/config Create high availability config
DeleteHAConfig Delete /api/v1/settings/ha/config/{cUUID}
EditHAConfig Put /api/v1/settings/ha/config/{cUUID}
GenerateClusterKey Get /api/v1/settings/ha/generate_key Generate cluster key
GetHAConfig Get /api/v1/settings/ha/config Get high availability config

CreateHAConfig

HighAvailabilityConfig CreateHAConfig(ctx).HAConfigFormRequest(hAConfigFormRequest).Request(request).Execute()

Create high availability config

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yugabyte/platform-go-client/v1"
)

func main() {
	hAConfigFormRequest := *openapiclient.NewHAConfigFormData(false, "ClusterKey_example") // HAConfigFormData | 
	request := TODO // interface{} |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
hAConfigFormRequest HAConfigFormData
request interface{}

Return type

HighAvailabilityConfig

Authorization

apiKeyAuth

HTTP request headers

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

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

DeleteHAConfig

DeleteHAConfig(ctx, cUUID).Request(request).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yugabyte/platform-go-client/v1"
)

func main() {
	cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
	request := TODO // interface{} |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.HAAPI.DeleteHAConfig(context.Background(), cUUID).Request(request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `HAAPI.DeleteHAConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

request | interface{} | |

Return type

(empty response body)

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

EditHAConfig

EditHAConfig(ctx, cUUID).Request(request).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yugabyte/platform-go-client/v1"
)

func main() {
	cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
	request := TODO // interface{} |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.HAAPI.EditHAConfig(context.Background(), cUUID).Request(request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `HAAPI.EditHAConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

request | interface{} | |

Return type

(empty response body)

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GenerateClusterKey

GenerateClusterKey(ctx).Execute()

Generate cluster key

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yugabyte/platform-go-client/v1"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.HAAPI.GenerateClusterKey(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `HAAPI.GenerateClusterKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetHAConfig

HAConfigGetResp GetHAConfig(ctx).Execute()

Get high availability config

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yugabyte/platform-go-client/v1"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

HAConfigGetResp

Authorization

apiKeyAuth

HTTP request headers

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

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