tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getMysqlSlowLogData
Start a Neo task
Explain and create a tencentcloud.getMysqlSlowLogData resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query detailed information of mysql slow_log_data
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const slowLogData = tencentcloud.getMysqlSlowLogData({
instanceId: "cdb-fitq5t9h",
startTime: 1682664459,
endTime: 1684392459,
userHosts: ["169.254.128.158"],
userNames: ["keep_dts"],
dataBases: ["tf_ci_test"],
sortBy: "Timestamp",
orderBy: "ASC",
instType: "slave",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
slow_log_data = tencentcloud.get_mysql_slow_log_data(instance_id="cdb-fitq5t9h",
start_time=1682664459,
end_time=1684392459,
user_hosts=["169.254.128.158"],
user_names=["keep_dts"],
data_bases=["tf_ci_test"],
sort_by="Timestamp",
order_by="ASC",
inst_type="slave")
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.GetMysqlSlowLogData(ctx, &tencentcloud.GetMysqlSlowLogDataArgs{
InstanceId: "cdb-fitq5t9h",
StartTime: 1682664459,
EndTime: 1684392459,
UserHosts: []string{
"169.254.128.158",
},
UserNames: []string{
"keep_dts",
},
DataBases: []string{
"tf_ci_test",
},
SortBy: pulumi.StringRef("Timestamp"),
OrderBy: pulumi.StringRef("ASC"),
InstType: pulumi.StringRef("slave"),
}, 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 slowLogData = Tencentcloud.GetMysqlSlowLogData.Invoke(new()
{
InstanceId = "cdb-fitq5t9h",
StartTime = 1682664459,
EndTime = 1684392459,
UserHosts = new[]
{
"169.254.128.158",
},
UserNames = new[]
{
"keep_dts",
},
DataBases = new[]
{
"tf_ci_test",
},
SortBy = "Timestamp",
OrderBy = "ASC",
InstType = "slave",
});
});
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.GetMysqlSlowLogDataArgs;
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 slowLogData = TencentcloudFunctions.getMysqlSlowLogData(GetMysqlSlowLogDataArgs.builder()
.instanceId("cdb-fitq5t9h")
.startTime(1682664459)
.endTime(1684392459)
.userHosts("169.254.128.158")
.userNames("keep_dts")
.dataBases("tf_ci_test")
.sortBy("Timestamp")
.orderBy("ASC")
.instType("slave")
.build());
}
}
variables:
slowLogData:
fn::invoke:
function: tencentcloud:getMysqlSlowLogData
arguments:
instanceId: cdb-fitq5t9h
startTime: 1.682664459e+09
endTime: 1.684392459e+09
userHosts:
- 169.254.128.158
userNames:
- keep_dts
dataBases:
- tf_ci_test
sortBy: Timestamp
orderBy: ASC
instType: slave
Using getMysqlSlowLogData
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 getMysqlSlowLogData(args: GetMysqlSlowLogDataArgs, opts?: InvokeOptions): Promise<GetMysqlSlowLogDataResult>
function getMysqlSlowLogDataOutput(args: GetMysqlSlowLogDataOutputArgs, opts?: InvokeOptions): Output<GetMysqlSlowLogDataResult>def get_mysql_slow_log_data(data_bases: Optional[Sequence[str]] = None,
end_time: Optional[float] = None,
id: Optional[str] = None,
inst_type: Optional[str] = None,
instance_id: Optional[str] = None,
order_by: Optional[str] = None,
result_output_file: Optional[str] = None,
sort_by: Optional[str] = None,
start_time: Optional[float] = None,
user_hosts: Optional[Sequence[str]] = None,
user_names: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetMysqlSlowLogDataResult
def get_mysql_slow_log_data_output(data_bases: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
end_time: Optional[pulumi.Input[float]] = None,
id: Optional[pulumi.Input[str]] = None,
inst_type: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
sort_by: Optional[pulumi.Input[str]] = None,
start_time: Optional[pulumi.Input[float]] = None,
user_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
user_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMysqlSlowLogDataResult]func GetMysqlSlowLogData(ctx *Context, args *GetMysqlSlowLogDataArgs, opts ...InvokeOption) (*GetMysqlSlowLogDataResult, error)
func GetMysqlSlowLogDataOutput(ctx *Context, args *GetMysqlSlowLogDataOutputArgs, opts ...InvokeOption) GetMysqlSlowLogDataResultOutput> Note: This function is named GetMysqlSlowLogData in the Go SDK.
public static class GetMysqlSlowLogData
{
public static Task<GetMysqlSlowLogDataResult> InvokeAsync(GetMysqlSlowLogDataArgs args, InvokeOptions? opts = null)
public static Output<GetMysqlSlowLogDataResult> Invoke(GetMysqlSlowLogDataInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMysqlSlowLogDataResult> getMysqlSlowLogData(GetMysqlSlowLogDataArgs args, InvokeOptions options)
public static Output<GetMysqlSlowLogDataResult> getMysqlSlowLogData(GetMysqlSlowLogDataArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getMysqlSlowLogData:getMysqlSlowLogData
arguments:
# arguments dictionaryThe following arguments are supported:
- End
Time double - End timestamp. For example 1585142640.
- Instance
Id string - instance id.
- Start
Time double - Start timestamp. For example 1585142640.
- Data
Bases List<string> - List of databases accessed.
- Id string
- Inst
Type string - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- Order
By string - Sort in ascending or descending order. Currently supported: ASC,DESC.
- Result
Output stringFile - Used to save results.
- Sort
By string - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- User
Hosts List<string> - List of client hosts.
- User
Names List<string> - A list of client usernames.
- End
Time float64 - End timestamp. For example 1585142640.
- Instance
Id string - instance id.
- Start
Time float64 - Start timestamp. For example 1585142640.
- Data
Bases []string - List of databases accessed.
- Id string
- Inst
Type string - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- Order
By string - Sort in ascending or descending order. Currently supported: ASC,DESC.
- Result
Output stringFile - Used to save results.
- Sort
By string - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- User
Hosts []string - List of client hosts.
- User
Names []string - A list of client usernames.
- end
Time Double - End timestamp. For example 1585142640.
- instance
Id String - instance id.
- start
Time Double - Start timestamp. For example 1585142640.
- data
Bases List<String> - List of databases accessed.
- id String
- inst
Type String - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- order
By String - Sort in ascending or descending order. Currently supported: ASC,DESC.
- result
Output StringFile - Used to save results.
- sort
By String - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- user
Hosts List<String> - List of client hosts.
- user
Names List<String> - A list of client usernames.
- end
Time number - End timestamp. For example 1585142640.
- instance
Id string - instance id.
- start
Time number - Start timestamp. For example 1585142640.
- data
Bases string[] - List of databases accessed.
- id string
- inst
Type string - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- order
By string - Sort in ascending or descending order. Currently supported: ASC,DESC.
- result
Output stringFile - Used to save results.
- sort
By string - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- user
Hosts string[] - List of client hosts.
- user
Names string[] - A list of client usernames.
- end_
time float - End timestamp. For example 1585142640.
- instance_
id str - instance id.
- start_
time float - Start timestamp. For example 1585142640.
- data_
bases Sequence[str] - List of databases accessed.
- id str
- inst_
type str - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- order_
by str - Sort in ascending or descending order. Currently supported: ASC,DESC.
- result_
output_ strfile - Used to save results.
- sort_
by str - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- user_
hosts Sequence[str] - List of client hosts.
- user_
names Sequence[str] - A list of client usernames.
- end
Time Number - End timestamp. For example 1585142640.
- instance
Id String - instance id.
- start
Time Number - Start timestamp. For example 1585142640.
- data
Bases List<String> - List of databases accessed.
- id String
- inst
Type String - Only valid when the instance is the master instance or disaster recovery instance, the optional value: slave, which means to pull the log of the slave machine.
- order
By String - Sort in ascending or descending order. Currently supported: ASC,DESC.
- result
Output StringFile - Used to save results.
- sort
By String - Sort field. Currently supported: Timestamp, QueryTime, LockTime, RowsExamined, RowsSent.
- user
Hosts List<String> - List of client hosts.
- user
Names List<String> - A list of client usernames.
getMysqlSlowLogData Result
The following output properties are available:
- End
Time double - Id string
- Instance
Id string - Items
List<Get
Mysql Slow Log Data Item> - Query records.
- Start
Time double - Data
Bases List<string> - Inst
Type string - Order
By string - Result
Output stringFile - Sort
By string - User
Hosts List<string> - User
Names List<string>
- End
Time float64 - Id string
- Instance
Id string - Items
[]Get
Mysql Slow Log Data Item - Query records.
- Start
Time float64 - Data
Bases []string - Inst
Type string - Order
By string - Result
Output stringFile - Sort
By string - User
Hosts []string - User
Names []string
- end
Time Double - id String
- instance
Id String - items
List<Get
Mysql Slow Log Data Item> - Query records.
- start
Time Double - data
Bases List<String> - inst
Type String - order
By String - result
Output StringFile - sort
By String - user
Hosts List<String> - user
Names List<String>
- end
Time number - id string
- instance
Id string - items
Get
Mysql Slow Log Data Item[] - Query records.
- start
Time number - data
Bases string[] - inst
Type string - order
By string - result
Output stringFile - sort
By string - user
Hosts string[] - user
Names string[]
- end_
time float - id str
- instance_
id str - items
Sequence[Get
Mysql Slow Log Data Item] - Query records.
- start_
time float - data_
bases Sequence[str] - inst_
type str - order_
by str - result_
output_ strfile - sort_
by str - user_
hosts Sequence[str] - user_
names Sequence[str]
- end
Time Number - id String
- instance
Id String - items List<Property Map>
- Query records.
- start
Time Number - data
Bases List<String> - inst
Type String - order
By String - result
Output StringFile - sort
By String - user
Hosts List<String> - user
Names List<String>
Supporting Types
GetMysqlSlowLogDataItem
- Database string
- database name.
- Lock
Time double - Lock duration (seconds).
- Md5 string
- The md5 of the Sql statement.
- Query
Time double - Sql execution time (seconds).
- Rows
Examined double - The number of rows to scan.
- Rows
Sent double - The number of rows in the result set.
- Sql
Template string - Sql template.
- Sql
Text string - Sql statement.
- Timestamp double
- Sql execution time.
- User
Host string - client address.
- User
Name string - user name.
- Database string
- database name.
- Lock
Time float64 - Lock duration (seconds).
- Md5 string
- The md5 of the Sql statement.
- Query
Time float64 - Sql execution time (seconds).
- Rows
Examined float64 - The number of rows to scan.
- Rows
Sent float64 - The number of rows in the result set.
- Sql
Template string - Sql template.
- Sql
Text string - Sql statement.
- Timestamp float64
- Sql execution time.
- User
Host string - client address.
- User
Name string - user name.
- database String
- database name.
- lock
Time Double - Lock duration (seconds).
- md5 String
- The md5 of the Sql statement.
- query
Time Double - Sql execution time (seconds).
- rows
Examined Double - The number of rows to scan.
- rows
Sent Double - The number of rows in the result set.
- sql
Template String - Sql template.
- sql
Text String - Sql statement.
- timestamp Double
- Sql execution time.
- user
Host String - client address.
- user
Name String - user name.
- database string
- database name.
- lock
Time number - Lock duration (seconds).
- md5 string
- The md5 of the Sql statement.
- query
Time number - Sql execution time (seconds).
- rows
Examined number - The number of rows to scan.
- rows
Sent number - The number of rows in the result set.
- sql
Template string - Sql template.
- sql
Text string - Sql statement.
- timestamp number
- Sql execution time.
- user
Host string - client address.
- user
Name string - user name.
- database str
- database name.
- lock_
time float - Lock duration (seconds).
- md5 str
- The md5 of the Sql statement.
- query_
time float - Sql execution time (seconds).
- rows_
examined float - The number of rows to scan.
- rows_
sent float - The number of rows in the result set.
- sql_
template str - Sql template.
- sql_
text str - Sql statement.
- timestamp float
- Sql execution time.
- user_
host str - client address.
- user_
name str - user name.
- database String
- database name.
- lock
Time Number - Lock duration (seconds).
- md5 String
- The md5 of the Sql statement.
- query
Time Number - Sql execution time (seconds).
- rows
Examined Number - The number of rows to scan.
- rows
Sent Number - The number of rows in the result set.
- sql
Template String - Sql template.
- sql
Text String - Sql statement.
- timestamp Number
- Sql execution time.
- user
Host String - client address.
- user
Name String - user name.
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
