# \MaintenanceServiceAPI

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

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



## MaintenanceServiceDeferMaintenanceTask

> map[string]interface{} MaintenanceServiceDeferMaintenanceTask(ctx, maintenanceTaskId).OrgId(orgId).ProjectId(projectId).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 | 
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MaintenanceServiceAPI.MaintenanceServiceDeferMaintenanceTask(context.Background(), maintenanceTaskId).OrgId(orgId).ProjectId(projectId).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
------------- | ------------- | ------------- | -------------

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

### Return type

**map[string]interface{}**

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


## MaintenanceServiceGetMaintenanceTask

> V1beta1MaintenanceTask MaintenanceServiceGetMaintenanceTask(ctx, maintenanceTaskId).OrgId(orgId).ProjectId(projectId).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 | 
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MaintenanceServiceAPI.MaintenanceServiceGetMaintenanceTask(context.Background(), maintenanceTaskId).OrgId(orgId).ProjectId(projectId).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
------------- | ------------- | ------------- | -------------

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

### Return type

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


## MaintenanceServiceGetMaintenanceWindow

> Dedicatedv1beta1MaintenanceWindow MaintenanceServiceGetMaintenanceWindow(ctx, maintenanceWindowId).OrgId(orgId).ProjectId(projectId).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}
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MaintenanceServiceAPI.MaintenanceServiceGetMaintenanceWindow(context.Background(), maintenanceWindowId).OrgId(orgId).ProjectId(projectId).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
------------- | ------------- | ------------- | -------------

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

### Return type

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


## MaintenanceServiceListMaintenanceTasks

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

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)


## MaintenanceServiceListMaintenanceWindows

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

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)


## MaintenanceServiceUpdateMaintenanceWindow

> Dedicatedv1beta1MaintenanceWindow MaintenanceServiceUpdateMaintenanceWindow(ctx, maintenanceWindowMaintenanceWindowId).OrgId(orgId).ProjectId(projectId).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}
	orgId := "orgId_example" // string | Organization id
	projectId := "projectId_example" // string | Project id
	maintenanceWindow := *openapiclient.NewMaintenanceServiceUpdateMaintenanceWindowRequest() // MaintenanceServiceUpdateMaintenanceWindowRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.MaintenanceServiceAPI.MaintenanceServiceUpdateMaintenanceWindow(context.Background(), maintenanceWindowMaintenanceWindowId).OrgId(orgId).ProjectId(projectId).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
------------- | ------------- | ------------- | -------------

 **orgId** | **string** | Organization id | 
 **projectId** | **string** | Project id | 
 **maintenanceWindow** | [**MaintenanceServiceUpdateMaintenanceWindowRequest**](MaintenanceServiceUpdateMaintenanceWindowRequest.md) |  | 

### Return type

[**Dedicatedv1beta1MaintenanceWindow**](Dedicatedv1beta1MaintenanceWindow.md)

### Authorization

No authorization required

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

