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 |
HighAvailabilityConfig CreateHAConfig(ctx).HAConfigFormRequest(hAConfigFormRequest).Request(request).Execute()
Create high availability config
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)
}Other parameters are passed through a pointer to a apiCreateHAConfigRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| hAConfigFormRequest | HAConfigFormData | ||
| request | interface{} |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteHAConfig(ctx, cUUID).Request(request).Execute()
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)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiDeleteHAConfigRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | interface{} | |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EditHAConfig(ctx, cUUID).Request(request).Execute()
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)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiEditHAConfigRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | interface{} | |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateClusterKey(ctx).Execute()
Generate cluster key
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)
}
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGenerateClusterKeyRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HAConfigGetResp GetHAConfig(ctx).Execute()
Get high availability config
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)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetHAConfigRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]