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

tencentcloud.MysqlAuditLogFile

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a mysql audit_log_file

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const zones = tencentcloud.getAvailabilityZonesByProduct({
        product: "cdb",
    });
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        isMulticast: false,
    });
    const securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "mysql test"});
    const exampleMysqlInstance = new tencentcloud.MysqlInstance("exampleMysqlInstance", {
        internetService: 1,
        engineVersion: "5.7",
        chargeType: "POSTPAID",
        rootPassword: "PassWord123",
        slaveDeployMode: 0,
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        slaveSyncMode: 1,
        instanceName: "tf-example-mysql",
        memSize: 4000,
        volumeSize: 200,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        intranetPort: 3306,
        securityGroups: [securityGroup.securityGroupId],
        tags: {
            name: "test",
        },
        parameters: {
            character_set_server: "utf8",
            max_connections: "1000",
        },
    });
    const exampleMysqlAuditLogFile = new tencentcloud.MysqlAuditLogFile("exampleMysqlAuditLogFile", {
        instanceId: exampleMysqlInstance.mysqlInstanceId,
        startTime: "2023-07-01 00:00:00",
        endTime: "2023-10-01 00:00:00",
        order: "ASC",
        orderBy: "timestamp",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    zones = tencentcloud.get_availability_zones_by_product(product="cdb")
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=zones.zones[0].name,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        is_multicast=False)
    security_group = tencentcloud.SecurityGroup("securityGroup", description="mysql test")
    example_mysql_instance = tencentcloud.MysqlInstance("exampleMysqlInstance",
        internet_service=1,
        engine_version="5.7",
        charge_type="POSTPAID",
        root_password="PassWord123",
        slave_deploy_mode=0,
        availability_zone=zones.zones[0].name,
        slave_sync_mode=1,
        instance_name="tf-example-mysql",
        mem_size=4000,
        volume_size=200,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        intranet_port=3306,
        security_groups=[security_group.security_group_id],
        tags={
            "name": "test",
        },
        parameters={
            "character_set_server": "utf8",
            "max_connections": "1000",
        })
    example_mysql_audit_log_file = tencentcloud.MysqlAuditLogFile("exampleMysqlAuditLogFile",
        instance_id=example_mysql_instance.mysql_instance_id,
        start_time="2023-07-01 00:00:00",
        end_time="2023-10-01 00:00:00",
        order="ASC",
        order_by="timestamp")
    
    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 {
    		zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
    			Product: "cdb",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("mysql test"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMysqlInstance, err := tencentcloud.NewMysqlInstance(ctx, "exampleMysqlInstance", &tencentcloud.MysqlInstanceArgs{
    			InternetService:  pulumi.Float64(1),
    			EngineVersion:    pulumi.String("5.7"),
    			ChargeType:       pulumi.String("POSTPAID"),
    			RootPassword:     pulumi.String("PassWord123"),
    			SlaveDeployMode:  pulumi.Float64(0),
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			SlaveSyncMode:    pulumi.Float64(1),
    			InstanceName:     pulumi.String("tf-example-mysql"),
    			MemSize:          pulumi.Float64(4000),
    			VolumeSize:       pulumi.Float64(200),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			IntranetPort:     pulumi.Float64(3306),
    			SecurityGroups: pulumi.StringArray{
    				securityGroup.SecurityGroupId,
    			},
    			Tags: pulumi.StringMap{
    				"name": pulumi.String("test"),
    			},
    			Parameters: pulumi.StringMap{
    				"character_set_server": pulumi.String("utf8"),
    				"max_connections":      pulumi.String("1000"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewMysqlAuditLogFile(ctx, "exampleMysqlAuditLogFile", &tencentcloud.MysqlAuditLogFileArgs{
    			InstanceId: exampleMysqlInstance.MysqlInstanceId,
    			StartTime:  pulumi.String("2023-07-01 00:00:00"),
    			EndTime:    pulumi.String("2023-10-01 00:00:00"),
    			Order:      pulumi.String("ASC"),
    			OrderBy:    pulumi.String("timestamp"),
    		})
    		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 zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
        {
            Product = "cdb",
        });
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            IsMulticast = false,
        });
    
        var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
        {
            Description = "mysql test",
        });
    
        var exampleMysqlInstance = new Tencentcloud.MysqlInstance("exampleMysqlInstance", new()
        {
            InternetService = 1,
            EngineVersion = "5.7",
            ChargeType = "POSTPAID",
            RootPassword = "PassWord123",
            SlaveDeployMode = 0,
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            SlaveSyncMode = 1,
            InstanceName = "tf-example-mysql",
            MemSize = 4000,
            VolumeSize = 200,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            IntranetPort = 3306,
            SecurityGroups = new[]
            {
                securityGroup.SecurityGroupId,
            },
            Tags = 
            {
                { "name", "test" },
            },
            Parameters = 
            {
                { "character_set_server", "utf8" },
                { "max_connections", "1000" },
            },
        });
    
        var exampleMysqlAuditLogFile = new Tencentcloud.MysqlAuditLogFile("exampleMysqlAuditLogFile", new()
        {
            InstanceId = exampleMysqlInstance.MysqlInstanceId,
            StartTime = "2023-07-01 00:00:00",
            EndTime = "2023-10-01 00:00:00",
            Order = "ASC",
            OrderBy = "timestamp",
        });
    
    });
    
    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.GetAvailabilityZonesByProductArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.SecurityGroup;
    import com.pulumi.tencentcloud.SecurityGroupArgs;
    import com.pulumi.tencentcloud.MysqlInstance;
    import com.pulumi.tencentcloud.MysqlInstanceArgs;
    import com.pulumi.tencentcloud.MysqlAuditLogFile;
    import com.pulumi.tencentcloud.MysqlAuditLogFileArgs;
    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 zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
                .product("cdb")
                .build());
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .isMulticast(false)
                .build());
    
            var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
                .description("mysql test")
                .build());
    
            var exampleMysqlInstance = new MysqlInstance("exampleMysqlInstance", MysqlInstanceArgs.builder()
                .internetService(1)
                .engineVersion("5.7")
                .chargeType("POSTPAID")
                .rootPassword("PassWord123")
                .slaveDeployMode(0)
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .slaveSyncMode(1)
                .instanceName("tf-example-mysql")
                .memSize(4000)
                .volumeSize(200)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .intranetPort(3306)
                .securityGroups(securityGroup.securityGroupId())
                .tags(Map.of("name", "test"))
                .parameters(Map.ofEntries(
                    Map.entry("character_set_server", "utf8"),
                    Map.entry("max_connections", "1000")
                ))
                .build());
    
            var exampleMysqlAuditLogFile = new MysqlAuditLogFile("exampleMysqlAuditLogFile", MysqlAuditLogFileArgs.builder()
                .instanceId(exampleMysqlInstance.mysqlInstanceId())
                .startTime("2023-07-01 00:00:00")
                .endTime("2023-10-01 00:00:00")
                .order("ASC")
                .orderBy("timestamp")
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${zones.zones[0].name}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.0.0/16
          isMulticast: false
      securityGroup:
        type: tencentcloud:SecurityGroup
        properties:
          description: mysql test
      exampleMysqlInstance:
        type: tencentcloud:MysqlInstance
        properties:
          internetService: 1
          engineVersion: '5.7'
          chargeType: POSTPAID
          rootPassword: PassWord123
          slaveDeployMode: 0
          availabilityZone: ${zones.zones[0].name}
          slaveSyncMode: 1
          instanceName: tf-example-mysql
          memSize: 4000
          volumeSize: 200
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          intranetPort: 3306
          securityGroups:
            - ${securityGroup.securityGroupId}
          tags:
            name: test
          parameters:
            character_set_server: utf8
            max_connections: '1000'
      exampleMysqlAuditLogFile:
        type: tencentcloud:MysqlAuditLogFile
        properties:
          instanceId: ${exampleMysqlInstance.mysqlInstanceId}
          startTime: 2023-07-01 00:00:00
          endTime: 2023-10-01 00:00:00
          order: ASC
          orderBy: timestamp
    variables:
      zones:
        fn::invoke:
          function: tencentcloud:getAvailabilityZonesByProduct
          arguments:
            product: cdb
    

    Add filter

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.MysqlAuditLogFile("example", {
        instanceId: tencentcloud_mysql_instance.example.id,
        startTime: "2023-07-01 00:00:00",
        endTime: "2023-10-01 00:00:00",
        order: "ASC",
        orderBy: "timestamp",
        filter: {
            hosts: ["30.50.207.46"],
            users: ["keep_dbbrain"],
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.MysqlAuditLogFile("example",
        instance_id=tencentcloud_mysql_instance["example"]["id"],
        start_time="2023-07-01 00:00:00",
        end_time="2023-10-01 00:00:00",
        order="ASC",
        order_by="timestamp",
        filter={
            "hosts": ["30.50.207.46"],
            "users": ["keep_dbbrain"],
        })
    
    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.NewMysqlAuditLogFile(ctx, "example", &tencentcloud.MysqlAuditLogFileArgs{
    			InstanceId: pulumi.Any(tencentcloud_mysql_instance.Example.Id),
    			StartTime:  pulumi.String("2023-07-01 00:00:00"),
    			EndTime:    pulumi.String("2023-10-01 00:00:00"),
    			Order:      pulumi.String("ASC"),
    			OrderBy:    pulumi.String("timestamp"),
    			Filter: &tencentcloud.MysqlAuditLogFileFilterArgs{
    				Hosts: pulumi.StringArray{
    					pulumi.String("30.50.207.46"),
    				},
    				Users: pulumi.StringArray{
    					pulumi.String("keep_dbbrain"),
    				},
    			},
    		})
    		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 example = new Tencentcloud.MysqlAuditLogFile("example", new()
        {
            InstanceId = tencentcloud_mysql_instance.Example.Id,
            StartTime = "2023-07-01 00:00:00",
            EndTime = "2023-10-01 00:00:00",
            Order = "ASC",
            OrderBy = "timestamp",
            Filter = new Tencentcloud.Inputs.MysqlAuditLogFileFilterArgs
            {
                Hosts = new[]
                {
                    "30.50.207.46",
                },
                Users = new[]
                {
                    "keep_dbbrain",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MysqlAuditLogFile;
    import com.pulumi.tencentcloud.MysqlAuditLogFileArgs;
    import com.pulumi.tencentcloud.inputs.MysqlAuditLogFileFilterArgs;
    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) {
            var example = new MysqlAuditLogFile("example", MysqlAuditLogFileArgs.builder()
                .instanceId(tencentcloud_mysql_instance.example().id())
                .startTime("2023-07-01 00:00:00")
                .endTime("2023-10-01 00:00:00")
                .order("ASC")
                .orderBy("timestamp")
                .filter(MysqlAuditLogFileFilterArgs.builder()
                    .hosts("30.50.207.46")
                    .users("keep_dbbrain")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:MysqlAuditLogFile
        properties:
          instanceId: ${tencentcloud_mysql_instance.example.id}
          startTime: 2023-07-01 00:00:00
          endTime: 2023-10-01 00:00:00
          order: ASC
          orderBy: timestamp
          filter:
            hosts:
              - 30.50.207.46
            users:
              - keep_dbbrain
    

    Create MysqlAuditLogFile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MysqlAuditLogFile(name: string, args: MysqlAuditLogFileArgs, opts?: CustomResourceOptions);
    @overload
    def MysqlAuditLogFile(resource_name: str,
                          args: MysqlAuditLogFileArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MysqlAuditLogFile(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          end_time: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          start_time: Optional[str] = None,
                          filter: Optional[MysqlAuditLogFileFilterArgs] = None,
                          mysql_audit_log_file_id: Optional[str] = None,
                          order: Optional[str] = None,
                          order_by: Optional[str] = None)
    func NewMysqlAuditLogFile(ctx *Context, name string, args MysqlAuditLogFileArgs, opts ...ResourceOption) (*MysqlAuditLogFile, error)
    public MysqlAuditLogFile(string name, MysqlAuditLogFileArgs args, CustomResourceOptions? opts = null)
    public MysqlAuditLogFile(String name, MysqlAuditLogFileArgs args)
    public MysqlAuditLogFile(String name, MysqlAuditLogFileArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MysqlAuditLogFile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MysqlAuditLogFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MysqlAuditLogFileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MysqlAuditLogFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MysqlAuditLogFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MysqlAuditLogFileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MysqlAuditLogFile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MysqlAuditLogFile resource accepts the following input properties:

    EndTime string
    end time.
    InstanceId string
    The ID of instance.
    StartTime string
    start time.
    Filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    MysqlAuditLogFileId string
    ID of the resource.
    Order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    OrderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    EndTime string
    end time.
    InstanceId string
    The ID of instance.
    StartTime string
    start time.
    Filter MysqlAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    MysqlAuditLogFileId string
    ID of the resource.
    Order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    OrderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    endTime String
    end time.
    instanceId String
    The ID of instance.
    startTime String
    start time.
    filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    mysqlAuditLogFileId String
    ID of the resource.
    order String
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy String
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    endTime string
    end time.
    instanceId string
    The ID of instance.
    startTime string
    start time.
    filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    mysqlAuditLogFileId string
    ID of the resource.
    order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    end_time str
    end time.
    instance_id str
    The ID of instance.
    start_time str
    start time.
    filter MysqlAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    mysql_audit_log_file_id str
    ID of the resource.
    order str
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    order_by str
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    endTime String
    end time.
    instanceId String
    The ID of instance.
    startTime String
    start time.
    filter Property Map
    Filter condition. Logs can be filtered according to the filter conditions set.
    mysqlAuditLogFileId String
    ID of the resource.
    order String
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy String
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MysqlAuditLogFile resource produces the following output properties:

    DownloadUrl string
    download url.
    FileSize double
    size of file(KB).
    Id string
    The provider-assigned unique ID for this managed resource.
    DownloadUrl string
    download url.
    FileSize float64
    size of file(KB).
    Id string
    The provider-assigned unique ID for this managed resource.
    downloadUrl String
    download url.
    fileSize Double
    size of file(KB).
    id String
    The provider-assigned unique ID for this managed resource.
    downloadUrl string
    download url.
    fileSize number
    size of file(KB).
    id string
    The provider-assigned unique ID for this managed resource.
    download_url str
    download url.
    file_size float
    size of file(KB).
    id str
    The provider-assigned unique ID for this managed resource.
    downloadUrl String
    download url.
    fileSize Number
    size of file(KB).
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MysqlAuditLogFile Resource

    Get an existing MysqlAuditLogFile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MysqlAuditLogFileState, opts?: CustomResourceOptions): MysqlAuditLogFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            download_url: Optional[str] = None,
            end_time: Optional[str] = None,
            file_size: Optional[float] = None,
            filter: Optional[MysqlAuditLogFileFilterArgs] = None,
            instance_id: Optional[str] = None,
            mysql_audit_log_file_id: Optional[str] = None,
            order: Optional[str] = None,
            order_by: Optional[str] = None,
            start_time: Optional[str] = None) -> MysqlAuditLogFile
    func GetMysqlAuditLogFile(ctx *Context, name string, id IDInput, state *MysqlAuditLogFileState, opts ...ResourceOption) (*MysqlAuditLogFile, error)
    public static MysqlAuditLogFile Get(string name, Input<string> id, MysqlAuditLogFileState? state, CustomResourceOptions? opts = null)
    public static MysqlAuditLogFile get(String name, Output<String> id, MysqlAuditLogFileState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MysqlAuditLogFile    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DownloadUrl string
    download url.
    EndTime string
    end time.
    FileSize double
    size of file(KB).
    Filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    InstanceId string
    The ID of instance.
    MysqlAuditLogFileId string
    ID of the resource.
    Order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    OrderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    StartTime string
    start time.
    DownloadUrl string
    download url.
    EndTime string
    end time.
    FileSize float64
    size of file(KB).
    Filter MysqlAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    InstanceId string
    The ID of instance.
    MysqlAuditLogFileId string
    ID of the resource.
    Order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    OrderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    StartTime string
    start time.
    downloadUrl String
    download url.
    endTime String
    end time.
    fileSize Double
    size of file(KB).
    filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId String
    The ID of instance.
    mysqlAuditLogFileId String
    ID of the resource.
    order String
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy String
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    startTime String
    start time.
    downloadUrl string
    download url.
    endTime string
    end time.
    fileSize number
    size of file(KB).
    filter MysqlAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId string
    The ID of instance.
    mysqlAuditLogFileId string
    ID of the resource.
    order string
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy string
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    startTime string
    start time.
    download_url str
    download url.
    end_time str
    end time.
    file_size float
    size of file(KB).
    filter MysqlAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    instance_id str
    The ID of instance.
    mysql_audit_log_file_id str
    ID of the resource.
    order str
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    order_by str
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    start_time str
    start time.
    downloadUrl String
    download url.
    endTime String
    end time.
    fileSize Number
    size of file(KB).
    filter Property Map
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId String
    The ID of instance.
    mysqlAuditLogFileId String
    ID of the resource.
    order String
    Sort by. supported values are: ASC- ascending order, DESC- descending order.
    orderBy String
    Sort field. supported values include:timestamp - timestamp; affectRows - affected rows; execTime - execution time.
    startTime String
    start time.

    Supporting Types

    MysqlAuditLogFileFilter, MysqlAuditLogFileFilterArgs

    AffectRows double
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    DbNames List<string>
    Database name.
    ExecTime double
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    Hosts List<string>
    Client address.
    PolicyNames List<string>
    The name of policy.
    Sql string
    SQL statement. support fuzzy matching.
    SqlType string
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    SqlTypes List<string>
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    Sqls List<string>
    SQL statement. Support passing multiple sql statements.
    TableNames List<string>
    Table name.
    Users List<string>
    User name.
    AffectRows float64
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    DbNames []string
    Database name.
    ExecTime float64
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    Hosts []string
    Client address.
    PolicyNames []string
    The name of policy.
    Sql string
    SQL statement. support fuzzy matching.
    SqlType string
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    SqlTypes []string
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    Sqls []string
    SQL statement. Support passing multiple sql statements.
    TableNames []string
    Table name.
    Users []string
    User name.
    affectRows Double
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    dbNames List<String>
    Database name.
    execTime Double
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    hosts List<String>
    Client address.
    policyNames List<String>
    The name of policy.
    sql String
    SQL statement. support fuzzy matching.
    sqlType String
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqlTypes List<String>
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqls List<String>
    SQL statement. Support passing multiple sql statements.
    tableNames List<String>
    Table name.
    users List<String>
    User name.
    affectRows number
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    dbNames string[]
    Database name.
    execTime number
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    hosts string[]
    Client address.
    policyNames string[]
    The name of policy.
    sql string
    SQL statement. support fuzzy matching.
    sqlType string
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqlTypes string[]
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqls string[]
    SQL statement. Support passing multiple sql statements.
    tableNames string[]
    Table name.
    users string[]
    User name.
    affect_rows float
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    db_names Sequence[str]
    Database name.
    exec_time float
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    hosts Sequence[str]
    Client address.
    policy_names Sequence[str]
    The name of policy.
    sql str
    SQL statement. support fuzzy matching.
    sql_type str
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sql_types Sequence[str]
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqls Sequence[str]
    SQL statement. Support passing multiple sql statements.
    table_names Sequence[str]
    Table name.
    users Sequence[str]
    User name.
    affectRows Number
    Affects the number of rows. Indicates to filter audit logs whose number of affected rows is greater than this value.
    dbNames List<String>
    Database name.
    execTime Number
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    hosts List<String>
    Client address.
    policyNames List<String>
    The name of policy.
    sql String
    SQL statement. support fuzzy matching.
    sqlType String
    SQL type. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqlTypes List<String>
    SQL type. Supports simultaneous query of multiple types. Currently supported: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, SET, REPLACE, EXECUTE.
    sqls List<String>
    SQL statement. Support passing multiple sql statements.
    tableNames List<String>
    Table name.
    users List<String>
    User name.

    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