tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getMysqlErrorLog
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 mysql error_log
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const errorLog = tencentcloud.getMysqlErrorLog({
endTime: 1686043908,
instType: "slave",
instanceId: "cdb-fitq5t9h",
keyWords: ["Shutting"],
startTime: 1683538307,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
error_log = tencentcloud.get_mysql_error_log(end_time=1686043908,
inst_type="slave",
instance_id="cdb-fitq5t9h",
key_words=["Shutting"],
start_time=1683538307)
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.GetMysqlErrorLog(ctx, &tencentcloud.GetMysqlErrorLogArgs{
EndTime: 1686043908,
InstType: pulumi.StringRef("slave"),
InstanceId: "cdb-fitq5t9h",
KeyWords: []string{
"Shutting",
},
StartTime: 1683538307,
}, 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 errorLog = Tencentcloud.GetMysqlErrorLog.Invoke(new()
{
EndTime = 1686043908,
InstType = "slave",
InstanceId = "cdb-fitq5t9h",
KeyWords = new[]
{
"Shutting",
},
StartTime = 1683538307,
});
});
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.GetMysqlErrorLogArgs;
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 errorLog = TencentcloudFunctions.getMysqlErrorLog(GetMysqlErrorLogArgs.builder()
.endTime(1686043908)
.instType("slave")
.instanceId("cdb-fitq5t9h")
.keyWords("Shutting")
.startTime(1683538307)
.build());
}
}
variables:
errorLog:
fn::invoke:
function: tencentcloud:getMysqlErrorLog
arguments:
endTime: 1.686043908e+09
instType: slave
instanceId: cdb-fitq5t9h
keyWords:
- Shutting
startTime: 1.683538307e+09
Using getMysqlErrorLog
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 getMysqlErrorLog(args: GetMysqlErrorLogArgs, opts?: InvokeOptions): Promise<GetMysqlErrorLogResult>
function getMysqlErrorLogOutput(args: GetMysqlErrorLogOutputArgs, opts?: InvokeOptions): Output<GetMysqlErrorLogResult>
def get_mysql_error_log(end_time: Optional[float] = None,
id: Optional[str] = None,
inst_type: Optional[str] = None,
instance_id: Optional[str] = None,
key_words: Optional[Sequence[str]] = None,
result_output_file: Optional[str] = None,
start_time: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetMysqlErrorLogResult
def get_mysql_error_log_output(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,
key_words: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
start_time: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMysqlErrorLogResult]
func GetMysqlErrorLog(ctx *Context, args *GetMysqlErrorLogArgs, opts ...InvokeOption) (*GetMysqlErrorLogResult, error)
func GetMysqlErrorLogOutput(ctx *Context, args *GetMysqlErrorLogOutputArgs, opts ...InvokeOption) GetMysqlErrorLogResultOutput
> Note: This function is named GetMysqlErrorLog
in the Go SDK.
public static class GetMysqlErrorLog
{
public static Task<GetMysqlErrorLogResult> InvokeAsync(GetMysqlErrorLogArgs args, InvokeOptions? opts = null)
public static Output<GetMysqlErrorLogResult> Invoke(GetMysqlErrorLogInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMysqlErrorLogResult> getMysqlErrorLog(GetMysqlErrorLogArgs args, InvokeOptions options)
public static Output<GetMysqlErrorLogResult> getMysqlErrorLog(GetMysqlErrorLogArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getMysqlErrorLog:getMysqlErrorLog
arguments:
# arguments dictionary
The 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.
- 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.
- Key
Words List<string> - A list of keywords to match, up to 15 keywords are supported.
- Result
Output stringFile - Used to save results.
- End
Time float64 - End timestamp. For example 1585142640.
- Instance
Id string - instance id.
- Start
Time float64 - Start timestamp. For example 1585142640.
- 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.
- Key
Words []string - A list of keywords to match, up to 15 keywords are supported.
- Result
Output stringFile - Used to save results.
- end
Time Double - End timestamp. For example 1585142640.
- instance
Id String - instance id.
- start
Time Double - Start timestamp. For example 1585142640.
- 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.
- key
Words List<String> - A list of keywords to match, up to 15 keywords are supported.
- result
Output StringFile - Used to save results.
- end
Time number - End timestamp. For example 1585142640.
- instance
Id string - instance id.
- start
Time number - Start timestamp. For example 1585142640.
- 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.
- key
Words string[] - A list of keywords to match, up to 15 keywords are supported.
- result
Output stringFile - Used to save results.
- end_
time float - End timestamp. For example 1585142640.
- instance_
id str - instance id.
- start_
time float - Start timestamp. For example 1585142640.
- 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.
- key_
words Sequence[str] - A list of keywords to match, up to 15 keywords are supported.
- result_
output_ strfile - Used to save results.
- end
Time Number - End timestamp. For example 1585142640.
- instance
Id String - instance id.
- start
Time Number - Start timestamp. For example 1585142640.
- 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.
- key
Words List<String> - A list of keywords to match, up to 15 keywords are supported.
- result
Output StringFile - Used to save results.
getMysqlErrorLog Result
The following output properties are available:
- End
Time double - Id string
- Instance
Id string - Items
List<Get
Mysql Error Log Item> - The records returned.
- Start
Time double - Inst
Type string - Key
Words List<string> - Result
Output stringFile
- End
Time float64 - Id string
- Instance
Id string - Items
[]Get
Mysql Error Log Item - The records returned.
- Start
Time float64 - Inst
Type string - Key
Words []string - Result
Output stringFile
- end
Time Double - id String
- instance
Id String - items
List<Get
Mysql Error Log Item> - The records returned.
- start
Time Double - inst
Type String - key
Words List<String> - result
Output StringFile
- end
Time number - id string
- instance
Id string - items
Get
Mysql Error Log Item[] - The records returned.
- start
Time number - inst
Type string - key
Words string[] - result
Output stringFile
- end_
time float - id str
- instance_
id str - items
Sequence[Get
Mysql Error Log Item] - The records returned.
- start_
time float - inst_
type str - key_
words Sequence[str] - result_
output_ strfile
- end
Time Number - id String
- instance
Id String - items List<Property Map>
- The records returned.
- start
Time Number - inst
Type String - key
Words List<String> - result
Output StringFile
Supporting Types
GetMysqlErrorLogItem
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