# \NetworkContainerServiceAPI

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**NetworkContainerServiceCreateNetworkContainer**](NetworkContainerServiceAPI.md#NetworkContainerServiceCreateNetworkContainer) | **Post** /networkContainers | Create a network container
[**NetworkContainerServiceCreateVpcPeering**](NetworkContainerServiceAPI.md#NetworkContainerServiceCreateVpcPeering) | **Post** /vpcPeerings | Create a VPC peering
[**NetworkContainerServiceDeleteNetworkContainer**](NetworkContainerServiceAPI.md#NetworkContainerServiceDeleteNetworkContainer) | **Delete** /networkContainers/{networkContainerId} | Delete a network container
[**NetworkContainerServiceDeleteVpcPeering**](NetworkContainerServiceAPI.md#NetworkContainerServiceDeleteVpcPeering) | **Delete** /vpcPeerings/{vpcPeeringId} | Delete a VPC peering
[**NetworkContainerServiceGetNetworkContainer**](NetworkContainerServiceAPI.md#NetworkContainerServiceGetNetworkContainer) | **Get** /networkContainers/{networkContainerId} | Get a network container
[**NetworkContainerServiceGetVpcPeering**](NetworkContainerServiceAPI.md#NetworkContainerServiceGetVpcPeering) | **Get** /vpcPeerings/{vpcPeeringId} | Get a VPC peering
[**NetworkContainerServiceListNetworkContainers**](NetworkContainerServiceAPI.md#NetworkContainerServiceListNetworkContainers) | **Get** /networkContainers | List network containers
[**NetworkContainerServiceListVpcPeerings**](NetworkContainerServiceAPI.md#NetworkContainerServiceListVpcPeerings) | **Get** /vpcPeerings | List VPC peerings



## NetworkContainerServiceCreateNetworkContainer

> V1beta1NetworkContainer NetworkContainerServiceCreateNetworkContainer(ctx).NetworkContainer(networkContainer).ValidateOnly(validateOnly).Execute()

Create a network container

### Example

```go
package main

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

func main() {
	networkContainer := *openapiclient.NewV1beta1NetworkContainer("RegionId_example") // V1beta1NetworkContainer | 
	validateOnly := true // bool |  (optional)

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

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **networkContainer** | [**V1beta1NetworkContainer**](V1beta1NetworkContainer.md) |  | 
 **validateOnly** | **bool** |  | 

### Return type

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


## NetworkContainerServiceCreateVpcPeering

> Dedicatedv1beta1VpcPeering NetworkContainerServiceCreateVpcPeering(ctx).VpcPeering(vpcPeering).Execute()

Create a VPC peering

### Example

```go
package main

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

func main() {
	vpcPeering := *openapiclient.NewDedicatedv1beta1VpcPeering("TidbCloudRegionId_example", "CustomerAccountId_example", "CustomerVpcId_example", "CustomerVpcCidr_example") // Dedicatedv1beta1VpcPeering | 

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

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **vpcPeering** | [**Dedicatedv1beta1VpcPeering**](Dedicatedv1beta1VpcPeering.md) |  | 

### Return type

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


## NetworkContainerServiceDeleteNetworkContainer

> map[string]interface{} NetworkContainerServiceDeleteNetworkContainer(ctx, networkContainerId).Execute()

Delete a network container

### Example

```go
package main

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

func main() {
	networkContainerId := "networkContainerId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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


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


## NetworkContainerServiceDeleteVpcPeering

> map[string]interface{} NetworkContainerServiceDeleteVpcPeering(ctx, vpcPeeringId).Execute()

Delete a VPC peering

### Example

```go
package main

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

func main() {
	vpcPeeringId := "vpcPeeringId_example" // string | Format {cloud_provider}-{random_suffix}

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

### Path Parameters


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

### Other Parameters

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


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


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


## NetworkContainerServiceGetNetworkContainer

> V1beta1NetworkContainer NetworkContainerServiceGetNetworkContainer(ctx, networkContainerId).Execute()

Get a network container

### Example

```go
package main

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

func main() {
	networkContainerId := "networkContainerId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## NetworkContainerServiceGetVpcPeering

> Dedicatedv1beta1VpcPeering NetworkContainerServiceGetVpcPeering(ctx, vpcPeeringId).Execute()

Get a VPC peering

### Example

```go
package main

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

func main() {
	vpcPeeringId := "vpcPeeringId_example" // string | Format {cloud_provider}-{random_suffix}

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## NetworkContainerServiceListNetworkContainers

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

List network containers

### 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)
	cloudProvider := "cloudProvider_example" // string |  - aws: Amazon Web Services. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - gcp: Google Cloud Platform. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - azure: Microsoft Azure. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE (optional)
	pageSize := int32(56) // int32 | The maximum number of network containers to return. The service may return fewer than this value. If unspecified, at most X network containers 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 `ListNetworkContainers` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListNetworkContainers` 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.NetworkContainerServiceAPI.NetworkContainerServiceListNetworkContainers(context.Background()).ProjectId(projectId).CloudProvider(cloudProvider).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `NetworkContainerServiceAPI.NetworkContainerServiceListNetworkContainers``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `NetworkContainerServiceListNetworkContainers`: V1beta1ListNetworkContainersResponse
	fmt.Fprintf(os.Stdout, "Response from `NetworkContainerServiceAPI.NetworkContainerServiceListNetworkContainers`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **projectId** | **string** | If unspecified, the project ID of default project is used. | 
 **cloudProvider** | **string** |  - aws: Amazon Web Services. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - gcp: Google Cloud Platform. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - azure: Microsoft Azure. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE | 
 **pageSize** | **int32** | The maximum number of network containers to return. The service may return fewer than this value. If unspecified, at most X network containers 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;ListNetworkContainers&#x60; call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to &#x60;ListNetworkContainers&#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

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


## NetworkContainerServiceListVpcPeerings

> Dedicatedv1beta1ListVpcPeeringsResponse NetworkContainerServiceListVpcPeerings(ctx).ProjectId(projectId).CloudProvider(cloudProvider).PageSize(pageSize).PageToken(pageToken).Execute()

List VPC peerings

### 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)
	cloudProvider := "cloudProvider_example" // string | If specified, only VPC peerings of the specified cloud provider will be returned.   - aws: Amazon Web Services. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - gcp: Google Cloud Platform. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - azure: Microsoft Azure. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE (optional)
	pageSize := int32(56) // int32 | The maximum number of VPC peerings to return. The service may return fewer than this value. If unspecified, at most X VPC peerings 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 `ListVpcPeerings` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListVpcPeerings` must match the call that provided the page token. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.NetworkContainerServiceAPI.NetworkContainerServiceListVpcPeerings(context.Background()).ProjectId(projectId).CloudProvider(cloudProvider).PageSize(pageSize).PageToken(pageToken).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `NetworkContainerServiceAPI.NetworkContainerServiceListVpcPeerings``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `NetworkContainerServiceListVpcPeerings`: Dedicatedv1beta1ListVpcPeeringsResponse
	fmt.Fprintf(os.Stdout, "Response from `NetworkContainerServiceAPI.NetworkContainerServiceListVpcPeerings`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

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


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **projectId** | **string** | If unspecified, the project ID of default project is used. | 
 **cloudProvider** | **string** | If specified, only VPC peerings of the specified cloud provider will be returned.   - aws: Amazon Web Services. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - gcp: Google Cloud Platform. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE  - azure: Microsoft Azure. buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE | 
 **pageSize** | **int32** | The maximum number of VPC peerings to return. The service may return fewer than this value. If unspecified, at most X VPC peerings 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;ListVpcPeerings&#x60; call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to &#x60;ListVpcPeerings&#x60; must match the call that provided the page token. | 

### Return type

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

