tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getDcdbSlowLogs
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query detailed information of dcdb slow_logs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const slowLogs = tencentcloud.getDcdbSlowLogs({
instanceId: local.dcdb_id,
startTime: "%s",
endTime: "%s",
shardId: "shard-1b5r04az",
db: "tf_test_db",
orderBy: "query_time_sum",
orderByType: "desc",
slave: 0,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
slow_logs = tencentcloud.get_dcdb_slow_logs(instance_id=local["dcdb_id"],
start_time="%s",
end_time="%s",
shard_id="shard-1b5r04az",
db="tf_test_db",
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.GetDcdbSlowLogs(ctx, &tencentcloud.GetDcdbSlowLogsArgs{
InstanceId: local.Dcdb_id,
StartTime: "%s",
EndTime: pulumi.StringRef("%s"),
ShardId: "shard-1b5r04az",
Db: pulumi.StringRef("tf_test_db"),
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.GetDcdbSlowLogs.Invoke(new()
{
InstanceId = local.Dcdb_id,
StartTime = "%s",
EndTime = "%s",
ShardId = "shard-1b5r04az",
Db = "tf_test_db",
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.GetDcdbSlowLogsArgs;
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.getDcdbSlowLogs(GetDcdbSlowLogsArgs.builder()
.instanceId(local.dcdb_id())
.startTime("%s")
.endTime("%s")
.shardId("shard-1b5r04az")
.db("tf_test_db")
.orderBy("query_time_sum")
.orderByType("desc")
.slave(0)
.build());
}
}
variables:
slowLogs:
fn::invoke:
function: tencentcloud:getDcdbSlowLogs
arguments:
instanceId: ${local.dcdb_id}
startTime: '%s'
endTime: '%s'
shardId: shard-1b5r04az
db: tf_test_db
orderBy: query_time_sum
orderByType: desc
slave: 0
Using getDcdbSlowLogs
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 getDcdbSlowLogs(args: GetDcdbSlowLogsArgs, opts?: InvokeOptions): Promise<GetDcdbSlowLogsResult>
function getDcdbSlowLogsOutput(args: GetDcdbSlowLogsOutputArgs, opts?: InvokeOptions): Output<GetDcdbSlowLogsResult>
def get_dcdb_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,
shard_id: Optional[str] = None,
slave: Optional[float] = None,
start_time: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDcdbSlowLogsResult
def get_dcdb_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,
shard_id: Optional[pulumi.Input[str]] = None,
slave: Optional[pulumi.Input[float]] = None,
start_time: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDcdbSlowLogsResult]
func GetDcdbSlowLogs(ctx *Context, args *GetDcdbSlowLogsArgs, opts ...InvokeOption) (*GetDcdbSlowLogsResult, error)
func GetDcdbSlowLogsOutput(ctx *Context, args *GetDcdbSlowLogsOutputArgs, opts ...InvokeOption) GetDcdbSlowLogsResultOutput
> Note: This function is named GetDcdbSlowLogs
in the Go SDK.
public static class GetDcdbSlowLogs
{
public static Task<GetDcdbSlowLogsResult> InvokeAsync(GetDcdbSlowLogsArgs args, InvokeOptions? opts = null)
public static Output<GetDcdbSlowLogsResult> Invoke(GetDcdbSlowLogsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDcdbSlowLogsResult> getDcdbSlowLogs(GetDcdbSlowLogsArgs args, InvokeOptions options)
public static Output<GetDcdbSlowLogsResult> getDcdbSlowLogs(GetDcdbSlowLogsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getDcdbSlowLogs:getDcdbSlowLogs
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - Instance ID in the format of
tdsqlshard-ow728lmc
. - string
- Instance shard ID in the format of
shard-rc754ljk
. - 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
tdsqlshard-ow728lmc
. - string
- Instance shard ID in the format of
shard-rc754ljk
. - 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
tdsqlshard-ow728lmc
. - String
- Instance shard ID in the format of
shard-rc754ljk
. - 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
tdsqlshard-ow728lmc
. - string
- Instance shard ID in the format of
shard-rc754ljk
. - 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
tdsqlshard-ow728lmc
. - str
- Instance shard ID in the format of
shard-rc754ljk
. - 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
tdsqlshard-ow728lmc
. - String
- Instance shard ID in the format of
shard-rc754ljk
. - 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).
getDcdbSlowLogs Result
The following output properties are available:
- Datas
List<Get
Dcdb 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.
- string
- Start
Time string - Db string
- Database name.
- End
Time string - Order
By string - Order
By stringType - Result
Output stringFile - Slave double
- Datas
[]Get
Dcdb 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.
- string
- Start
Time string - Db string
- Database name.
- End
Time string - Order
By string - Order
By stringType - Result
Output stringFile - Slave float64
- datas
List<Get
Dcdb 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.
- String
- start
Time String - db String
- Database name.
- end
Time String - order
By String - order
By StringType - result
Output StringFile - slave Double
- datas
Get
Dcdb 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.
- string
- start
Time string - db string
- Database name.
- end
Time string - order
By string - order
By stringType - result
Output stringFile - slave number
- datas
Sequence[Get
Dcdb 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.
- str
- 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.
- String
- start
Time String - db String
- Database name.
- end
Time String - order
By String - order
By StringType - result
Output StringFile - slave Number
Supporting Types
GetDcdbSlowLogsData
- 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
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack