# \RegionServiceAPI

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**RegionServiceGetNodeSpec**](RegionServiceAPI.md#RegionServiceGetNodeSpec) | **Get** /regions/{regionId}/componentTypes/{componentType}/nodeSpecs/{nodeSpecKey} | Get a node spec
[**RegionServiceGetRegion**](RegionServiceAPI.md#RegionServiceGetRegion) | **Get** /regions/{regionId} | Get a region
[**RegionServiceListNodeSpecs**](RegionServiceAPI.md#RegionServiceListNodeSpecs) | **Get** /regions/{regionId}/nodeSpecs | List node specs for creating or scaling a cluster
[**RegionServiceListRegions**](RegionServiceAPI.md#RegionServiceListRegions) | **Get** /regions | List regions for creating a cluster
[**RegionServiceShowCloudProviders**](RegionServiceAPI.md#RegionServiceShowCloudProviders) | **Get** /regions:showCloudProviders | Show cloud providers for creating a cluster



## RegionServiceGetNodeSpec

> Dedicatedv1beta1NodeSpec RegionServiceGetNodeSpec(ctx, regionId, componentType, nodeSpecKey).ProjectId(projectId).Execute()

Get a node spec

### Example

```go
package main

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

func main() {
	regionId := "regionId_example" // string | Format: {cloud_provider}-{region_code}
	componentType := "componentType_example" // string | 
	nodeSpecKey := "nodeSpecKey_example" // string | 
	projectId := "projectId_example" // string | If unspecified, the project ID of default project is used. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionServiceAPI.RegionServiceGetNodeSpec(context.Background(), regionId, componentType, nodeSpecKey).ProjectId(projectId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionServiceAPI.RegionServiceGetNodeSpec``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RegionServiceGetNodeSpec`: Dedicatedv1beta1NodeSpec
	fmt.Fprintf(os.Stdout, "Response from `RegionServiceAPI.RegionServiceGetNodeSpec`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**regionId** | **string** | Format: {cloud_provider}-{region_code} | 
**componentType** | **string** |  | 
**nodeSpecKey** | **string** |  | 

### Other Parameters

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


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



 **projectId** | **string** | If unspecified, the project ID of default project is used. | 

### Return type

[**Dedicatedv1beta1NodeSpec**](Dedicatedv1beta1NodeSpec.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)


## RegionServiceGetRegion

> Commonv1beta1Region RegionServiceGetRegion(ctx, regionId).ProjectId(projectId).Execute()

Get a region

### Example

```go
package main

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

func main() {
	regionId := "regionId_example" // string | Format: {cloud_provider}-{region_code}
	projectId := "projectId_example" // string | If unspecified, the project ID of default project is used. (optional)

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

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**regionId** | **string** | Format: {cloud_provider}-{region_code} | 

### Other Parameters

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


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

 **projectId** | **string** | If unspecified, the project ID of default project is used. | 

### Return type

[**Commonv1beta1Region**](Commonv1beta1Region.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)


## RegionServiceListNodeSpecs

> V1beta1ListNodeSpecsResponse RegionServiceListNodeSpecs(ctx, regionId).ComponentType(componentType).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List node specs for creating or scaling a cluster

### Example

```go
package main

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

func main() {
	regionId := "regionId_example" // string | Format: {cloud_provider}-{region_code}
	componentType := "componentType_example" // string | If specified, only node specs of the specified component type will be returned. (optional)
	projectId := "projectId_example" // string | If unspecified, the project ID of default project is used. (optional)
	pageSize := int32(56) // int32 | The maximum number of node specs to return. The service may return fewer than this value. If unspecified, at most X node specs 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 `ListNodeSpecs` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListNodeSpecs` 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.RegionServiceAPI.RegionServiceListNodeSpecs(context.Background(), regionId).ComponentType(componentType).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionServiceAPI.RegionServiceListNodeSpecs``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RegionServiceListNodeSpecs`: V1beta1ListNodeSpecsResponse
	fmt.Fprintf(os.Stdout, "Response from `RegionServiceAPI.RegionServiceListNodeSpecs`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**regionId** | **string** | Format: {cloud_provider}-{region_code} | 

### Other Parameters

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


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

 **componentType** | **string** | If specified, only node specs of the specified component type will be returned. | 
 **projectId** | **string** | If unspecified, the project ID of default project is used. | 
 **pageSize** | **int32** | The maximum number of node specs to return. The service may return fewer than this value. If unspecified, at most X node specs 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;ListNodeSpecs&#x60; call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to &#x60;ListNodeSpecs&#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

[**V1beta1ListNodeSpecsResponse**](V1beta1ListNodeSpecsResponse.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)


## RegionServiceListRegions

> TidbCloudOpenApidedicatedv1beta1ListRegionsResponse RegionServiceListRegions(ctx).CloudProvider(cloudProvider).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List regions for creating a cluster

### Example

```go
package main

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

func main() {
	cloudProvider := "cloudProvider_example" // string | If specified, only regions of the specified cloud provider will be returned. (optional)
	projectId := "projectId_example" // string | If unspecified, the project ID of default project is used. (optional)
	pageSize := int32(56) // int32 | The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most X regions 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 `ListRegions` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListRegions` 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.RegionServiceAPI.RegionServiceListRegions(context.Background()).CloudProvider(cloudProvider).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `RegionServiceAPI.RegionServiceListRegions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RegionServiceListRegions`: TidbCloudOpenApidedicatedv1beta1ListRegionsResponse
	fmt.Fprintf(os.Stdout, "Response from `RegionServiceAPI.RegionServiceListRegions`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cloudProvider** | **string** | If specified, only regions of the specified cloud provider will be returned. | 
 **projectId** | **string** | If unspecified, the project ID of default project is used. | 
 **pageSize** | **int32** | The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most X regions 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;ListRegions&#x60; call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to &#x60;ListRegions&#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

[**TidbCloudOpenApidedicatedv1beta1ListRegionsResponse**](TidbCloudOpenApidedicatedv1beta1ListRegionsResponse.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)


## RegionServiceShowCloudProviders

> V1beta1ShowCloudProvidersResponse RegionServiceShowCloudProviders(ctx).ProjectId(projectId).Execute()

Show cloud providers for creating a cluster

### Example

```go
package main

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

func main() {
	projectId := "projectId_example" // string | If unspecified, the project ID of default project is used. (optional)

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

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **projectId** | **string** | If unspecified, the project ID of default project is used. | 

### Return type

[**V1beta1ShowCloudProvidersResponse**](V1beta1ShowCloudProvidersResponse.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)

