# \RegionServiceAPI

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

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



## RegionServiceGetNodeSpec

> Dedicatedv1beta1NodeSpec RegionServiceGetNodeSpec(ctx, regionId, componentType, nodeSpecKey).OrgId(orgId).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 | 
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionServiceAPI.RegionServiceGetNodeSpec(context.Background(), regionId, componentType, nodeSpecKey).OrgId(orgId).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
------------- | ------------- | ------------- | -------------



 **orgId** | **string** | Organization id | 
 **projectId** | **string** | Project id | 

### Return type

[**Dedicatedv1beta1NodeSpec**](Dedicatedv1beta1NodeSpec.md)

### Authorization

No authorization required

### 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).OrgId(orgId).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}
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionServiceAPI.RegionServiceGetRegion(context.Background(), regionId).OrgId(orgId).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
------------- | ------------- | ------------- | -------------

 **orgId** | **string** | Organization id | 
 **projectId** | **string** | Project id | 

### Return type

[**Commonv1beta1Region**](Commonv1beta1Region.md)

### Authorization

No authorization required

### 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).OrgId(orgId).ProjectId(projectId).ComponentType(componentType).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}
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id
	componentType := "componentType_example" // string | If specified, only node specs of the specified component type will be returned. (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).OrgId(orgId).ProjectId(projectId).ComponentType(componentType).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
------------- | ------------- | ------------- | -------------

 **orgId** | **string** | Organization id | 
 **projectId** | **string** | Project id | 
 **componentType** | **string** | If specified, only node specs of the specified component type will be returned. | 
 **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

No authorization required

### 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).OrgId(orgId).CloudProvider(cloudProvider).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() {
	orgId := "orgId_example" // string | Organization id
	cloudProvider := "cloudProvider_example" // string | If specified, only regions of the specified cloud provider will be returned. (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()).OrgId(orgId).CloudProvider(cloudProvider).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
------------- | ------------- | ------------- | -------------
 **orgId** | **string** | Organization id | 
 **cloudProvider** | **string** | If specified, only regions of the specified cloud provider will be returned. | 
 **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

No authorization required

### 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).OrgId(orgId).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() {
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.RegionServiceAPI.RegionServiceShowCloudProviders(context.Background()).OrgId(orgId).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
------------- | ------------- | ------------- | -------------
 **orgId** | **string** | Organization id | 
 **projectId** | **string** | Project id | 

### Return type

[**V1beta1ShowCloudProvidersResponse**](V1beta1ShowCloudProvidersResponse.md)

### Authorization

No authorization required

### 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)

