Method: instances.truncateLog

Truncate MySQL general and slow query log tables MySQL only.

HTTP request

POST https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID of the Cloud SQL project.

instance

string

Cloud SQL instance ID. This does not include the project ID.

Request body

The request body contains an instance of InstancesTruncateLogRequest .

Response body

If successful, the response body contains an instance of Operation .

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/sqlservice.admin

For more information, see the Authentication Overview.

InstancesTruncateLogRequest

Instance truncate log request.

JSON representation
{
 "truncateLogContext": {
 object (TruncateLogContext )
 }
}
Fields
truncateLogContext

object (TruncateLogContext )

Contains details about the truncate log operation.

TruncateLogContext

Database Instance truncate log context.

JSON representation
{
 "kind": string,
 "logType": string
}
Fields
kind

string

This is always sql#truncateLogContext.

logType

string

The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and MYSQL_SLOW_TABLE.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月24日 UTC.