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

tencentcloud.CynosdbAuditLogFile

Explore with Pulumi AI

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

    Provides a resource to create a cynosdb audit_log_file

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const auditLogFile = new tencentcloud.CynosdbAuditLogFile("auditLogFile", {
        endTime: "2022-08-12 10:29:20",
        instanceId: "cynosdbmysql-ins-afqx1hy0",
        startTime: "2022-07-12 10:29:20",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    audit_log_file = tencentcloud.CynosdbAuditLogFile("auditLogFile",
        end_time="2022-08-12 10:29:20",
        instance_id="cynosdbmysql-ins-afqx1hy0",
        start_time="2022-07-12 10:29:20")
    
    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.NewCynosdbAuditLogFile(ctx, "auditLogFile", &tencentcloud.CynosdbAuditLogFileArgs{
    			EndTime:    pulumi.String("2022-08-12 10:29:20"),
    			InstanceId: pulumi.String("cynosdbmysql-ins-afqx1hy0"),
    			StartTime:  pulumi.String("2022-07-12 10:29:20"),
    		})
    		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 auditLogFile = new Tencentcloud.CynosdbAuditLogFile("auditLogFile", new()
        {
            EndTime = "2022-08-12 10:29:20",
            InstanceId = "cynosdbmysql-ins-afqx1hy0",
            StartTime = "2022-07-12 10:29:20",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CynosdbAuditLogFile;
    import com.pulumi.tencentcloud.CynosdbAuditLogFileArgs;
    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 auditLogFile = new CynosdbAuditLogFile("auditLogFile", CynosdbAuditLogFileArgs.builder()
                .endTime("2022-08-12 10:29:20")
                .instanceId("cynosdbmysql-ins-afqx1hy0")
                .startTime("2022-07-12 10:29:20")
                .build());
    
        }
    }
    
    resources:
      auditLogFile:
        type: tencentcloud:CynosdbAuditLogFile
        properties:
          endTime: 2022-08-12 10:29:20
          instanceId: cynosdbmysql-ins-afqx1hy0
          startTime: 2022-07-12 10:29:20
    

    Create CynosdbAuditLogFile Resource

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

    Constructor syntax

    new CynosdbAuditLogFile(name: string, args: CynosdbAuditLogFileArgs, opts?: CustomResourceOptions);
    @overload
    def CynosdbAuditLogFile(resource_name: str,
                            args: CynosdbAuditLogFileArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def CynosdbAuditLogFile(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            end_time: Optional[str] = None,
                            instance_id: Optional[str] = None,
                            start_time: Optional[str] = None,
                            cynosdb_audit_log_file_id: Optional[str] = None,
                            filter: Optional[CynosdbAuditLogFileFilterArgs] = None,
                            order: Optional[str] = None,
                            order_by: Optional[str] = None)
    func NewCynosdbAuditLogFile(ctx *Context, name string, args CynosdbAuditLogFileArgs, opts ...ResourceOption) (*CynosdbAuditLogFile, error)
    public CynosdbAuditLogFile(string name, CynosdbAuditLogFileArgs args, CustomResourceOptions? opts = null)
    public CynosdbAuditLogFile(String name, CynosdbAuditLogFileArgs args)
    public CynosdbAuditLogFile(String name, CynosdbAuditLogFileArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CynosdbAuditLogFile
    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 CynosdbAuditLogFileArgs
    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 CynosdbAuditLogFileArgs
    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 CynosdbAuditLogFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CynosdbAuditLogFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CynosdbAuditLogFileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CynosdbAuditLogFile 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 CynosdbAuditLogFile resource accepts the following input properties:

    EndTime string
    End time.
    InstanceId string
    The ID of instance.
    StartTime string
    Start time.
    CynosdbAuditLogFileId string
    ID of the resource.
    Filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    Order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    OrderBy string
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    EndTime string
    End time.
    InstanceId string
    The ID of instance.
    StartTime string
    Start time.
    CynosdbAuditLogFileId string
    ID of the resource.
    Filter CynosdbAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    Order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    OrderBy string
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    endTime String
    End time.
    instanceId String
    The ID of instance.
    startTime String
    Start time.
    cynosdbAuditLogFileId String
    ID of the resource.
    filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    order String
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy String
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    endTime string
    End time.
    instanceId string
    The ID of instance.
    startTime string
    Start time.
    cynosdbAuditLogFileId string
    ID of the resource.
    filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy string
    Sort field. supported values are: 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.
    cynosdb_audit_log_file_id str
    ID of the resource.
    filter CynosdbAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    order str
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    order_by str
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    endTime String
    End time.
    instanceId String
    The ID of instance.
    startTime String
    Start time.
    cynosdbAuditLogFileId String
    ID of the resource.
    filter Property Map
    Filter condition. Logs can be filtered according to the filter conditions set.
    order String
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy String
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.

    Outputs

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

    CreateTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    DownloadUrl string
    The download address of the audit logs.
    ErrMsg string
    Error message.
    FileName string
    Audit log file name.
    FileSize double
    File size, The unit is KB.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    DownloadUrl string
    The download address of the audit logs.
    ErrMsg string
    Error message.
    FileName string
    Audit log file name.
    FileSize float64
    File size, The unit is KB.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    downloadUrl String
    The download address of the audit logs.
    errMsg String
    Error message.
    fileName String
    Audit log file name.
    fileSize Double
    File size, The unit is KB.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    downloadUrl string
    The download address of the audit logs.
    errMsg string
    Error message.
    fileName string
    Audit log file name.
    fileSize number
    File size, The unit is KB.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    download_url str
    The download address of the audit logs.
    err_msg str
    Error message.
    file_name str
    Audit log file name.
    file_size float
    File size, The unit is KB.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    downloadUrl String
    The download address of the audit logs.
    errMsg String
    Error message.
    fileName String
    Audit log file name.
    fileSize Number
    File size, The unit is KB.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CynosdbAuditLogFile Resource

    Get an existing CynosdbAuditLogFile 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?: CynosdbAuditLogFileState, opts?: CustomResourceOptions): CynosdbAuditLogFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            cynosdb_audit_log_file_id: Optional[str] = None,
            download_url: Optional[str] = None,
            end_time: Optional[str] = None,
            err_msg: Optional[str] = None,
            file_name: Optional[str] = None,
            file_size: Optional[float] = None,
            filter: Optional[CynosdbAuditLogFileFilterArgs] = None,
            instance_id: Optional[str] = None,
            order: Optional[str] = None,
            order_by: Optional[str] = None,
            start_time: Optional[str] = None) -> CynosdbAuditLogFile
    func GetCynosdbAuditLogFile(ctx *Context, name string, id IDInput, state *CynosdbAuditLogFileState, opts ...ResourceOption) (*CynosdbAuditLogFile, error)
    public static CynosdbAuditLogFile Get(string name, Input<string> id, CynosdbAuditLogFileState? state, CustomResourceOptions? opts = null)
    public static CynosdbAuditLogFile get(String name, Output<String> id, CynosdbAuditLogFileState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CynosdbAuditLogFile    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:
    CreateTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    CynosdbAuditLogFileId string
    ID of the resource.
    DownloadUrl string
    The download address of the audit logs.
    EndTime string
    End time.
    ErrMsg string
    Error message.
    FileName string
    Audit log file name.
    FileSize double
    File size, The unit is KB.
    Filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    InstanceId string
    The ID of instance.
    Order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    OrderBy string
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    StartTime string
    Start time.
    CreateTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    CynosdbAuditLogFileId string
    ID of the resource.
    DownloadUrl string
    The download address of the audit logs.
    EndTime string
    End time.
    ErrMsg string
    Error message.
    FileName string
    Audit log file name.
    FileSize float64
    File size, The unit is KB.
    Filter CynosdbAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    InstanceId string
    The ID of instance.
    Order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    OrderBy string
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    StartTime string
    Start time.
    createTime String
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    cynosdbAuditLogFileId String
    ID of the resource.
    downloadUrl String
    The download address of the audit logs.
    endTime String
    End time.
    errMsg String
    Error message.
    fileName String
    Audit log file name.
    fileSize Double
    File size, The unit is KB.
    filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId String
    The ID of instance.
    order String
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy String
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    startTime String
    Start time.
    createTime string
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    cynosdbAuditLogFileId string
    ID of the resource.
    downloadUrl string
    The download address of the audit logs.
    endTime string
    End time.
    errMsg string
    Error message.
    fileName string
    Audit log file name.
    fileSize number
    File size, The unit is KB.
    filter CynosdbAuditLogFileFilter
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId string
    The ID of instance.
    order string
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy string
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    startTime string
    Start time.
    create_time str
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    cynosdb_audit_log_file_id str
    ID of the resource.
    download_url str
    The download address of the audit logs.
    end_time str
    End time.
    err_msg str
    Error message.
    file_name str
    Audit log file name.
    file_size float
    File size, The unit is KB.
    filter CynosdbAuditLogFileFilterArgs
    Filter condition. Logs can be filtered according to the filter conditions set.
    instance_id str
    The ID of instance.
    order str
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    order_by str
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    start_time str
    Start time.
    createTime String
    Audit log file creation time. The format is 2019-03-20 17:09:13.
    cynosdbAuditLogFileId String
    ID of the resource.
    downloadUrl String
    The download address of the audit logs.
    endTime String
    End time.
    errMsg String
    Error message.
    fileName String
    Audit log file name.
    fileSize Number
    File size, The unit is KB.
    filter Property Map
    Filter condition. Logs can be filtered according to the filter conditions set.
    instanceId String
    The ID of instance.
    order String
    Sort by. Supported values are: ASC - ascending, DESC - descending.
    orderBy String
    Sort field. supported values are: timestamp - timestamp affectRows - affected rows execTime - execution time.
    startTime String
    Start time.

    Supporting Types

    CynosdbAuditLogFileFilter, CynosdbAuditLogFileFilterArgs

    AffectRows double
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    DbNames List<string>
    The name of database.
    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 host.
    PolicyNames List<string>
    The name of audit policy.
    SentRows double
    Return the number of rows.
    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>
    The name of table.
    ThreadIds List<string>
    The ID of thread.
    Users List<string>
    User name.
    AffectRows float64
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    DbNames []string
    The name of database.
    ExecTime float64
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    Hosts []string
    Client host.
    PolicyNames []string
    The name of audit policy.
    SentRows float64
    Return the number of rows.
    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
    The name of table.
    ThreadIds []string
    The ID of thread.
    Users []string
    User name.
    affectRows Double
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    dbNames List<String>
    The name of database.
    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 host.
    policyNames List<String>
    The name of audit policy.
    sentRows Double
    Return the number of rows.
    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>
    The name of table.
    threadIds List<String>
    The ID of thread.
    users List<String>
    User name.
    affectRows number
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    dbNames string[]
    The name of database.
    execTime number
    Execution time. The unit is: ms. Indicates to filter audit logs whose execution time is greater than this value.
    hosts string[]
    Client host.
    policyNames string[]
    The name of audit policy.
    sentRows number
    Return the number of rows.
    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[]
    The name of table.
    threadIds string[]
    The ID of thread.
    users string[]
    User name.
    affect_rows float
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    db_names Sequence[str]
    The name of database.
    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 host.
    policy_names Sequence[str]
    The name of audit policy.
    sent_rows float
    Return the number of rows.
    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]
    The name of table.
    thread_ids Sequence[str]
    The ID of thread.
    users Sequence[str]
    User name.
    affectRows Number
    Affects the number of rows. Indicates that the audit log whose number of affected rows is greater than this value is filtered.
    dbNames List<String>
    The name of database.
    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 host.
    policyNames List<String>
    The name of audit policy.
    sentRows Number
    Return the number of rows.
    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>
    The name of table.
    threadIds List<String>
    The ID of thread.
    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