tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getMariadbSlowLogs
Start a Neo task
Explain and create a tencentcloud.getMariadbSlowLogs resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query detailed information of mariadb slow_logs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const slowLogs = tencentcloud.getMariadbSlowLogs({
instanceId: "tdsql-9vqvls95",
startTime: "2023-06-01 14:55:20",
orderBy: "query_time_sum",
orderByType: "desc",
slave: 0,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
slow_logs = tencentcloud.get_mariadb_slow_logs(instance_id="tdsql-9vqvls95",
start_time="2023-06-01 14:55:20",
order_by="query_time_sum",
order_by_type="desc",
slave=0)
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.GetMariadbSlowLogs(ctx, &tencentcloud.GetMariadbSlowLogsArgs{
InstanceId: "tdsql-9vqvls95",
StartTime: "2023-06-01 14:55:20",
OrderBy: pulumi.StringRef("query_time_sum"),
OrderByType: pulumi.StringRef("desc"),
Slave: pulumi.Float64Ref(0),
}, 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 slowLogs = Tencentcloud.GetMariadbSlowLogs.Invoke(new()
{
InstanceId = "tdsql-9vqvls95",
StartTime = "2023-06-01 14:55:20",
OrderBy = "query_time_sum",
OrderByType = "desc",
Slave = 0,
});
});
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.GetMariadbSlowLogsArgs;
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 slowLogs = TencentcloudFunctions.getMariadbSlowLogs(GetMariadbSlowLogsArgs.builder()
.instanceId("tdsql-9vqvls95")
.startTime("2023-06-01 14:55:20")
.orderBy("query_time_sum")
.orderByType("desc")
.slave(0)
.build());
}
}
variables:
slowLogs:
fn::invoke:
function: tencentcloud:getMariadbSlowLogs
arguments:
instanceId: tdsql-9vqvls95
startTime: 2023-06-01 14:55:20
orderBy: query_time_sum
orderByType: desc
slave: 0
Using getMariadbSlowLogs
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 getMariadbSlowLogs(args: GetMariadbSlowLogsArgs, opts?: InvokeOptions): Promise<GetMariadbSlowLogsResult>
function getMariadbSlowLogsOutput(args: GetMariadbSlowLogsOutputArgs, opts?: InvokeOptions): Output<GetMariadbSlowLogsResult>def get_mariadb_slow_logs(db: Optional[str] = None,
end_time: Optional[str] = None,
id: Optional[str] = None,
instance_id: Optional[str] = None,
order_by: Optional[str] = None,
order_by_type: Optional[str] = None,
result_output_file: Optional[str] = None,
slave: Optional[float] = None,
start_time: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMariadbSlowLogsResult
def get_mariadb_slow_logs_output(db: Optional[pulumi.Input[str]] = None,
end_time: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
order_by_type: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
slave: Optional[pulumi.Input[float]] = None,
start_time: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMariadbSlowLogsResult]func GetMariadbSlowLogs(ctx *Context, args *GetMariadbSlowLogsArgs, opts ...InvokeOption) (*GetMariadbSlowLogsResult, error)
func GetMariadbSlowLogsOutput(ctx *Context, args *GetMariadbSlowLogsOutputArgs, opts ...InvokeOption) GetMariadbSlowLogsResultOutput> Note: This function is named GetMariadbSlowLogs in the Go SDK.
public static class GetMariadbSlowLogs
{
public static Task<GetMariadbSlowLogsResult> InvokeAsync(GetMariadbSlowLogsArgs args, InvokeOptions? opts = null)
public static Output<GetMariadbSlowLogsResult> Invoke(GetMariadbSlowLogsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMariadbSlowLogsResult> getMariadbSlowLogs(GetMariadbSlowLogsArgs args, InvokeOptions options)
public static Output<GetMariadbSlowLogsResult> getMariadbSlowLogs(GetMariadbSlowLogsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getMariadbSlowLogs:getMariadbSlowLogs
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - Instance ID in the format of
tdsql-ow728lmc. - Start
Time string - Query start time in the format of 2016-07-23 14:55:20.
- Db string
- Specific name of the database to be queried.
- End
Time string - Query end time in the format of 2016-08-22 14:55:20.
- Id string
- Order
By string - Sorting metric. Valid values: query_time_sum, query_count.
- Order
By stringType - Sorting order. Valid values: desc, asc.
- Result
Output stringFile - Used to save results.
- Slave double
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
- Instance
Id string - Instance ID in the format of
tdsql-ow728lmc. - Start
Time string - Query start time in the format of 2016-07-23 14:55:20.
- Db string
- Specific name of the database to be queried.
- End
Time string - Query end time in the format of 2016-08-22 14:55:20.
- Id string
- Order
By string - Sorting metric. Valid values: query_time_sum, query_count.
- Order
By stringType - Sorting order. Valid values: desc, asc.
- Result
Output stringFile - Used to save results.
- Slave float64
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
- instance
Id String - Instance ID in the format of
tdsql-ow728lmc. - start
Time String - Query start time in the format of 2016-07-23 14:55:20.
- db String
- Specific name of the database to be queried.
- end
Time String - Query end time in the format of 2016-08-22 14:55:20.
- id String
- order
By String - Sorting metric. Valid values: query_time_sum, query_count.
- order
By StringType - Sorting order. Valid values: desc, asc.
- result
Output StringFile - Used to save results.
- slave Double
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
- instance
Id string - Instance ID in the format of
tdsql-ow728lmc. - start
Time string - Query start time in the format of 2016-07-23 14:55:20.
- db string
- Specific name of the database to be queried.
- end
Time string - Query end time in the format of 2016-08-22 14:55:20.
- id string
- order
By string - Sorting metric. Valid values: query_time_sum, query_count.
- order
By stringType - Sorting order. Valid values: desc, asc.
- result
Output stringFile - Used to save results.
- slave number
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
- instance_
id str - Instance ID in the format of
tdsql-ow728lmc. - start_
time str - Query start time in the format of 2016-07-23 14:55:20.
- db str
- Specific name of the database to be queried.
- end_
time str - Query end time in the format of 2016-08-22 14:55:20.
- id str
- order_
by str - Sorting metric. Valid values: query_time_sum, query_count.
- order_
by_ strtype - Sorting order. Valid values: desc, asc.
- result_
output_ strfile - Used to save results.
- slave float
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
- instance
Id String - Instance ID in the format of
tdsql-ow728lmc. - start
Time String - Query start time in the format of 2016-07-23 14:55:20.
- db String
- Specific name of the database to be queried.
- end
Time String - Query end time in the format of 2016-08-22 14:55:20.
- id String
- order
By String - Sorting metric. Valid values: query_time_sum, query_count.
- order
By StringType - Sorting order. Valid values: desc, asc.
- result
Output StringFile - Used to save results.
- slave Number
- Query slow queries from either the primary or the replica. Valid values: 0 (primary), 1 (replica).
getMariadbSlowLogs Result
The following output properties are available:
- Datas
List<Get
Mariadb Slow Logs Data> - Slow query log data.
- Id string
- Instance
Id string - Lock
Time doubleSum - Total statement lock time.
- Query
Count double - Total number of statement queries.
- Query
Time doubleSum - Total statement query time.
- Start
Time string - Db string
- Database name.
- End
Time string - Order
By string - Order
By stringType - Result
Output stringFile - Slave double
- Datas
[]Get
Mariadb Slow Logs Data - Slow query log data.
- Id string
- Instance
Id string - Lock
Time float64Sum - Total statement lock time.
- Query
Count float64 - Total number of statement queries.
- Query
Time float64Sum - Total statement query time.
- Start
Time string - Db string
- Database name.
- End
Time string - Order
By string - Order
By stringType - Result
Output stringFile - Slave float64
- datas
List<Get
Mariadb Slow Logs Data> - Slow query log data.
- id String
- instance
Id String - lock
Time DoubleSum - Total statement lock time.
- query
Count Double - Total number of statement queries.
- query
Time DoubleSum - Total statement query time.
- start
Time String - db String
- Database name.
- end
Time String - order
By String - order
By StringType - result
Output StringFile - slave Double
- datas
Get
Mariadb Slow Logs Data[] - Slow query log data.
- id string
- instance
Id string - lock
Time numberSum - Total statement lock time.
- query
Count number - Total number of statement queries.
- query
Time numberSum - Total statement query time.
- start
Time string - db string
- Database name.
- end
Time string - order
By string - order
By stringType - result
Output stringFile - slave number
- datas
Sequence[Get
Mariadb Slow Logs Data] - Slow query log data.
- id str
- instance_
id str - lock_
time_ floatsum - Total statement lock time.
- query_
count float - Total number of statement queries.
- query_
time_ floatsum - Total statement query time.
- start_
time str - db str
- Database name.
- end_
time str - order_
by str - order_
by_ strtype - result_
output_ strfile - slave float
- datas List<Property Map>
- Slow query log data.
- id String
- instance
Id String - lock
Time NumberSum - Total statement lock time.
- query
Count Number - Total number of statement queries.
- query
Time NumberSum - Total statement query time.
- start
Time String - db String
- Database name.
- end
Time String - order
By String - order
By StringType - result
Output StringFile - slave Number
Supporting Types
GetMariadbSlowLogsData
- Check
Sum string - Statement checksum for querying details.
- Db string
- Specific name of the database to be queried.
- Example
Sql string - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- Finger
Print string - Abstracted SQL statement.
- Host string
- Host address of account.
- Lock
Time stringAvg - Average lock time.
- Lock
Time stringMax - Maximum lock time.
- Lock
Time stringMin - Minimum lock time.
- Lock
Time stringSum - Total statement lock time.
- Query
Count string - Total number of statement queries.
- Query
Time stringAvg - Average query time.
- Query
Time stringMax - Maximum query time.
- Query
Time stringMin - Minimum query time.
- Query
Time stringSum - Total statement query time.
- Rows
Examined stringSum - Number of scanned rows.
- Rows
Sent stringSum - Number of sent rows.
- Ts
Max string - Last execution time.
- Ts
Min string - First execution time.
- User string
- Account.
- Check
Sum string - Statement checksum for querying details.
- Db string
- Specific name of the database to be queried.
- Example
Sql string - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- Finger
Print string - Abstracted SQL statement.
- Host string
- Host address of account.
- Lock
Time stringAvg - Average lock time.
- Lock
Time stringMax - Maximum lock time.
- Lock
Time stringMin - Minimum lock time.
- Lock
Time stringSum - Total statement lock time.
- Query
Count string - Total number of statement queries.
- Query
Time stringAvg - Average query time.
- Query
Time stringMax - Maximum query time.
- Query
Time stringMin - Minimum query time.
- Query
Time stringSum - Total statement query time.
- Rows
Examined stringSum - Number of scanned rows.
- Rows
Sent stringSum - Number of sent rows.
- Ts
Max string - Last execution time.
- Ts
Min string - First execution time.
- User string
- Account.
- check
Sum String - Statement checksum for querying details.
- db String
- Specific name of the database to be queried.
- example
Sql String - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- finger
Print String - Abstracted SQL statement.
- host String
- Host address of account.
- lock
Time StringAvg - Average lock time.
- lock
Time StringMax - Maximum lock time.
- lock
Time StringMin - Minimum lock time.
- lock
Time StringSum - Total statement lock time.
- query
Count String - Total number of statement queries.
- query
Time StringAvg - Average query time.
- query
Time StringMax - Maximum query time.
- query
Time StringMin - Minimum query time.
- query
Time StringSum - Total statement query time.
- rows
Examined StringSum - Number of scanned rows.
- rows
Sent StringSum - Number of sent rows.
- ts
Max String - Last execution time.
- ts
Min String - First execution time.
- user String
- Account.
- check
Sum string - Statement checksum for querying details.
- db string
- Specific name of the database to be queried.
- example
Sql string - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- finger
Print string - Abstracted SQL statement.
- host string
- Host address of account.
- lock
Time stringAvg - Average lock time.
- lock
Time stringMax - Maximum lock time.
- lock
Time stringMin - Minimum lock time.
- lock
Time stringSum - Total statement lock time.
- query
Count string - Total number of statement queries.
- query
Time stringAvg - Average query time.
- query
Time stringMax - Maximum query time.
- query
Time stringMin - Minimum query time.
- query
Time stringSum - Total statement query time.
- rows
Examined stringSum - Number of scanned rows.
- rows
Sent stringSum - Number of sent rows.
- ts
Max string - Last execution time.
- ts
Min string - First execution time.
- user string
- Account.
- check_
sum str - Statement checksum for querying details.
- db str
- Specific name of the database to be queried.
- example_
sql str - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- finger_
print str - Abstracted SQL statement.
- host str
- Host address of account.
- lock_
time_ stravg - Average lock time.
- lock_
time_ strmax - Maximum lock time.
- lock_
time_ strmin - Minimum lock time.
- lock_
time_ strsum - Total statement lock time.
- query_
count str - Total number of statement queries.
- query_
time_ stravg - Average query time.
- query_
time_ strmax - Maximum query time.
- query_
time_ strmin - Minimum query time.
- query_
time_ strsum - Total statement query time.
- rows_
examined_ strsum - Number of scanned rows.
- rows_
sent_ strsum - Number of sent rows.
- ts_
max str - Last execution time.
- ts_
min str - First execution time.
- user str
- Account.
- check
Sum String - Statement checksum for querying details.
- db String
- Specific name of the database to be queried.
- example
Sql String - Sample SQLNote: This field may return null, indicating that no valid values can be obtained.
- finger
Print String - Abstracted SQL statement.
- host String
- Host address of account.
- lock
Time StringAvg - Average lock time.
- lock
Time StringMax - Maximum lock time.
- lock
Time StringMin - Minimum lock time.
- lock
Time StringSum - Total statement lock time.
- query
Count String - Total number of statement queries.
- query
Time StringAvg - Average query time.
- query
Time StringMax - Maximum query time.
- query
Time StringMin - Minimum query time.
- query
Time StringSum - Total statement query time.
- rows
Examined StringSum - Number of scanned rows.
- rows
Sent StringSum - Number of sent rows.
- ts
Max String - Last execution time.
- ts
Min String - First execution time.
- user String
- Account.
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
