1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getMysqlErrorLog
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getMysqlErrorLog

Explore with Pulumi AI

tencentcloud logo
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:

    EndTime double
    End timestamp. For example 1585142640.
    InstanceId string
    instance id.
    StartTime double
    Start timestamp. For example 1585142640.
    Id string
    InstType 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.
    KeyWords List<string>
    A list of keywords to match, up to 15 keywords are supported.
    ResultOutputFile string
    Used to save results.
    EndTime float64
    End timestamp. For example 1585142640.
    InstanceId string
    instance id.
    StartTime float64
    Start timestamp. For example 1585142640.
    Id string
    InstType 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.
    KeyWords []string
    A list of keywords to match, up to 15 keywords are supported.
    ResultOutputFile string
    Used to save results.
    endTime Double
    End timestamp. For example 1585142640.
    instanceId String
    instance id.
    startTime Double
    Start timestamp. For example 1585142640.
    id String
    instType 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.
    keyWords List<String>
    A list of keywords to match, up to 15 keywords are supported.
    resultOutputFile String
    Used to save results.
    endTime number
    End timestamp. For example 1585142640.
    instanceId string
    instance id.
    startTime number
    Start timestamp. For example 1585142640.
    id string
    instType 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.
    keyWords string[]
    A list of keywords to match, up to 15 keywords are supported.
    resultOutputFile string
    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_file str
    Used to save results.
    endTime Number
    End timestamp. For example 1585142640.
    instanceId String
    instance id.
    startTime Number
    Start timestamp. For example 1585142640.
    id String
    instType 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.
    keyWords List<String>
    A list of keywords to match, up to 15 keywords are supported.
    resultOutputFile String
    Used to save results.

    getMysqlErrorLog Result

    The following output properties are available:

    EndTime double
    Id string
    InstanceId string
    Items List<GetMysqlErrorLogItem>
    The records returned.
    StartTime double
    InstType string
    KeyWords List<string>
    ResultOutputFile string
    EndTime float64
    Id string
    InstanceId string
    Items []GetMysqlErrorLogItem
    The records returned.
    StartTime float64
    InstType string
    KeyWords []string
    ResultOutputFile string
    endTime Double
    id String
    instanceId String
    items List<GetMysqlErrorLogItem>
    The records returned.
    startTime Double
    instType String
    keyWords List<String>
    resultOutputFile String
    endTime number
    id string
    instanceId string
    items GetMysqlErrorLogItem[]
    The records returned.
    startTime number
    instType string
    keyWords string[]
    resultOutputFile string
    endTime Number
    id String
    instanceId String
    items List<Property Map>
    The records returned.
    startTime Number
    instType String
    keyWords List<String>
    resultOutputFile String

    Supporting Types

    GetMysqlErrorLogItem

    Content string
    error details.
    Timestamp double
    The time the error occurred.
    Content string
    error details.
    Timestamp float64
    The time the error occurred.
    content String
    error details.
    timestamp Double
    The time the error occurred.
    content string
    error details.
    timestamp number
    The time the error occurred.
    content str
    error details.
    timestamp float
    The time the error occurred.
    content String
    error details.
    timestamp Number
    The time the error occurred.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack