# \DatabaseAuditLogServiceAPI

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**DatabaseAuditLogServiceCreateAuditLogConfig**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceCreateAuditLogConfig) | **Post** /clusters/{auditLogConfig.clusterId}/auditLogConfig | Create the audit log config for a cluster
[**DatabaseAuditLogServiceCreateAuditLogFilterRule**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceCreateAuditLogFilterRule) | **Post** /clusters/{auditLogFilterRule.clusterId}/auditLogFilterRules | Create an audit log filter rule
[**DatabaseAuditLogServiceDeleteAuditLogFilterRule**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceDeleteAuditLogFilterRule) | **Delete** /clusters/{clusterId}/auditLogFilterRules/{auditLogFilterRuleId} | Delete an audit log filter rule
[**DatabaseAuditLogServiceGetAuditLogConfig**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceGetAuditLogConfig) | **Get** /clusters/{clusterId}/auditLogConfig | Get the audit log config of a cluster
[**DatabaseAuditLogServiceGetAuditLogFilterRule**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceGetAuditLogFilterRule) | **Get** /clusters/{clusterId}/auditLogFilterRules/{auditLogFilterRuleId} | Get an audit log filter rule
[**DatabaseAuditLogServiceListAuditLogFilterRules**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceListAuditLogFilterRules) | **Get** /clusters/{clusterId}/auditLogFilterRules | List audit log filter rules
[**DatabaseAuditLogServiceShowObjectStorageAccessIamPrincipal**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceShowObjectStorageAccessIamPrincipal) | **Get** /clusters/{clusterId}/auditLogConfiguration:showObjectStorageAccessIamPrincipal | Show IAM principal of TiDB Cloud for accessing customer&#39;s object storage
[**DatabaseAuditLogServiceUpdateAuditLogConfig**](DatabaseAuditLogServiceAPI.md#DatabaseAuditLogServiceUpdateAuditLogConfig) | **Patch** /clusters/{auditLogConfig.clusterId}/auditLogConfig | Update the audit log config of a cluster



## DatabaseAuditLogServiceCreateAuditLogConfig

> Dedicatedv1beta1AuditLogConfig DatabaseAuditLogServiceCreateAuditLogConfig(ctx, auditLogConfigClusterId).AuditLogConfig(auditLogConfig).ValidateOnly(validateOnly).Execute()

Create the audit log config for a cluster

### Example

```go
package main

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

func main() {
	auditLogConfigClusterId := "auditLogConfigClusterId_example" // string | 
	auditLogConfig := *openapiclient.NewDatabaseAuditLogServiceCreateAuditLogConfigRequest("BucketUri_example") // DatabaseAuditLogServiceCreateAuditLogConfigRequest | 
	validateOnly := true // bool |  (optional)

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

### Path Parameters


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

### Other Parameters

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


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

 **auditLogConfig** | [**DatabaseAuditLogServiceCreateAuditLogConfigRequest**](DatabaseAuditLogServiceCreateAuditLogConfigRequest.md) |  | 
 **validateOnly** | **bool** |  | 

### Return type

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


## DatabaseAuditLogServiceCreateAuditLogFilterRule

> V1beta1AuditLogFilterRule DatabaseAuditLogServiceCreateAuditLogFilterRule(ctx, auditLogFilterRuleClusterId).AuditLogFilterRule(auditLogFilterRule).Execute()

Create an audit log filter rule

### Example

```go
package main

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

func main() {
	auditLogFilterRuleClusterId := "auditLogFilterRuleClusterId_example" // string | 
	auditLogFilterRule := *openapiclient.NewDatabaseAuditLogServiceCreateAuditLogFilterRuleRequest() // DatabaseAuditLogServiceCreateAuditLogFilterRuleRequest | 

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

### Path Parameters


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

### Other Parameters

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


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

 **auditLogFilterRule** | [**DatabaseAuditLogServiceCreateAuditLogFilterRuleRequest**](DatabaseAuditLogServiceCreateAuditLogFilterRuleRequest.md) |  | 

### Return type

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


## DatabaseAuditLogServiceDeleteAuditLogFilterRule

> map[string]interface{} DatabaseAuditLogServiceDeleteAuditLogFilterRule(ctx, clusterId, auditLogFilterRuleId).Execute()

Delete an audit log filter rule

### Example

```go
package main

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

func main() {
	clusterId := "clusterId_example" // string | 
	auditLogFilterRuleId := "auditLogFilterRuleId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


## DatabaseAuditLogServiceGetAuditLogConfig

> Dedicatedv1beta1AuditLogConfig DatabaseAuditLogServiceGetAuditLogConfig(ctx, clusterId).Execute()

Get the audit log config of a cluster

### Example

```go
package main

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

func main() {
	clusterId := "clusterId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## DatabaseAuditLogServiceGetAuditLogFilterRule

> V1beta1AuditLogFilterRule DatabaseAuditLogServiceGetAuditLogFilterRule(ctx, clusterId, auditLogFilterRuleId).Execute()

Get an audit log filter rule

### Example

```go
package main

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

func main() {
	clusterId := "clusterId_example" // string | 
	auditLogFilterRuleId := "auditLogFilterRuleId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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



### Return type

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


## DatabaseAuditLogServiceListAuditLogFilterRules

> V1beta1ListAuditLogFilterRulesResponse DatabaseAuditLogServiceListAuditLogFilterRules(ctx, clusterId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()

List audit log filter rules

### Example

```go
package main

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

func main() {
	clusterId := "clusterId_example" // string | 
	pageSize := int32(56) // int32 |  (optional)
	pageToken := "pageToken_example" // string |  (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.DatabaseAuditLogServiceAPI.DatabaseAuditLogServiceListAuditLogFilterRules(context.Background(), clusterId).PageSize(pageSize).PageToken(pageToken).Skip(skip).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabaseAuditLogServiceAPI.DatabaseAuditLogServiceListAuditLogFilterRules``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DatabaseAuditLogServiceListAuditLogFilterRules`: V1beta1ListAuditLogFilterRulesResponse
	fmt.Fprintf(os.Stdout, "Response from `DatabaseAuditLogServiceAPI.DatabaseAuditLogServiceListAuditLogFilterRules`: %v\n", resp)
}
```

### Path Parameters


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

### Other Parameters

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


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

 **pageSize** | **int32** |  | 
 **pageToken** | **string** |  | 
 **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

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


## DatabaseAuditLogServiceShowObjectStorageAccessIamPrincipal

> V1beta1ShowObjectStorageAccessIamPrincipalResponse DatabaseAuditLogServiceShowObjectStorageAccessIamPrincipal(ctx, clusterId).Execute()

Show IAM principal of TiDB Cloud for accessing customer's object storage

### Example

```go
package main

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

func main() {
	clusterId := "clusterId_example" // string | 

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

### Path Parameters


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

### Other Parameters

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


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


### Return type

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


## DatabaseAuditLogServiceUpdateAuditLogConfig

> Dedicatedv1beta1AuditLogConfig DatabaseAuditLogServiceUpdateAuditLogConfig(ctx, auditLogConfigClusterId).AuditLogConfig(auditLogConfig).ValidateOnly(validateOnly).Execute()

Update the audit log config of a cluster

### Example

```go
package main

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

func main() {
	auditLogConfigClusterId := "auditLogConfigClusterId_example" // string | 
	auditLogConfig := *openapiclient.NewDatabaseAuditLogServiceUpdateAuditLogConfigRequest() // DatabaseAuditLogServiceUpdateAuditLogConfigRequest | 
	validateOnly := true // bool |  (optional)

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

### Path Parameters


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

### Other Parameters

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


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

 **auditLogConfig** | [**DatabaseAuditLogServiceUpdateAuditLogConfigRequest**](DatabaseAuditLogServiceUpdateAuditLogConfigRequest.md) |  | 
 **validateOnly** | **bool** |  | 

### Return type

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

