tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getMongodbInstanceSlowLog
Start a Neo task
Explain and create a tencentcloud.getMongodbInstanceSlowLog resource
tencentcloud 1.82.35 published on Friday, Nov 7, 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({
instanceId: "cmgo-9d0p6umb",
startTime: "2019-06-01 10:00:00",
endTime: "2019-06-02 12:00:00",
slowMS: 100,
format: "json",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
instance_slow_log = tencentcloud.get_mongodb_instance_slow_log(instance_id="cmgo-9d0p6umb",
start_time="2019-06-01 10:00:00",
end_time="2019-06-02 12:00:00",
slow_ms=100,
format="json")
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{
InstanceId: "cmgo-9d0p6umb",
StartTime: "2019-06-01 10:00:00",
EndTime: "2019-06-02 12:00:00",
SlowMS: 100,
Format: pulumi.StringRef("json"),
}, 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()
{
InstanceId = "cmgo-9d0p6umb",
StartTime = "2019-06-01 10:00:00",
EndTime = "2019-06-02 12:00:00",
SlowMS = 100,
Format = "json",
});
});
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()
.instanceId("cmgo-9d0p6umb")
.startTime("2019-06-01 10:00:00")
.endTime("2019-06-02 12:00:00")
.slowMS(100)
.format("json")
.build());
}
}
variables:
instanceSlowLog:
fn::invoke:
function: tencentcloud:getMongodbInstanceSlowLog
arguments:
instanceId: cmgo-9d0p6umb
startTime: 2019-06-01 10:00:00
endTime: 2019-06-02 12:00:00
slowMS: 100
format: json
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 dictionaryThe following arguments are supported:
- End
Time 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.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Slow
Ms 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.
- Start
Time 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
- Result
Output stringFile - Used to save results.
- End
Time 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.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Slow
Ms 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.
- Start
Time 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
- Result
Output stringFile - Used to save results.
- end
Time 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.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- slow
Ms 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.
- start
Time 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
- result
Output StringFile - Used to save results.
- end
Time 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.
- instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- slow
Ms 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.
- start
Time 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
- result
Output stringFile - 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_ strfile - Used to save results.
- end
Time 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.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- slow
Ms 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.
- start
Time 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
- result
Output StringFile - Used to save results.
getMongodbInstanceSlowLog Result
The following output properties are available:
- End
Time string - Id string
- Instance
Id string - Slow
Logs List<string> - details of slow logs.
- Slow
Ms double - Start
Time string - Format string
- Result
Output stringFile
- End
Time string - Id string
- Instance
Id string - Slow
Logs []string - details of slow logs.
- Slow
Ms float64 - Start
Time string - Format string
- Result
Output stringFile
- end
Time String - id String
- instance
Id String - slow
Logs List<String> - details of slow logs.
- slow
Ms Double - start
Time String - format String
- result
Output StringFile
- end
Time string - id string
- instance
Id string - slow
Logs string[] - details of slow logs.
- slow
Ms number - start
Time string - format string
- result
Output stringFile
- 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_ strfile
- end
Time String - id String
- instance
Id String - slow
Logs List<String> - details of slow logs.
- slow
Ms Number - start
Time String - format 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.35 published on Friday, Nov 7, 2025 by tencentcloudstack
