# \MaintenanceServiceAPI

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**MaintenanceServiceDeferMaintenanceTask**](MaintenanceServiceAPI.md#MaintenanceServiceDeferMaintenanceTask) | **Post** /maintenanceTasks/{maintenanceTaskId}:deferMaintenanceTask | Defer a maintenance task
[**MaintenanceServiceGetMaintenanceTask**](MaintenanceServiceAPI.md#MaintenanceServiceGetMaintenanceTask) | **Get** /maintenanceTasks/{maintenanceTaskId} | Get a maintenance task
[**MaintenanceServiceGetMaintenanceWindow**](MaintenanceServiceAPI.md#MaintenanceServiceGetMaintenanceWindow) | **Get** /maintenanceWindows/{maintenanceWindowId} | Get a maintenance window
[**MaintenanceServiceListMaintenanceTasks**](MaintenanceServiceAPI.md#MaintenanceServiceListMaintenanceTasks) | **Get** /maintenanceTasks | List maintenance tasks
[**MaintenanceServiceListMaintenanceWindows**](MaintenanceServiceAPI.md#MaintenanceServiceListMaintenanceWindows) | **Get** /maintenanceWindows | List maintenance windows
[**MaintenanceServiceUpdateMaintenanceWindow**](MaintenanceServiceAPI.md#MaintenanceServiceUpdateMaintenanceWindow) | **Patch** /maintenanceWindows/{maintenanceWindow.maintenanceWindowId} | Update a maintenance window



## MaintenanceServiceDeferMaintenanceTask

> map[string]interface{} MaintenanceServiceDeferMaintenanceTask(ctx, maintenanceTaskId).Execute()

Defer a maintenance task

### Example

```go
package main

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

func main() {
	maintenanceTaskId := "maintenanceTaskId_example" // string | 

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

### Path Parameters


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

### Other Parameters

Other parameters are passed through a pointer to a apiMaintenanceServiceDeferMaintenanceTaskRequest 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)


## MaintenanceServiceGetMaintenanceTask

> V1beta1MaintenanceTask MaintenanceServiceGetMaintenanceTask(ctx, maintenanceTaskId).Execute()

Get a maintenance task

### Example

```go
package main

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

func main() {
	maintenanceTaskId := "maintenanceTaskId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## MaintenanceServiceGetMaintenanceWindow

> Dedicatedv1beta1MaintenanceWindow MaintenanceServiceGetMaintenanceWindow(ctx, maintenanceWindowId).Execute()

Get a maintenance window

### Example

```go
package main

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

func main() {
	maintenanceWindowId := "maintenanceWindowId_example" // string | Format: project-{project_id}

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## MaintenanceServiceListMaintenanceTasks

> V1beta1ListMaintenanceTasksResponse MaintenanceServiceListMaintenanceTasks(ctx).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List maintenance tasks

### 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)
	pageSize := int32(56) // int32 | The maximum number of maintenance tasks to return. The service may return fewer than this value. If unspecified, at most X maintenance tasks 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 `ListMaintenanceTasks` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListMaintenanceTasks` 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.MaintenanceServiceAPI.MaintenanceServiceListMaintenanceTasks(context.Background()).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MaintenanceServiceAPI.MaintenanceServiceListMaintenanceTasks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MaintenanceServiceListMaintenanceTasks`: V1beta1ListMaintenanceTasksResponse
	fmt.Fprintf(os.Stdout, "Response from `MaintenanceServiceAPI.MaintenanceServiceListMaintenanceTasks`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

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


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

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


## MaintenanceServiceListMaintenanceWindows

> V1beta1ListMaintenanceWindowsResponse MaintenanceServiceListMaintenanceWindows(ctx).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List maintenance windows

### 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)
	pageSize := int32(56) // int32 | The maximum number of maintenance windows to return. The service may return fewer than this value. If unspecified, at most X maintenance windows 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 `ListMaintenanceWindows` call. Provide this to retrieve the subsequent page.  When paginating, all other parameters provided to `ListMaintenanceWindows` 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.MaintenanceServiceAPI.MaintenanceServiceListMaintenanceWindows(context.Background()).ProjectId(projectId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `MaintenanceServiceAPI.MaintenanceServiceListMaintenanceWindows``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `MaintenanceServiceListMaintenanceWindows`: V1beta1ListMaintenanceWindowsResponse
	fmt.Fprintf(os.Stdout, "Response from `MaintenanceServiceAPI.MaintenanceServiceListMaintenanceWindows`: %v\n", resp)
}
```

### Path Parameters



### Other Parameters

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


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

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


## MaintenanceServiceUpdateMaintenanceWindow

> Dedicatedv1beta1MaintenanceWindow MaintenanceServiceUpdateMaintenanceWindow(ctx, maintenanceWindowMaintenanceWindowId).MaintenanceWindow(maintenanceWindow).Execute()

Update a maintenance window

### Example

```go
package main

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

func main() {
	maintenanceWindowMaintenanceWindowId := "maintenanceWindowMaintenanceWindowId_example" // string | Format: project-{project_id}
	maintenanceWindow := *openapiclient.NewMaintenanceServiceUpdateMaintenanceWindowRequest() // MaintenanceServiceUpdateMaintenanceWindowRequest | 

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

### Path Parameters


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

### Other Parameters

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


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

 **maintenanceWindow** | [**MaintenanceServiceUpdateMaintenanceWindowRequest**](MaintenanceServiceUpdateMaintenanceWindowRequest.md) |  | 

### Return type

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

