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

tencentcloud.getMongodbInstanceSlowLog

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 mongodb instance_slow_log

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const instanceSlowLog = tencentcloud.getMongodbInstanceSlowLog({
        endTime: "2019-06-02 12:00:00",
        format: "json",
        instanceId: "cmgo-9d0p6umb",
        slowMS: 100,
        startTime: "2019-06-01 10:00:00",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    instance_slow_log = tencentcloud.get_mongodb_instance_slow_log(end_time="2019-06-02 12:00:00",
        format="json",
        instance_id="cmgo-9d0p6umb",
        slow_ms=100,
        start_time="2019-06-01 10: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.GetMongodbInstanceSlowLog(ctx, &tencentcloud.GetMongodbInstanceSlowLogArgs{
    			EndTime:    "2019-06-02 12:00:00",
    			Format:     pulumi.StringRef("json"),
    			InstanceId: "cmgo-9d0p6umb",
    			SlowMS:     100,
    			StartTime:  "2019-06-01 10: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 instanceSlowLog = Tencentcloud.GetMongodbInstanceSlowLog.Invoke(new()
        {
            EndTime = "2019-06-02 12:00:00",
            Format = "json",
            InstanceId = "cmgo-9d0p6umb",
            SlowMS = 100,
            StartTime = "2019-06-01 10: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.GetMongodbInstanceSlowLogArgs;
    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 instanceSlowLog = TencentcloudFunctions.getMongodbInstanceSlowLog(GetMongodbInstanceSlowLogArgs.builder()
                .endTime("2019-06-02 12:00:00")
                .format("json")
                .instanceId("cmgo-9d0p6umb")
                .slowMS(100)
                .startTime("2019-06-01 10:00:00")
                .build());
    
        }
    }
    
    variables:
      instanceSlowLog:
        fn::invoke:
          function: tencentcloud:getMongodbInstanceSlowLog
          arguments:
            endTime: 2019-06-02 12:00:00
            format: json
            instanceId: cmgo-9d0p6umb
            slowMS: 100
            startTime: 2019-06-01 10:00:00
    

    Using getMongodbInstanceSlowLog

    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 getMongodbInstanceSlowLog(args: GetMongodbInstanceSlowLogArgs, opts?: InvokeOptions): Promise<GetMongodbInstanceSlowLogResult>
    function getMongodbInstanceSlowLogOutput(args: GetMongodbInstanceSlowLogOutputArgs, opts?: InvokeOptions): Output<GetMongodbInstanceSlowLogResult>
    def get_mongodb_instance_slow_log(end_time: Optional[str] = None,
                                      format: Optional[str] = None,
                                      id: Optional[str] = None,
                                      instance_id: Optional[str] = None,
                                      result_output_file: Optional[str] = None,
                                      slow_ms: Optional[float] = None,
                                      start_time: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetMongodbInstanceSlowLogResult
    def get_mongodb_instance_slow_log_output(end_time: Optional[pulumi.Input[str]] = None,
                                      format: 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,
                                      slow_ms: Optional[pulumi.Input[float]] = None,
                                      start_time: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetMongodbInstanceSlowLogResult]
    func GetMongodbInstanceSlowLog(ctx *Context, args *GetMongodbInstanceSlowLogArgs, opts ...InvokeOption) (*GetMongodbInstanceSlowLogResult, error)
    func GetMongodbInstanceSlowLogOutput(ctx *Context, args *GetMongodbInstanceSlowLogOutputArgs, opts ...InvokeOption) GetMongodbInstanceSlowLogResultOutput

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

    public static class GetMongodbInstanceSlowLog 
    {
        public static Task<GetMongodbInstanceSlowLogResult> InvokeAsync(GetMongodbInstanceSlowLogArgs args, InvokeOptions? opts = null)
        public static Output<GetMongodbInstanceSlowLogResult> Invoke(GetMongodbInstanceSlowLogInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMongodbInstanceSlowLogResult> getMongodbInstanceSlowLog(GetMongodbInstanceSlowLogArgs args, InvokeOptions options)
    public static Output<GetMongodbInstanceSlowLogResult> getMongodbInstanceSlowLog(GetMongodbInstanceSlowLogArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMongodbInstanceSlowLog:getMongodbInstanceSlowLog
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndTime string
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    SlowMs double
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    StartTime string
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    Format string
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    Id string
    ResultOutputFile string
    Used to save results.
    EndTime string
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    SlowMs float64
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    StartTime string
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    Format string
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    Id string
    ResultOutputFile string
    Used to save results.
    endTime String
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    slowMs Double
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    startTime String
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    format String
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    id String
    resultOutputFile String
    Used to save results.
    endTime string
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    instanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    slowMs number
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    startTime string
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    format string
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    id string
    resultOutputFile string
    Used to save results.
    end_time str
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    instance_id str
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    slow_ms float
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    start_time str
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    format str
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    id str
    result_output_file str
    Used to save results.
    endTime String
    Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    slowMs Number
    Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
    startTime String
    Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
    format String
    Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
    id String
    resultOutputFile String
    Used to save results.

    getMongodbInstanceSlowLog Result

    The following output properties are available:

    EndTime string
    Id string
    InstanceId string
    SlowLogs List<string>
    details of slow logs.
    SlowMs double
    StartTime string
    Format string
    ResultOutputFile string
    EndTime string
    Id string
    InstanceId string
    SlowLogs []string
    details of slow logs.
    SlowMs float64
    StartTime string
    Format string
    ResultOutputFile string
    endTime String
    id String
    instanceId String
    slowLogs List<String>
    details of slow logs.
    slowMs Double
    startTime String
    format String
    resultOutputFile String
    endTime string
    id string
    instanceId string
    slowLogs string[]
    details of slow logs.
    slowMs number
    startTime string
    format string
    resultOutputFile string
    end_time str
    id str
    instance_id str
    slow_logs Sequence[str]
    details of slow logs.
    slow_ms float
    start_time str
    format str
    result_output_file str
    endTime String
    id String
    instanceId String
    slowLogs List<String>
    details of slow logs.
    slowMs Number
    startTime String
    format 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