# \TidbNodeGroupServiceAPI

All URIs are relative to *https://dedicated.tidbapi.com/v1beta1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**TidbNodeGroupServiceCreateTidbNodeGroup**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceCreateTidbNodeGroup) | **Post** /clusters/{tidbNodeGroup.clusterId}/tidbNodeGroups | Create a TiDB Node Group
[**TidbNodeGroupServiceDeleteTidbNodeGroup**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceDeleteTidbNodeGroup) | **Delete** /clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId} | Delete a TiDB Node Group
[**TidbNodeGroupServiceGetPublicEndpointSetting**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceGetPublicEndpointSetting) | **Get** /clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting | Get the public endpoint setting of a TiDB Node Group
[**TidbNodeGroupServiceGetTidbNodeGroup**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceGetTidbNodeGroup) | **Get** /clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId} | Get a TiDB Node Group
[**TidbNodeGroupServiceListTidbNodeGroups**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceListTidbNodeGroups) | **Get** /clusters/{clusterId}/tidbNodeGroups | List TiDB Node Groups
[**TidbNodeGroupServiceUpdatePublicEndpointSetting**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceUpdatePublicEndpointSetting) | **Patch** /clusters/{clusterId}/tidbNodeGroups/{publicEndpointSetting.tidbNodeGroupId}/publicEndpointSetting | Update the public endpoint setting of a TiDB Node Group
[**TidbNodeGroupServiceUpdateTidbNodeGroup**](TidbNodeGroupServiceAPI.md#TidbNodeGroupServiceUpdateTidbNodeGroup) | **Patch** /clusters/{tidbNodeGroup.clusterId}/tidbNodeGroups/{tidbNodeGroup.tidbNodeGroupId} | Update a TiDB Node Group



## TidbNodeGroupServiceCreateTidbNodeGroup

> Dedicatedv1beta1TidbNodeGroup TidbNodeGroupServiceCreateTidbNodeGroup(ctx, tidbNodeGroupClusterId).TidbNodeGroup(tidbNodeGroup).ValidateOnly(validateOnly).Execute()

Create a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	tidbNodeGroupClusterId := "tidbNodeGroupClusterId_example" // string | The cluster ID of the TiDB group. Optional when creating cluster with the default TiDB group. Required when creating non-default TiDB group.
	tidbNodeGroup := *openapiclient.NewTidbNodeGroupServiceCreateTidbNodeGroupRequest(int32(123)) // TidbNodeGroupServiceCreateTidbNodeGroupRequest | 
	validateOnly := true // bool | if validate_only is true, the request will be validated but not executed. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TidbNodeGroupServiceAPI.TidbNodeGroupServiceCreateTidbNodeGroup(context.Background(), tidbNodeGroupClusterId).TidbNodeGroup(tidbNodeGroup).ValidateOnly(validateOnly).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TidbNodeGroupServiceAPI.TidbNodeGroupServiceCreateTidbNodeGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TidbNodeGroupServiceCreateTidbNodeGroup`: Dedicatedv1beta1TidbNodeGroup
	fmt.Fprintf(os.Stdout, "Response from `TidbNodeGroupServiceAPI.TidbNodeGroupServiceCreateTidbNodeGroup`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**tidbNodeGroupClusterId** | **string** | The cluster ID of the TiDB group. Optional when creating cluster with the default TiDB group. Required when creating non-default TiDB group. | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **tidbNodeGroup** | [**TidbNodeGroupServiceCreateTidbNodeGroupRequest**](TidbNodeGroupServiceCreateTidbNodeGroupRequest.md) |  | 
 **validateOnly** | **bool** | if validate_only is true, the request will be validated but not executed. | 

### Return type

[**Dedicatedv1beta1TidbNodeGroup**](Dedicatedv1beta1TidbNodeGroup.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceDeleteTidbNodeGroup

> map[string]interface{} TidbNodeGroupServiceDeleteTidbNodeGroup(ctx, clusterId, tidbNodeGroupId).ValidateOnly(validateOnly).Execute()

Delete a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	clusterId := "clusterId_example" // string | 
	tidbNodeGroupId := "tidbNodeGroupId_example" // string | 
	validateOnly := true // bool | if validate_only is true, the request will be validated but not executed. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TidbNodeGroupServiceAPI.TidbNodeGroupServiceDeleteTidbNodeGroup(context.Background(), clusterId, tidbNodeGroupId).ValidateOnly(validateOnly).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TidbNodeGroupServiceAPI.TidbNodeGroupServiceDeleteTidbNodeGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TidbNodeGroupServiceDeleteTidbNodeGroup`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `TidbNodeGroupServiceAPI.TidbNodeGroupServiceDeleteTidbNodeGroup`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**clusterId** | **string** |  | 
**tidbNodeGroupId** | **string** |  | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **validateOnly** | **bool** | if validate_only is true, the request will be validated but not executed. | 

### Return type

**map[string]interface{}**

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceGetPublicEndpointSetting

> V1beta1PublicEndpointSetting TidbNodeGroupServiceGetPublicEndpointSetting(ctx, clusterId, tidbNodeGroupId).Execute()

Get the public endpoint setting of a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	clusterId := "clusterId_example" // string | 
	tidbNodeGroupId := "tidbNodeGroupId_example" // string | 

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

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**clusterId** | **string** |  | 
**tidbNodeGroupId** | **string** |  | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------



### Return type

[**V1beta1PublicEndpointSetting**](V1beta1PublicEndpointSetting.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceGetTidbNodeGroup

> Dedicatedv1beta1TidbNodeGroup TidbNodeGroupServiceGetTidbNodeGroup(ctx, clusterId, tidbNodeGroupId).Execute()

Get a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	clusterId := "clusterId_example" // string | 
	tidbNodeGroupId := "tidbNodeGroupId_example" // string | 

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

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**clusterId** | **string** |  | 
**tidbNodeGroupId** | **string** |  | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------



### Return type

[**Dedicatedv1beta1TidbNodeGroup**](Dedicatedv1beta1TidbNodeGroup.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceListTidbNodeGroups

> Dedicatedv1beta1ListTidbNodeGroupsResponse TidbNodeGroupServiceListTidbNodeGroups(ctx, clusterId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List TiDB Node Groups

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	clusterId := "clusterId_example" // string | 
	pageSize := int32(56) // int32 | The maximum number of TiDB groups to return. The service may return fewer than this value. If unspecified, at most X TiDB groups will be returned. The maximum value is X; values above X will be coerced to X. (optional)
	pageToken := "pageToken_example" // string | A page token, received from a previous `ListTidbNodeGroups` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListTidbNodeGroups` must match the call that provided the page token. (optional)
	skip := int32(56) // int32 | The number of individual resources to skip before starting to return results. If the skip value causes the cursor to move past the end of the collection, the response will be 200 OK with an empty result set and no next_page_token. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TidbNodeGroupServiceAPI.TidbNodeGroupServiceListTidbNodeGroups(context.Background(), clusterId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TidbNodeGroupServiceAPI.TidbNodeGroupServiceListTidbNodeGroups``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TidbNodeGroupServiceListTidbNodeGroups`: Dedicatedv1beta1ListTidbNodeGroupsResponse
	fmt.Fprintf(os.Stdout, "Response from `TidbNodeGroupServiceAPI.TidbNodeGroupServiceListTidbNodeGroups`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**clusterId** | **string** |  | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **pageSize** | **int32** | The maximum number of TiDB groups to return. The service may return fewer than this value. If unspecified, at most X TiDB groups will be returned. The maximum value is X; values above X will be coerced to X. | 
 **pageToken** | **string** | A page token, received from a previous &#x60;ListTidbNodeGroups&#x60; call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to &#x60;ListTidbNodeGroups&#x60; must match the call that provided the page token. | 
 **skip** | **int32** | The number of individual resources to skip before starting to return results. If the skip value causes the cursor to move past the end of the collection, the response will be 200 OK with an empty result set and no next_page_token. | 

### Return type

[**Dedicatedv1beta1ListTidbNodeGroupsResponse**](Dedicatedv1beta1ListTidbNodeGroupsResponse.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceUpdatePublicEndpointSetting

> V1beta1PublicEndpointSetting TidbNodeGroupServiceUpdatePublicEndpointSetting(ctx, clusterId, publicEndpointSettingTidbNodeGroupId).PublicEndpointSetting(publicEndpointSetting).ValidateOnly(validateOnly).Execute()

Update the public endpoint setting of a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	clusterId := "clusterId_example" // string | 
	publicEndpointSettingTidbNodeGroupId := "publicEndpointSettingTidbNodeGroupId_example" // string | If set to \"-\", the default TiDB group will be used.
	publicEndpointSetting := *openapiclient.NewTidbNodeGroupServiceUpdatePublicEndpointSettingRequest() // TidbNodeGroupServiceUpdatePublicEndpointSettingRequest | 
	validateOnly := true // bool | if validate_only is true, the request will be validated but not executed. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdatePublicEndpointSetting(context.Background(), clusterId, publicEndpointSettingTidbNodeGroupId).PublicEndpointSetting(publicEndpointSetting).ValidateOnly(validateOnly).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdatePublicEndpointSetting``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TidbNodeGroupServiceUpdatePublicEndpointSetting`: V1beta1PublicEndpointSetting
	fmt.Fprintf(os.Stdout, "Response from `TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdatePublicEndpointSetting`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**clusterId** | **string** |  | 
**publicEndpointSettingTidbNodeGroupId** | **string** | If set to \&quot;-\&quot;, the default TiDB group will be used. | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **publicEndpointSetting** | [**TidbNodeGroupServiceUpdatePublicEndpointSettingRequest**](TidbNodeGroupServiceUpdatePublicEndpointSettingRequest.md) |  | 
 **validateOnly** | **bool** | if validate_only is true, the request will be validated but not executed. | 

### Return type

[**V1beta1PublicEndpointSetting**](V1beta1PublicEndpointSetting.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)


## TidbNodeGroupServiceUpdateTidbNodeGroup

> Dedicatedv1beta1TidbNodeGroup TidbNodeGroupServiceUpdateTidbNodeGroup(ctx, tidbNodeGroupClusterId, tidbNodeGroupTidbNodeGroupId).TidbNodeGroup(tidbNodeGroup).ValidateOnly(validateOnly).Execute()

Update a TiDB Node Group

### Example

```go
package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	tidbNodeGroupClusterId := "tidbNodeGroupClusterId_example" // string | 
	tidbNodeGroupTidbNodeGroupId := "tidbNodeGroupTidbNodeGroupId_example" // string | 
	tidbNodeGroup := *openapiclient.NewTidbNodeGroupServiceUpdateTidbNodeGroupRequest() // TidbNodeGroupServiceUpdateTidbNodeGroupRequest | 
	validateOnly := true // bool | if validate_only is true, the request will be validated but not executed. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdateTidbNodeGroup(context.Background(), tidbNodeGroupClusterId, tidbNodeGroupTidbNodeGroupId).TidbNodeGroup(tidbNodeGroup).ValidateOnly(validateOnly).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdateTidbNodeGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `TidbNodeGroupServiceUpdateTidbNodeGroup`: Dedicatedv1beta1TidbNodeGroup
	fmt.Fprintf(os.Stdout, "Response from `TidbNodeGroupServiceAPI.TidbNodeGroupServiceUpdateTidbNodeGroup`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**tidbNodeGroupClusterId** | **string** |  | 
**tidbNodeGroupTidbNodeGroupId** | **string** |  | 

### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------


 **tidbNodeGroup** | [**TidbNodeGroupServiceUpdateTidbNodeGroupRequest**](TidbNodeGroupServiceUpdateTidbNodeGroupRequest.md) |  | 
 **validateOnly** | **bool** | if validate_only is true, the request will be validated but not executed. | 

### Return type

[**Dedicatedv1beta1TidbNodeGroup**](Dedicatedv1beta1TidbNodeGroup.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

