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

tencentcloud.getMysqlSlowLog

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 mysql slow_log

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const slowLog = tencentcloud.getMysqlSlowLog({
        instanceId: "cdb-fitq5t9h",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    slow_log = tencentcloud.get_mysql_slow_log(instance_id="cdb-fitq5t9h")
    
    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.GetMysqlSlowLog(ctx, &tencentcloud.GetMysqlSlowLogArgs{
    			InstanceId: "cdb-fitq5t9h",
    		}, 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 slowLog = Tencentcloud.GetMysqlSlowLog.Invoke(new()
        {
            InstanceId = "cdb-fitq5t9h",
        });
    
    });
    
    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.GetMysqlSlowLogArgs;
    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 slowLog = TencentcloudFunctions.getMysqlSlowLog(GetMysqlSlowLogArgs.builder()
                .instanceId("cdb-fitq5t9h")
                .build());
    
        }
    }
    
    variables:
      slowLog:
        fn::invoke:
          function: tencentcloud:getMysqlSlowLog
          arguments:
            instanceId: cdb-fitq5t9h
    

    Using getMysqlSlowLog

    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 getMysqlSlowLog(args: GetMysqlSlowLogArgs, opts?: InvokeOptions): Promise<GetMysqlSlowLogResult>
    function getMysqlSlowLogOutput(args: GetMysqlSlowLogOutputArgs, opts?: InvokeOptions): Output<GetMysqlSlowLogResult>
    def get_mysql_slow_log(id: Optional[str] = None,
                           instance_id: Optional[str] = None,
                           result_output_file: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetMysqlSlowLogResult
    def get_mysql_slow_log_output(id: Optional[pulumi.Input[str]] = None,
                           instance_id: Optional[pulumi.Input[str]] = None,
                           result_output_file: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetMysqlSlowLogResult]
    func GetMysqlSlowLog(ctx *Context, args *GetMysqlSlowLogArgs, opts ...InvokeOption) (*GetMysqlSlowLogResult, error)
    func GetMysqlSlowLogOutput(ctx *Context, args *GetMysqlSlowLogOutputArgs, opts ...InvokeOption) GetMysqlSlowLogResultOutput

    > Note: This function is named GetMysqlSlowLog in the Go SDK.

    public static class GetMysqlSlowLog 
    {
        public static Task<GetMysqlSlowLogResult> InvokeAsync(GetMysqlSlowLogArgs args, InvokeOptions? opts = null)
        public static Output<GetMysqlSlowLogResult> Invoke(GetMysqlSlowLogInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMysqlSlowLogResult> getMysqlSlowLog(GetMysqlSlowLogArgs args, InvokeOptions options)
    public static Output<GetMysqlSlowLogResult> getMysqlSlowLog(GetMysqlSlowLogArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMysqlSlowLog:getMysqlSlowLog
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    Id string
    ResultOutputFile string
    Used to save results.
    InstanceId string
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    Id string
    ResultOutputFile string
    Used to save results.
    instanceId String
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    id String
    resultOutputFile String
    Used to save results.
    instanceId string
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    id string
    resultOutputFile string
    Used to save results.
    instance_id str
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    id str
    result_output_file str
    Used to save results.
    instanceId String
    Instance ID, in the format: cdb-c1nl9rpv. Same instance ID as displayed in the ApsaraDB for Console page.
    id String
    resultOutputFile String
    Used to save results.

    getMysqlSlowLog Result

    The following output properties are available:

    Id string
    InstanceId string
    Items List<GetMysqlSlowLogItem>
    Details of slow query logs that meet the query conditions.
    ResultOutputFile string
    Id string
    InstanceId string
    Items []GetMysqlSlowLogItem
    Details of slow query logs that meet the query conditions.
    ResultOutputFile string
    id String
    instanceId String
    items List<GetMysqlSlowLogItem>
    Details of slow query logs that meet the query conditions.
    resultOutputFile String
    id string
    instanceId string
    items GetMysqlSlowLogItem[]
    Details of slow query logs that meet the query conditions.
    resultOutputFile string
    id str
    instance_id str
    items Sequence[GetMysqlSlowLogItem]
    Details of slow query logs that meet the query conditions.
    result_output_file str
    id String
    instanceId String
    items List<Property Map>
    Details of slow query logs that meet the query conditions.
    resultOutputFile String

    Supporting Types

    GetMysqlSlowLogItem

    Date string
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    InternetUrl string
    External network download address.
    IntranetUrl string
    Intranet download address.
    Name string
    backup file name.
    Size double
    Backup file size, unit: Byte.
    Type string
    Log specific type, possible values: slowlog - slow log.
    Date string
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    InternetUrl string
    External network download address.
    IntranetUrl string
    Intranet download address.
    Name string
    backup file name.
    Size float64
    Backup file size, unit: Byte.
    Type string
    Log specific type, possible values: slowlog - slow log.
    date String
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    internetUrl String
    External network download address.
    intranetUrl String
    Intranet download address.
    name String
    backup file name.
    size Double
    Backup file size, unit: Byte.
    type String
    Log specific type, possible values: slowlog - slow log.
    date string
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    internetUrl string
    External network download address.
    intranetUrl string
    Intranet download address.
    name string
    backup file name.
    size number
    Backup file size, unit: Byte.
    type string
    Log specific type, possible values: slowlog - slow log.
    date str
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    internet_url str
    External network download address.
    intranet_url str
    Intranet download address.
    name str
    backup file name.
    size float
    Backup file size, unit: Byte.
    type str
    Log specific type, possible values: slowlog - slow log.
    date String
    Backup snapshot time, time format: 2016-03-17 02:10:37.
    internetUrl String
    External network download address.
    intranetUrl String
    Intranet download address.
    name String
    backup file name.
    size Number
    Backup file size, unit: Byte.
    type String
    Log specific type, possible values: slowlog - slow log.

    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