tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getDbbrainSlowLogUserSqlAdvice
Start a Neo task
Explain and create a tencentcloud.getDbbrainSlowLogUserSqlAdvice resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query detailed information of dbbrain slow_log_user_sql_advice
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const test = tencentcloud.getDbbrainSlowLogUserSqlAdvice({
instanceId: "%s",
sqlText: "%s",
product: "mysql",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
test = tencentcloud.get_dbbrain_slow_log_user_sql_advice(instance_id="%s",
sql_text="%s",
product="mysql")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetDbbrainSlowLogUserSqlAdvice(ctx, &tencentcloud.GetDbbrainSlowLogUserSqlAdviceArgs{
InstanceId: "%s",
SqlText: "%s",
Product: pulumi.StringRef("mysql"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var test = Tencentcloud.GetDbbrainSlowLogUserSqlAdvice.Invoke(new()
{
InstanceId = "%s",
SqlText = "%s",
Product = "mysql",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetDbbrainSlowLogUserSqlAdviceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = TencentcloudFunctions.getDbbrainSlowLogUserSqlAdvice(GetDbbrainSlowLogUserSqlAdviceArgs.builder()
.instanceId("%s")
.sqlText("%s")
.product("mysql")
.build());
}
}
variables:
test:
fn::invoke:
function: tencentcloud:getDbbrainSlowLogUserSqlAdvice
arguments:
instanceId: '%s'
sqlText: '%s'
product: mysql
Using getDbbrainSlowLogUserSqlAdvice
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDbbrainSlowLogUserSqlAdvice(args: GetDbbrainSlowLogUserSqlAdviceArgs, opts?: InvokeOptions): Promise<GetDbbrainSlowLogUserSqlAdviceResult>
function getDbbrainSlowLogUserSqlAdviceOutput(args: GetDbbrainSlowLogUserSqlAdviceOutputArgs, opts?: InvokeOptions): Output<GetDbbrainSlowLogUserSqlAdviceResult>def get_dbbrain_slow_log_user_sql_advice(id: Optional[str] = None,
instance_id: Optional[str] = None,
product: Optional[str] = None,
result_output_file: Optional[str] = None,
schema: Optional[str] = None,
sql_text: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDbbrainSlowLogUserSqlAdviceResult
def get_dbbrain_slow_log_user_sql_advice_output(id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
product: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
schema: Optional[pulumi.Input[str]] = None,
sql_text: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDbbrainSlowLogUserSqlAdviceResult]func GetDbbrainSlowLogUserSqlAdvice(ctx *Context, args *GetDbbrainSlowLogUserSqlAdviceArgs, opts ...InvokeOption) (*GetDbbrainSlowLogUserSqlAdviceResult, error)
func GetDbbrainSlowLogUserSqlAdviceOutput(ctx *Context, args *GetDbbrainSlowLogUserSqlAdviceOutputArgs, opts ...InvokeOption) GetDbbrainSlowLogUserSqlAdviceResultOutput> Note: This function is named GetDbbrainSlowLogUserSqlAdvice in the Go SDK.
public static class GetDbbrainSlowLogUserSqlAdvice
{
public static Task<GetDbbrainSlowLogUserSqlAdviceResult> InvokeAsync(GetDbbrainSlowLogUserSqlAdviceArgs args, InvokeOptions? opts = null)
public static Output<GetDbbrainSlowLogUserSqlAdviceResult> Invoke(GetDbbrainSlowLogUserSqlAdviceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDbbrainSlowLogUserSqlAdviceResult> getDbbrainSlowLogUserSqlAdvice(GetDbbrainSlowLogUserSqlAdviceArgs args, InvokeOptions options)
public static Output<GetDbbrainSlowLogUserSqlAdviceResult> getDbbrainSlowLogUserSqlAdvice(GetDbbrainSlowLogUserSqlAdviceArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getDbbrainSlowLogUserSqlAdvice:getDbbrainSlowLogUserSqlAdvice
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - instance id.
- Sql
Text string - SQL statements.
- Id string
- Product string
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - Result
Output stringFile - Used to save results.
- Schema string
- library name.
- Instance
Id string - instance id.
- Sql
Text string - SQL statements.
- Id string
- Product string
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - Result
Output stringFile - Used to save results.
- Schema string
- library name.
- instance
Id String - instance id.
- sql
Text String - SQL statements.
- id String
- product String
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - result
Output StringFile - Used to save results.
- schema String
- library name.
- instance
Id string - instance id.
- sql
Text string - SQL statements.
- id string
- product string
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - result
Output stringFile - Used to save results.
- schema string
- library name.
- instance_
id str - instance id.
- sql_
text str - SQL statements.
- id str
- product str
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - result_
output_ strfile - Used to save results.
- schema str
- library name.
- instance
Id String - instance id.
- sql
Text String - SQL statements.
- id String
- product String
- Service product type, supported values:
mysql- cloud database MySQL;cynosdb- cloud database TDSQL-C for MySQL;dbbrain-mysql- self-built MySQL, the default ismysql. - result
Output StringFile - Used to save results.
- schema String
- library name.
getDbbrainSlowLogUserSqlAdvice Result
The following output properties are available:
- Advices string
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- Comments string
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- Cost string
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- Id string
- Instance
Id string - Request
Id string - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- Schema string
- Sql
Plan string - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- Sql
Text string - Tables string
- The DDL information of related tables can be parsed into a JSON array.
- Product string
- Result
Output stringFile
- Advices string
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- Comments string
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- Cost string
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- Id string
- Instance
Id string - Request
Id string - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- Schema string
- Sql
Plan string - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- Sql
Text string - Tables string
- The DDL information of related tables can be parsed into a JSON array.
- Product string
- Result
Output stringFile
- advices String
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- comments String
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- cost String
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- id String
- instance
Id String - request
Id String - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- schema String
- sql
Plan String - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- sql
Text String - tables String
- The DDL information of related tables can be parsed into a JSON array.
- product String
- result
Output StringFile
- advices string
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- comments string
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- cost string
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- id string
- instance
Id string - request
Id string - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- schema string
- sql
Plan string - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- sql
Text string - tables string
- The DDL information of related tables can be parsed into a JSON array.
- product string
- result
Output stringFile
- advices str
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- comments str
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- cost str
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- id str
- instance_
id str - request_
id str - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- schema str
- sql_
plan str - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- sql_
text str - tables str
- The DDL information of related tables can be parsed into a JSON array.
- product str
- result_
output_ strfile
- advices String
- SQL optimization suggestion, which can be parsed into a JSON array, and the output is empty when no optimization is required.
- comments String
- SQL optimization suggestion remarks, which can be parsed into a String array, and the output is empty when optimization is not required.
- cost String
- The cost saving details after SQL optimization can be parsed as JSON, and the output is empty when no optimization is required.
- id String
- instance
Id String - request
Id String - Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
- schema String
- sql
Plan String - The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
- sql
Text String - tables String
- The DDL information of related tables can be parsed into a JSON array.
- product String
- result
Output StringFile
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
