1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getDbbrainSlowLogUserSqlAdvice
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getDbbrainSlowLogUserSqlAdvice

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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",
        product: "mysql",
        sqlText: "%s",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    test = tencentcloud.get_dbbrain_slow_log_user_sql_advice(instance_id="%s",
        product="mysql",
        sql_text="%s")
    
    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",
    			Product:    pulumi.StringRef("mysql"),
    			SqlText:    "%s",
    		}, 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",
            Product = "mysql",
            SqlText = "%s",
        });
    
    });
    
    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")
                .product("mysql")
                .sqlText("%s")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: tencentcloud:getDbbrainSlowLogUserSqlAdvice
          arguments:
            instanceId: '%s'
            product: mysql
            sqlText: '%s'
    

    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 dictionary

    The following arguments are supported:

    InstanceId string
    instance id.
    SqlText 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 is mysql.
    ResultOutputFile string
    Used to save results.
    Schema string
    library name.
    InstanceId string
    instance id.
    SqlText 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 is mysql.
    ResultOutputFile string
    Used to save results.
    Schema string
    library name.
    instanceId String
    instance id.
    sqlText 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 is mysql.
    resultOutputFile String
    Used to save results.
    schema String
    library name.
    instanceId string
    instance id.
    sqlText 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 is mysql.
    resultOutputFile string
    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 is mysql.
    result_output_file str
    Used to save results.
    schema str
    library name.
    instanceId String
    instance id.
    sqlText 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 is mysql.
    resultOutputFile String
    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
    InstanceId string
    RequestId string
    Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
    Schema string
    SqlPlan string
    The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
    SqlText string
    Tables string
    The DDL information of related tables can be parsed into a JSON array.
    Product string
    ResultOutputFile string
    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
    InstanceId string
    RequestId string
    Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
    Schema string
    SqlPlan string
    The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
    SqlText string
    Tables string
    The DDL information of related tables can be parsed into a JSON array.
    Product string
    ResultOutputFile string
    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
    instanceId String
    requestId String
    Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
    schema String
    sqlPlan String
    The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
    sqlText String
    tables String
    The DDL information of related tables can be parsed into a JSON array.
    product String
    resultOutputFile String
    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
    instanceId string
    requestId string
    Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
    schema string
    sqlPlan string
    The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
    sqlText string
    tables string
    The DDL information of related tables can be parsed into a JSON array.
    product string
    resultOutputFile string
    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_file str
    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
    instanceId String
    requestId String
    Unique request ID, returned for every request. The RequestId of the request needs to be provided when locating the problem.
    schema String
    sqlPlan String
    The SQL execution plan can be parsed into JSON, and the output is empty when no optimization is required.
    sqlText String
    tables String
    The DDL information of related tables can be parsed into a JSON array.
    product String
    resultOutputFile String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack