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

tencentcloud.getSqlserverSlowlogs

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 sqlserver slowlogs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSqlserverSlowlogs({
        endTime: "2023-08-07 00:00:00",
        instanceId: "mssql-qelbzgwf",
        startTime: "2023-08-01 00:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_sqlserver_slowlogs(end_time="2023-08-07 00:00:00",
        instance_id="mssql-qelbzgwf",
        start_time="2023-08-01 00:00:00")
    
    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.GetSqlserverSlowlogs(ctx, &tencentcloud.GetSqlserverSlowlogsArgs{
    			EndTime:    "2023-08-07 00:00:00",
    			InstanceId: "mssql-qelbzgwf",
    			StartTime:  "2023-08-01 00:00:00",
    		}, 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 example = Tencentcloud.GetSqlserverSlowlogs.Invoke(new()
        {
            EndTime = "2023-08-07 00:00:00",
            InstanceId = "mssql-qelbzgwf",
            StartTime = "2023-08-01 00:00:00",
        });
    
    });
    
    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.GetSqlserverSlowlogsArgs;
    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 example = TencentcloudFunctions.getSqlserverSlowlogs(GetSqlserverSlowlogsArgs.builder()
                .endTime("2023-08-07 00:00:00")
                .instanceId("mssql-qelbzgwf")
                .startTime("2023-08-01 00:00:00")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSqlserverSlowlogs
          arguments:
            endTime: 2023-08-07 00:00:00
            instanceId: mssql-qelbzgwf
            startTime: 2023-08-01 00:00:00
    

    Using getSqlserverSlowlogs

    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 getSqlserverSlowlogs(args: GetSqlserverSlowlogsArgs, opts?: InvokeOptions): Promise<GetSqlserverSlowlogsResult>
    function getSqlserverSlowlogsOutput(args: GetSqlserverSlowlogsOutputArgs, opts?: InvokeOptions): Output<GetSqlserverSlowlogsResult>
    def get_sqlserver_slowlogs(end_time: Optional[str] = None,
                               id: Optional[str] = None,
                               instance_id: Optional[str] = None,
                               result_output_file: Optional[str] = None,
                               start_time: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetSqlserverSlowlogsResult
    def get_sqlserver_slowlogs_output(end_time: Optional[pulumi.Input[str]] = None,
                               id: Optional[pulumi.Input[str]] = None,
                               instance_id: Optional[pulumi.Input[str]] = None,
                               result_output_file: Optional[pulumi.Input[str]] = None,
                               start_time: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetSqlserverSlowlogsResult]
    func GetSqlserverSlowlogs(ctx *Context, args *GetSqlserverSlowlogsArgs, opts ...InvokeOption) (*GetSqlserverSlowlogsResult, error)
    func GetSqlserverSlowlogsOutput(ctx *Context, args *GetSqlserverSlowlogsOutputArgs, opts ...InvokeOption) GetSqlserverSlowlogsResultOutput

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

    public static class GetSqlserverSlowlogs 
    {
        public static Task<GetSqlserverSlowlogsResult> InvokeAsync(GetSqlserverSlowlogsArgs args, InvokeOptions? opts = null)
        public static Output<GetSqlserverSlowlogsResult> Invoke(GetSqlserverSlowlogsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSqlserverSlowlogsResult> getSqlserverSlowlogs(GetSqlserverSlowlogsArgs args, InvokeOptions options)
    public static Output<GetSqlserverSlowlogsResult> getSqlserverSlowlogs(GetSqlserverSlowlogsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getSqlserverSlowlogs:getSqlserverSlowlogs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndTime string
    Query end time.
    InstanceId string
    Instance ID.
    StartTime string
    Query start time.
    Id string
    Unique ID of slow query log file.
    ResultOutputFile string
    Used to save results.
    EndTime string
    Query end time.
    InstanceId string
    Instance ID.
    StartTime string
    Query start time.
    Id string
    Unique ID of slow query log file.
    ResultOutputFile string
    Used to save results.
    endTime String
    Query end time.
    instanceId String
    Instance ID.
    startTime String
    Query start time.
    id String
    Unique ID of slow query log file.
    resultOutputFile String
    Used to save results.
    endTime string
    Query end time.
    instanceId string
    Instance ID.
    startTime string
    Query start time.
    id string
    Unique ID of slow query log file.
    resultOutputFile string
    Used to save results.
    end_time str
    Query end time.
    instance_id str
    Instance ID.
    start_time str
    Query start time.
    id str
    Unique ID of slow query log file.
    result_output_file str
    Used to save results.
    endTime String
    Query end time.
    instanceId String
    Instance ID.
    startTime String
    Query start time.
    id String
    Unique ID of slow query log file.
    resultOutputFile String
    Used to save results.

    getSqlserverSlowlogs Result

    The following output properties are available:

    EndTime string
    File generation end time.
    Id string
    Unique ID of slow query log file.
    InstanceId string
    Slowlogs List<GetSqlserverSlowlogsSlowlog>
    Information list of slow query logs.
    StartTime string
    File generation start time.
    ResultOutputFile string
    EndTime string
    File generation end time.
    Id string
    Unique ID of slow query log file.
    InstanceId string
    Slowlogs []GetSqlserverSlowlogsSlowlog
    Information list of slow query logs.
    StartTime string
    File generation start time.
    ResultOutputFile string
    endTime String
    File generation end time.
    id String
    Unique ID of slow query log file.
    instanceId String
    slowlogs List<GetSqlserverSlowlogsSlowlog>
    Information list of slow query logs.
    startTime String
    File generation start time.
    resultOutputFile String
    endTime string
    File generation end time.
    id string
    Unique ID of slow query log file.
    instanceId string
    slowlogs GetSqlserverSlowlogsSlowlog[]
    Information list of slow query logs.
    startTime string
    File generation start time.
    resultOutputFile string
    end_time str
    File generation end time.
    id str
    Unique ID of slow query log file.
    instance_id str
    slowlogs Sequence[GetSqlserverSlowlogsSlowlog]
    Information list of slow query logs.
    start_time str
    File generation start time.
    result_output_file str
    endTime String
    File generation end time.
    id String
    Unique ID of slow query log file.
    instanceId String
    slowlogs List<Property Map>
    Information list of slow query logs.
    startTime String
    File generation start time.
    resultOutputFile String

    Supporting Types

    GetSqlserverSlowlogsSlowlog

    Count double
    Number of logs in file.
    EndTime string
    Query end time.
    ExternalAddr string
    Download address for public network.
    Id double
    Unique ID of slow query log file.
    InternalAddr string
    Download address for private network.
    Size double
    File size in KB.
    StartTime string
    Query start time.
    Status double
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.
    Count float64
    Number of logs in file.
    EndTime string
    Query end time.
    ExternalAddr string
    Download address for public network.
    Id float64
    Unique ID of slow query log file.
    InternalAddr string
    Download address for private network.
    Size float64
    File size in KB.
    StartTime string
    Query start time.
    Status float64
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.
    count Double
    Number of logs in file.
    endTime String
    Query end time.
    externalAddr String
    Download address for public network.
    id Double
    Unique ID of slow query log file.
    internalAddr String
    Download address for private network.
    size Double
    File size in KB.
    startTime String
    Query start time.
    status Double
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.
    count number
    Number of logs in file.
    endTime string
    Query end time.
    externalAddr string
    Download address for public network.
    id number
    Unique ID of slow query log file.
    internalAddr string
    Download address for private network.
    size number
    File size in KB.
    startTime string
    Query start time.
    status number
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.
    count float
    Number of logs in file.
    end_time str
    Query end time.
    external_addr str
    Download address for public network.
    id float
    Unique ID of slow query log file.
    internal_addr str
    Download address for private network.
    size float
    File size in KB.
    start_time str
    Query start time.
    status float
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.
    count Number
    Number of logs in file.
    endTime String
    Query end time.
    externalAddr String
    Download address for public network.
    id Number
    Unique ID of slow query log file.
    internalAddr String
    Download address for private network.
    size Number
    File size in KB.
    startTime String
    Query start time.
    status Number
    Status (1: success, 2: failure) Note: this field may return null, indicating that no valid values can be obtained.

    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