Audit

SLS log audit exists in the form of log service app.

In addition to inheriting all SLS functions, it also enhances the real-time automatic centralized collection of audit related logs across multi cloud products under multi accounts, and provides support for storage, query and information summary required by audit. It covers actiontrail, OSS, NAS, SLB, API gateway, RDS, WAF, cloud firewall, cloud security center and other products.

NOTE: Available in 1.81.0

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Log.Audit("example", new AliCloud.Log.AuditArgs
        {
            Aliuid = "12345678",
            DisplayName = "tf-audit-test",
            VariableMap = 
            {
                { "actiontrail_enabled", "true" },
                { "actiontrail_ti_enabled", "false" },
                { "actiontrail_ttl", "180" },
                { "apigateway_enabled", "true" },
                { "apigateway_ti_enabled", "false" },
                { "apigateway_ttl", "180" },
                { "appconnect_enabled", "false" },
                { "appconnect_ttl", "180" },
                { "bastion_enabled", "true" },
                { "bastion_ti_enabled", "false" },
                { "bastion_ttl", "180" },
                { "cloudfirewall_enabled", "true" },
                { "cloudfirewall_ti_enabled", "false" },
                { "cloudfirewall_ttl", "180" },
                { "cps_enabled", "true" },
                { "cps_ti_enabled", "false" },
                { "cps_ttl", "180" },
                { "ddos_bgp_access_enabled", "false" },
                { "ddos_bgp_access_ttl", "180" },
                { "ddos_coo_access_enabled", "false" },
                { "ddos_coo_access_ti_enabled", "false" },
                { "ddos_coo_access_ttl", "180" },
                { "ddos_dip_access_enabled", "false" },
                { "ddos_dip_access_ti_enabled", "false" },
                { "ddos_dip_access_ttl", "180" },
                { "drds_audit_collection_policy", "" },
                { "drds_audit_enabled", "true" },
                { "drds_audit_ti_enabled", "false" },
                { "drds_audit_ttl", "7" },
                { "drds_sync_enabled", "true" },
                { "drds_sync_ttl", "180" },
                { "k8s_audit_collection_policy", "" },
                { "k8s_audit_enabled", "true" },
                { "k8s_audit_ttl", "180" },
                { "k8s_event_collection_policy", "" },
                { "k8s_event_enabled", "true" },
                { "k8s_event_ttl", "180" },
                { "k8s_ingress_collection_policy", "" },
                { "k8s_ingress_enabled", "true" },
                { "k8s_ingress_ttl", "180" },
                { "nas_enabled", "true" },
                { "nas_ti_enabled", "false" },
                { "nas_ttl", "180" },
                { "oss_access_enabled", "true" },
                { "oss_access_ti_enabled", "false" },
                { "oss_access_ttl", "7" },
                { "oss_metering_enabled", "true" },
                { "oss_metering_ttl", "180" },
                { "oss_sync_enabled", "true" },
                { "oss_sync_ttl", "180" },
                { "polardb_audit_collection_policy", "" },
                { "polardb_enabled", "true" },
                { "polardb_perf_collection_policy", "" },
                { "polardb_perf_enabled", "false" },
                { "polardb_perf_ttl", "180" },
                { "polardb_slow_collection_policy", "" },
                { "polardb_slow_enabled", "false" },
                { "polardb_slow_ttl", "180" },
                { "polardb_ti_enabled", "false" },
                { "polardb_ttl", "180" },
                { "rds_audit_collection_policy", "" },
                { "rds_enabled", "true" },
                { "rds_perf_collection_policy", "" },
                { "rds_perf_enabled", "false" },
                { "rds_perf_ttl", "180" },
                { "rds_slow_collection_policy", "" },
                { "rds_slow_enabled", "false" },
                { "rds_slow_ttl", "180" },
                { "rds_ti_enabled", "false" },
                { "rds_ttl", "180" },
                { "sas_crack_enabled", "true" },
                { "sas_dns_enabled", "true" },
                { "sas_http_enabled", "true" },
                { "sas_local_dns_enabled", "true" },
                { "sas_login_enabled", "true" },
                { "sas_network_enabled", "true" },
                { "sas_process_enabled", "true" },
                { "sas_security_alert_enabled", "true" },
                { "sas_security_hc_enabled", "true" },
                { "sas_security_vul_enabled", "true" },
                { "sas_session_enabled", "true" },
                { "sas_snapshot_account_enabled", "true" },
                { "sas_snapshot_port_enabled", "true" },
                { "sas_snapshot_process_enabled", "true" },
                { "sas_ti_enabled", "false" },
                { "sas_ttl", "180" },
                { "slb_access_collection_policy", "" },
                { "slb_access_enabled", "true" },
                { "slb_access_ti_enabled", "false" },
                { "slb_access_ttl", "7" },
                { "slb_sync_enabled", "true" },
                { "slb_sync_ttl", "180" },
                { "vpc_flow_collection_policy", "" },
                { "vpc_flow_enabled", "false" },
                { "vpc_flow_ttl", "7" },
                { "vpc_sync_enabled", "true" },
                { "vpc_sync_ttl", "180" },
                { "waf_enabled", "true" },
                { "waf_ti_enabled", "false" },
                { "waf_ttl", "180" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := log.NewAudit(ctx, "example", &log.AuditArgs{
			Aliuid:      pulumi.String("12345678"),
			DisplayName: pulumi.String("tf-audit-test"),
			VariableMap: pulumi.AnyMap{
				"actiontrail_enabled":             pulumi.Any("true"),
				"actiontrail_ti_enabled":          pulumi.Any("false"),
				"actiontrail_ttl":                 pulumi.Any("180"),
				"apigateway_enabled":              pulumi.Any("true"),
				"apigateway_ti_enabled":           pulumi.Any("false"),
				"apigateway_ttl":                  pulumi.Any("180"),
				"appconnect_enabled":              pulumi.Any("false"),
				"appconnect_ttl":                  pulumi.Any("180"),
				"bastion_enabled":                 pulumi.Any("true"),
				"bastion_ti_enabled":              pulumi.Any("false"),
				"bastion_ttl":                     pulumi.Any("180"),
				"cloudfirewall_enabled":           pulumi.Any("true"),
				"cloudfirewall_ti_enabled":        pulumi.Any("false"),
				"cloudfirewall_ttl":               pulumi.Any("180"),
				"cps_enabled":                     pulumi.Any("true"),
				"cps_ti_enabled":                  pulumi.Any("false"),
				"cps_ttl":                         pulumi.Any("180"),
				"ddos_bgp_access_enabled":         pulumi.Any("false"),
				"ddos_bgp_access_ttl":             pulumi.Any("180"),
				"ddos_coo_access_enabled":         pulumi.Any("false"),
				"ddos_coo_access_ti_enabled":      pulumi.Any("false"),
				"ddos_coo_access_ttl":             pulumi.Any("180"),
				"ddos_dip_access_enabled":         pulumi.Any("false"),
				"ddos_dip_access_ti_enabled":      pulumi.Any("false"),
				"ddos_dip_access_ttl":             pulumi.Any("180"),
				"drds_audit_collection_policy":    pulumi.Any(""),
				"drds_audit_enabled":              pulumi.Any("true"),
				"drds_audit_ti_enabled":           pulumi.Any("false"),
				"drds_audit_ttl":                  pulumi.Any("7"),
				"drds_sync_enabled":               pulumi.Any("true"),
				"drds_sync_ttl":                   pulumi.Any("180"),
				"k8s_audit_collection_policy":     pulumi.Any(""),
				"k8s_audit_enabled":               pulumi.Any("true"),
				"k8s_audit_ttl":                   pulumi.Any("180"),
				"k8s_event_collection_policy":     pulumi.Any(""),
				"k8s_event_enabled":               pulumi.Any("true"),
				"k8s_event_ttl":                   pulumi.Any("180"),
				"k8s_ingress_collection_policy":   pulumi.Any(""),
				"k8s_ingress_enabled":             pulumi.Any("true"),
				"k8s_ingress_ttl":                 pulumi.Any("180"),
				"nas_enabled":                     pulumi.Any("true"),
				"nas_ti_enabled":                  pulumi.Any("false"),
				"nas_ttl":                         pulumi.Any("180"),
				"oss_access_enabled":              pulumi.Any("true"),
				"oss_access_ti_enabled":           pulumi.Any("false"),
				"oss_access_ttl":                  pulumi.Any("7"),
				"oss_metering_enabled":            pulumi.Any("true"),
				"oss_metering_ttl":                pulumi.Any("180"),
				"oss_sync_enabled":                pulumi.Any("true"),
				"oss_sync_ttl":                    pulumi.Any("180"),
				"polardb_audit_collection_policy": pulumi.Any(""),
				"polardb_enabled":                 pulumi.Any("true"),
				"polardb_perf_collection_policy":  pulumi.Any(""),
				"polardb_perf_enabled":            pulumi.Any("false"),
				"polardb_perf_ttl":                pulumi.Any("180"),
				"polardb_slow_collection_policy":  pulumi.Any(""),
				"polardb_slow_enabled":            pulumi.Any("false"),
				"polardb_slow_ttl":                pulumi.Any("180"),
				"polardb_ti_enabled":              pulumi.Any("false"),
				"polardb_ttl":                     pulumi.Any("180"),
				"rds_audit_collection_policy":     pulumi.Any(""),
				"rds_enabled":                     pulumi.Any("true"),
				"rds_perf_collection_policy":      pulumi.Any(""),
				"rds_perf_enabled":                pulumi.Any("false"),
				"rds_perf_ttl":                    pulumi.Any("180"),
				"rds_slow_collection_policy":      pulumi.Any(""),
				"rds_slow_enabled":                pulumi.Any("false"),
				"rds_slow_ttl":                    pulumi.Any("180"),
				"rds_ti_enabled":                  pulumi.Any("false"),
				"rds_ttl":                         pulumi.Any("180"),
				"sas_crack_enabled":               pulumi.Any("true"),
				"sas_dns_enabled":                 pulumi.Any("true"),
				"sas_http_enabled":                pulumi.Any("true"),
				"sas_local_dns_enabled":           pulumi.Any("true"),
				"sas_login_enabled":               pulumi.Any("true"),
				"sas_network_enabled":             pulumi.Any("true"),
				"sas_process_enabled":             pulumi.Any("true"),
				"sas_security_alert_enabled":      pulumi.Any("true"),
				"sas_security_hc_enabled":         pulumi.Any("true"),
				"sas_security_vul_enabled":        pulumi.Any("true"),
				"sas_session_enabled":             pulumi.Any("true"),
				"sas_snapshot_account_enabled":    pulumi.Any("true"),
				"sas_snapshot_port_enabled":       pulumi.Any("true"),
				"sas_snapshot_process_enabled":    pulumi.Any("true"),
				"sas_ti_enabled":                  pulumi.Any("false"),
				"sas_ttl":                         pulumi.Any("180"),
				"slb_access_collection_policy":    pulumi.Any(""),
				"slb_access_enabled":              pulumi.Any("true"),
				"slb_access_ti_enabled":           pulumi.Any("false"),
				"slb_access_ttl":                  pulumi.Any("7"),
				"slb_sync_enabled":                pulumi.Any("true"),
				"slb_sync_ttl":                    pulumi.Any("180"),
				"vpc_flow_collection_policy":      pulumi.Any(""),
				"vpc_flow_enabled":                pulumi.Any("false"),
				"vpc_flow_ttl":                    pulumi.Any("7"),
				"vpc_sync_enabled":                pulumi.Any("true"),
				"vpc_sync_ttl":                    pulumi.Any("180"),
				"waf_enabled":                     pulumi.Any("true"),
				"waf_ti_enabled":                  pulumi.Any("false"),
				"waf_ttl":                         pulumi.Any("180"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Audit;
import com.pulumi.alicloud.log.AuditArgs;
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 Audit("example", AuditArgs.builder()        
            .aliuid("12345678")
            .displayName("tf-audit-test")
            .variableMap(Map.ofEntries(
                Map.entry("actiontrail_enabled", "true"),
                Map.entry("actiontrail_ti_enabled", "false"),
                Map.entry("actiontrail_ttl", "180"),
                Map.entry("apigateway_enabled", "true"),
                Map.entry("apigateway_ti_enabled", "false"),
                Map.entry("apigateway_ttl", "180"),
                Map.entry("appconnect_enabled", "false"),
                Map.entry("appconnect_ttl", "180"),
                Map.entry("bastion_enabled", "true"),
                Map.entry("bastion_ti_enabled", "false"),
                Map.entry("bastion_ttl", "180"),
                Map.entry("cloudfirewall_enabled", "true"),
                Map.entry("cloudfirewall_ti_enabled", "false"),
                Map.entry("cloudfirewall_ttl", "180"),
                Map.entry("cps_enabled", "true"),
                Map.entry("cps_ti_enabled", "false"),
                Map.entry("cps_ttl", "180"),
                Map.entry("ddos_bgp_access_enabled", "false"),
                Map.entry("ddos_bgp_access_ttl", "180"),
                Map.entry("ddos_coo_access_enabled", "false"),
                Map.entry("ddos_coo_access_ti_enabled", "false"),
                Map.entry("ddos_coo_access_ttl", "180"),
                Map.entry("ddos_dip_access_enabled", "false"),
                Map.entry("ddos_dip_access_ti_enabled", "false"),
                Map.entry("ddos_dip_access_ttl", "180"),
                Map.entry("drds_audit_collection_policy", ""),
                Map.entry("drds_audit_enabled", "true"),
                Map.entry("drds_audit_ti_enabled", "false"),
                Map.entry("drds_audit_ttl", "7"),
                Map.entry("drds_sync_enabled", "true"),
                Map.entry("drds_sync_ttl", "180"),
                Map.entry("k8s_audit_collection_policy", ""),
                Map.entry("k8s_audit_enabled", "true"),
                Map.entry("k8s_audit_ttl", "180"),
                Map.entry("k8s_event_collection_policy", ""),
                Map.entry("k8s_event_enabled", "true"),
                Map.entry("k8s_event_ttl", "180"),
                Map.entry("k8s_ingress_collection_policy", ""),
                Map.entry("k8s_ingress_enabled", "true"),
                Map.entry("k8s_ingress_ttl", "180"),
                Map.entry("nas_enabled", "true"),
                Map.entry("nas_ti_enabled", "false"),
                Map.entry("nas_ttl", "180"),
                Map.entry("oss_access_enabled", "true"),
                Map.entry("oss_access_ti_enabled", "false"),
                Map.entry("oss_access_ttl", "7"),
                Map.entry("oss_metering_enabled", "true"),
                Map.entry("oss_metering_ttl", "180"),
                Map.entry("oss_sync_enabled", "true"),
                Map.entry("oss_sync_ttl", "180"),
                Map.entry("polardb_audit_collection_policy", ""),
                Map.entry("polardb_enabled", "true"),
                Map.entry("polardb_perf_collection_policy", ""),
                Map.entry("polardb_perf_enabled", "false"),
                Map.entry("polardb_perf_ttl", "180"),
                Map.entry("polardb_slow_collection_policy", ""),
                Map.entry("polardb_slow_enabled", "false"),
                Map.entry("polardb_slow_ttl", "180"),
                Map.entry("polardb_ti_enabled", "false"),
                Map.entry("polardb_ttl", "180"),
                Map.entry("rds_audit_collection_policy", ""),
                Map.entry("rds_enabled", "true"),
                Map.entry("rds_perf_collection_policy", ""),
                Map.entry("rds_perf_enabled", "false"),
                Map.entry("rds_perf_ttl", "180"),
                Map.entry("rds_slow_collection_policy", ""),
                Map.entry("rds_slow_enabled", "false"),
                Map.entry("rds_slow_ttl", "180"),
                Map.entry("rds_ti_enabled", "false"),
                Map.entry("rds_ttl", "180"),
                Map.entry("sas_crack_enabled", "true"),
                Map.entry("sas_dns_enabled", "true"),
                Map.entry("sas_http_enabled", "true"),
                Map.entry("sas_local_dns_enabled", "true"),
                Map.entry("sas_login_enabled", "true"),
                Map.entry("sas_network_enabled", "true"),
                Map.entry("sas_process_enabled", "true"),
                Map.entry("sas_security_alert_enabled", "true"),
                Map.entry("sas_security_hc_enabled", "true"),
                Map.entry("sas_security_vul_enabled", "true"),
                Map.entry("sas_session_enabled", "true"),
                Map.entry("sas_snapshot_account_enabled", "true"),
                Map.entry("sas_snapshot_port_enabled", "true"),
                Map.entry("sas_snapshot_process_enabled", "true"),
                Map.entry("sas_ti_enabled", "false"),
                Map.entry("sas_ttl", "180"),
                Map.entry("slb_access_collection_policy", ""),
                Map.entry("slb_access_enabled", "true"),
                Map.entry("slb_access_ti_enabled", "false"),
                Map.entry("slb_access_ttl", "7"),
                Map.entry("slb_sync_enabled", "true"),
                Map.entry("slb_sync_ttl", "180"),
                Map.entry("vpc_flow_collection_policy", ""),
                Map.entry("vpc_flow_enabled", "false"),
                Map.entry("vpc_flow_ttl", "7"),
                Map.entry("vpc_sync_enabled", "true"),
                Map.entry("vpc_sync_ttl", "180"),
                Map.entry("waf_enabled", "true"),
                Map.entry("waf_ti_enabled", "false"),
                Map.entry("waf_ttl", "180")
            ))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.Audit("example",
    aliuid="12345678",
    display_name="tf-audit-test",
    variable_map={
        "actiontrail_enabled": "true",
        "actiontrail_ti_enabled": "false",
        "actiontrail_ttl": "180",
        "apigateway_enabled": "true",
        "apigateway_ti_enabled": "false",
        "apigateway_ttl": "180",
        "appconnect_enabled": "false",
        "appconnect_ttl": "180",
        "bastion_enabled": "true",
        "bastion_ti_enabled": "false",
        "bastion_ttl": "180",
        "cloudfirewall_enabled": "true",
        "cloudfirewall_ti_enabled": "false",
        "cloudfirewall_ttl": "180",
        "cps_enabled": "true",
        "cps_ti_enabled": "false",
        "cps_ttl": "180",
        "ddos_bgp_access_enabled": "false",
        "ddos_bgp_access_ttl": "180",
        "ddos_coo_access_enabled": "false",
        "ddos_coo_access_ti_enabled": "false",
        "ddos_coo_access_ttl": "180",
        "ddos_dip_access_enabled": "false",
        "ddos_dip_access_ti_enabled": "false",
        "ddos_dip_access_ttl": "180",
        "drds_audit_collection_policy": "",
        "drds_audit_enabled": "true",
        "drds_audit_ti_enabled": "false",
        "drds_audit_ttl": "7",
        "drds_sync_enabled": "true",
        "drds_sync_ttl": "180",
        "k8s_audit_collection_policy": "",
        "k8s_audit_enabled": "true",
        "k8s_audit_ttl": "180",
        "k8s_event_collection_policy": "",
        "k8s_event_enabled": "true",
        "k8s_event_ttl": "180",
        "k8s_ingress_collection_policy": "",
        "k8s_ingress_enabled": "true",
        "k8s_ingress_ttl": "180",
        "nas_enabled": "true",
        "nas_ti_enabled": "false",
        "nas_ttl": "180",
        "oss_access_enabled": "true",
        "oss_access_ti_enabled": "false",
        "oss_access_ttl": "7",
        "oss_metering_enabled": "true",
        "oss_metering_ttl": "180",
        "oss_sync_enabled": "true",
        "oss_sync_ttl": "180",
        "polardb_audit_collection_policy": "",
        "polardb_enabled": "true",
        "polardb_perf_collection_policy": "",
        "polardb_perf_enabled": "false",
        "polardb_perf_ttl": "180",
        "polardb_slow_collection_policy": "",
        "polardb_slow_enabled": "false",
        "polardb_slow_ttl": "180",
        "polardb_ti_enabled": "false",
        "polardb_ttl": "180",
        "rds_audit_collection_policy": "",
        "rds_enabled": "true",
        "rds_perf_collection_policy": "",
        "rds_perf_enabled": "false",
        "rds_perf_ttl": "180",
        "rds_slow_collection_policy": "",
        "rds_slow_enabled": "false",
        "rds_slow_ttl": "180",
        "rds_ti_enabled": "false",
        "rds_ttl": "180",
        "sas_crack_enabled": "true",
        "sas_dns_enabled": "true",
        "sas_http_enabled": "true",
        "sas_local_dns_enabled": "true",
        "sas_login_enabled": "true",
        "sas_network_enabled": "true",
        "sas_process_enabled": "true",
        "sas_security_alert_enabled": "true",
        "sas_security_hc_enabled": "true",
        "sas_security_vul_enabled": "true",
        "sas_session_enabled": "true",
        "sas_snapshot_account_enabled": "true",
        "sas_snapshot_port_enabled": "true",
        "sas_snapshot_process_enabled": "true",
        "sas_ti_enabled": "false",
        "sas_ttl": "180",
        "slb_access_collection_policy": "",
        "slb_access_enabled": "true",
        "slb_access_ti_enabled": "false",
        "slb_access_ttl": "7",
        "slb_sync_enabled": "true",
        "slb_sync_ttl": "180",
        "vpc_flow_collection_policy": "",
        "vpc_flow_enabled": "false",
        "vpc_flow_ttl": "7",
        "vpc_sync_enabled": "true",
        "vpc_sync_ttl": "180",
        "waf_enabled": "true",
        "waf_ti_enabled": "false",
        "waf_ttl": "180",
    })
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.Audit("example", {
    aliuid: "12345678",
    displayName: "tf-audit-test",
    variableMap: {
        actiontrail_enabled: "true",
        actiontrail_ti_enabled: "false",
        actiontrail_ttl: "180",
        apigateway_enabled: "true",
        apigateway_ti_enabled: "false",
        apigateway_ttl: "180",
        appconnect_enabled: "false",
        appconnect_ttl: "180",
        bastion_enabled: "true",
        bastion_ti_enabled: "false",
        bastion_ttl: "180",
        cloudfirewall_enabled: "true",
        cloudfirewall_ti_enabled: "false",
        cloudfirewall_ttl: "180",
        cps_enabled: "true",
        cps_ti_enabled: "false",
        cps_ttl: "180",
        ddos_bgp_access_enabled: "false",
        ddos_bgp_access_ttl: "180",
        ddos_coo_access_enabled: "false",
        ddos_coo_access_ti_enabled: "false",
        ddos_coo_access_ttl: "180",
        ddos_dip_access_enabled: "false",
        ddos_dip_access_ti_enabled: "false",
        ddos_dip_access_ttl: "180",
        drds_audit_collection_policy: "",
        drds_audit_enabled: "true",
        drds_audit_ti_enabled: "false",
        drds_audit_ttl: "7",
        drds_sync_enabled: "true",
        drds_sync_ttl: "180",
        k8s_audit_collection_policy: "",
        k8s_audit_enabled: "true",
        k8s_audit_ttl: "180",
        k8s_event_collection_policy: "",
        k8s_event_enabled: "true",
        k8s_event_ttl: "180",
        k8s_ingress_collection_policy: "",
        k8s_ingress_enabled: "true",
        k8s_ingress_ttl: "180",
        nas_enabled: "true",
        nas_ti_enabled: "false",
        nas_ttl: "180",
        oss_access_enabled: "true",
        oss_access_ti_enabled: "false",
        oss_access_ttl: "7",
        oss_metering_enabled: "true",
        oss_metering_ttl: "180",
        oss_sync_enabled: "true",
        oss_sync_ttl: "180",
        polardb_audit_collection_policy: "",
        polardb_enabled: "true",
        polardb_perf_collection_policy: "",
        polardb_perf_enabled: "false",
        polardb_perf_ttl: "180",
        polardb_slow_collection_policy: "",
        polardb_slow_enabled: "false",
        polardb_slow_ttl: "180",
        polardb_ti_enabled: "false",
        polardb_ttl: "180",
        rds_audit_collection_policy: "",
        rds_enabled: "true",
        rds_perf_collection_policy: "",
        rds_perf_enabled: "false",
        rds_perf_ttl: "180",
        rds_slow_collection_policy: "",
        rds_slow_enabled: "false",
        rds_slow_ttl: "180",
        rds_ti_enabled: "false",
        rds_ttl: "180",
        sas_crack_enabled: "true",
        sas_dns_enabled: "true",
        sas_http_enabled: "true",
        sas_local_dns_enabled: "true",
        sas_login_enabled: "true",
        sas_network_enabled: "true",
        sas_process_enabled: "true",
        sas_security_alert_enabled: "true",
        sas_security_hc_enabled: "true",
        sas_security_vul_enabled: "true",
        sas_session_enabled: "true",
        sas_snapshot_account_enabled: "true",
        sas_snapshot_port_enabled: "true",
        sas_snapshot_process_enabled: "true",
        sas_ti_enabled: "false",
        sas_ttl: "180",
        slb_access_collection_policy: "",
        slb_access_enabled: "true",
        slb_access_ti_enabled: "false",
        slb_access_ttl: "7",
        slb_sync_enabled: "true",
        slb_sync_ttl: "180",
        vpc_flow_collection_policy: "",
        vpc_flow_enabled: "false",
        vpc_flow_ttl: "7",
        vpc_sync_enabled: "true",
        vpc_sync_ttl: "180",
        waf_enabled: "true",
        waf_ti_enabled: "false",
        waf_ttl: "180",
    },
});
resources:
  example:
    type: alicloud:log:Audit
    properties:
      aliuid: 12345678
      displayName: tf-audit-test
      variableMap:
        actiontrail_enabled: true
        actiontrail_ti_enabled: false
        actiontrail_ttl: 180
        apigateway_enabled: true
        apigateway_ti_enabled: false
        apigateway_ttl: 180
        appconnect_enabled: false
        appconnect_ttl: 180
        bastion_enabled: true
        bastion_ti_enabled: false
        bastion_ttl: 180
        cloudfirewall_enabled: true
        cloudfirewall_ti_enabled: false
        cloudfirewall_ttl: 180
        cps_enabled: true
        cps_ti_enabled: false
        cps_ttl: 180
        ddos_bgp_access_enabled: false
        ddos_bgp_access_ttl: 180
        ddos_coo_access_enabled: false
        ddos_coo_access_ti_enabled: false
        ddos_coo_access_ttl: 180
        ddos_dip_access_enabled: false
        ddos_dip_access_ti_enabled: false
        ddos_dip_access_ttl: 180
        drds_audit_collection_policy:
        drds_audit_enabled: true
        drds_audit_ti_enabled: false
        drds_audit_ttl: 7
        drds_sync_enabled: true
        drds_sync_ttl: 180
        k8s_audit_collection_policy:
        k8s_audit_enabled: true
        k8s_audit_ttl: 180
        k8s_event_collection_policy:
        k8s_event_enabled: true
        k8s_event_ttl: 180
        k8s_ingress_collection_policy:
        k8s_ingress_enabled: true
        k8s_ingress_ttl: 180
        nas_enabled: true
        nas_ti_enabled: false
        nas_ttl: 180
        oss_access_enabled: true
        oss_access_ti_enabled: false
        oss_access_ttl: 7
        oss_metering_enabled: true
        oss_metering_ttl: 180
        oss_sync_enabled: true
        oss_sync_ttl: 180
        polardb_audit_collection_policy:
        polardb_enabled: true
        polardb_perf_collection_policy:
        polardb_perf_enabled: false
        polardb_perf_ttl: 180
        polardb_slow_collection_policy:
        polardb_slow_enabled: false
        polardb_slow_ttl: 180
        polardb_ti_enabled: false
        polardb_ttl: 180
        rds_audit_collection_policy:
        rds_enabled: true
        rds_perf_collection_policy:
        rds_perf_enabled: false
        rds_perf_ttl: 180
        rds_slow_collection_policy:
        rds_slow_enabled: false
        rds_slow_ttl: 180
        rds_ti_enabled: false
        rds_ttl: 180
        sas_crack_enabled: true
        sas_dns_enabled: true
        sas_http_enabled: true
        sas_local_dns_enabled: true
        sas_login_enabled: true
        sas_network_enabled: true
        sas_process_enabled: true
        sas_security_alert_enabled: true
        sas_security_hc_enabled: true
        sas_security_vul_enabled: true
        sas_session_enabled: true
        sas_snapshot_account_enabled: true
        sas_snapshot_port_enabled: true
        sas_snapshot_process_enabled: true
        sas_ti_enabled: false
        sas_ttl: 180
        slb_access_collection_policy:
        slb_access_enabled: true
        slb_access_ti_enabled: false
        slb_access_ttl: 7
        slb_sync_enabled: true
        slb_sync_ttl: 180
        vpc_flow_collection_policy:
        vpc_flow_enabled: false
        vpc_flow_ttl: 7
        vpc_sync_enabled: true
        vpc_sync_ttl: 180
        waf_enabled: true
        waf_ti_enabled: false
        waf_ttl: 180

Multiple accounts Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Log.Audit("example", new AliCloud.Log.AuditArgs
        {
            Aliuid = "12345678",
            DisplayName = "tf-audit-test",
            MultiAccounts = 
            {
                "123456789123",
                "12345678912300123",
            },
            VariableMap = 
            {
                { "actiontrail_enabled", "true" },
                { "actiontrail_ttl", "180" },
                { "oss_access_enabled", "true" },
                { "oss_access_ttl", "180" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := log.NewAudit(ctx, "example", &log.AuditArgs{
			Aliuid:      pulumi.String("12345678"),
			DisplayName: pulumi.String("tf-audit-test"),
			MultiAccounts: pulumi.StringArray{
				pulumi.String("123456789123"),
				pulumi.String("12345678912300123"),
			},
			VariableMap: pulumi.AnyMap{
				"actiontrail_enabled": pulumi.Any("true"),
				"actiontrail_ttl":     pulumi.Any("180"),
				"oss_access_enabled":  pulumi.Any("true"),
				"oss_access_ttl":      pulumi.Any("180"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Audit;
import com.pulumi.alicloud.log.AuditArgs;
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 Audit("example", AuditArgs.builder()        
            .aliuid("12345678")
            .displayName("tf-audit-test")
            .multiAccounts(            
                "123456789123",
                "12345678912300123")
            .variableMap(Map.ofEntries(
                Map.entry("actiontrail_enabled", "true"),
                Map.entry("actiontrail_ttl", "180"),
                Map.entry("oss_access_enabled", "true"),
                Map.entry("oss_access_ttl", "180")
            ))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.Audit("example",
    aliuid="12345678",
    display_name="tf-audit-test",
    multi_accounts=[
        "123456789123",
        "12345678912300123",
    ],
    variable_map={
        "actiontrail_enabled": "true",
        "actiontrail_ttl": "180",
        "oss_access_enabled": "true",
        "oss_access_ttl": "180",
    })
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.Audit("example", {
    aliuid: "12345678",
    displayName: "tf-audit-test",
    multiAccounts: [
        "123456789123",
        "12345678912300123",
    ],
    variableMap: {
        actiontrail_enabled: "true",
        actiontrail_ttl: "180",
        oss_access_enabled: "true",
        oss_access_ttl: "180",
    },
});
resources:
  example:
    type: alicloud:log:Audit
    properties:
      aliuid: 12345678
      displayName: tf-audit-test
      multiAccounts:
        - 123456789123
        - 12345678912300123
      variableMap:
        actiontrail_enabled: true
        actiontrail_ttl: 180
        oss_access_enabled: true
        oss_access_ttl: 180

Resource Directory Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Log.Audit("example", new AliCloud.Log.AuditArgs
        {
            Aliuid = "12345678",
            DisplayName = "tf-audit-test",
            ResourceDirectoryType = "all",
            VariableMap = 
            {
                { "actiontrail_enabled", "true" },
                { "actiontrail_ttl", "180" },
                { "oss_access_enabled", "true" },
                { "oss_access_ttl", "180" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := log.NewAudit(ctx, "example", &log.AuditArgs{
			Aliuid:                pulumi.String("12345678"),
			DisplayName:           pulumi.String("tf-audit-test"),
			ResourceDirectoryType: pulumi.String("all"),
			VariableMap: pulumi.AnyMap{
				"actiontrail_enabled": pulumi.Any("true"),
				"actiontrail_ttl":     pulumi.Any("180"),
				"oss_access_enabled":  pulumi.Any("true"),
				"oss_access_ttl":      pulumi.Any("180"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Audit;
import com.pulumi.alicloud.log.AuditArgs;
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 Audit("example", AuditArgs.builder()        
            .aliuid("12345678")
            .displayName("tf-audit-test")
            .resourceDirectoryType("all")
            .variableMap(Map.ofEntries(
                Map.entry("actiontrail_enabled", "true"),
                Map.entry("actiontrail_ttl", "180"),
                Map.entry("oss_access_enabled", "true"),
                Map.entry("oss_access_ttl", "180")
            ))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.Audit("example",
    aliuid="12345678",
    display_name="tf-audit-test",
    resource_directory_type="all",
    variable_map={
        "actiontrail_enabled": "true",
        "actiontrail_ttl": "180",
        "oss_access_enabled": "true",
        "oss_access_ttl": "180",
    })
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.Audit("example", {
    aliuid: "12345678",
    displayName: "tf-audit-test",
    resourceDirectoryType: "all",
    variableMap: {
        actiontrail_enabled: "true",
        actiontrail_ttl: "180",
        oss_access_enabled: "true",
        oss_access_ttl: "180",
    },
});
resources:
  example:
    type: alicloud:log:Audit
    properties:
      aliuid: 12345678
      displayName: tf-audit-test
      resourceDirectoryType: all
      variableMap:
        actiontrail_enabled: true
        actiontrail_ttl: 180
        oss_access_enabled: true
        oss_access_ttl: 180
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Log.Audit("example", new AliCloud.Log.AuditArgs
        {
            Aliuid = "12345678",
            DisplayName = "tf-audit-test",
            MultiAccounts = 
            {
                "123456789123",
                "12345678912300123",
            },
            ResourceDirectoryType = "custom",
            VariableMap = 
            {
                { "actiontrail_enabled", "true" },
                { "actiontrail_ttl", "180" },
                { "oss_access_enabled", "true" },
                { "oss_access_ttl", "180" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := log.NewAudit(ctx, "example", &log.AuditArgs{
			Aliuid:      pulumi.String("12345678"),
			DisplayName: pulumi.String("tf-audit-test"),
			MultiAccounts: pulumi.StringArray{
				pulumi.String("123456789123"),
				pulumi.String("12345678912300123"),
			},
			ResourceDirectoryType: pulumi.String("custom"),
			VariableMap: pulumi.AnyMap{
				"actiontrail_enabled": pulumi.Any("true"),
				"actiontrail_ttl":     pulumi.Any("180"),
				"oss_access_enabled":  pulumi.Any("true"),
				"oss_access_ttl":      pulumi.Any("180"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Audit;
import com.pulumi.alicloud.log.AuditArgs;
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 Audit("example", AuditArgs.builder()        
            .aliuid("12345678")
            .displayName("tf-audit-test")
            .multiAccounts(            
                "123456789123",
                "12345678912300123")
            .resourceDirectoryType("custom")
            .variableMap(Map.ofEntries(
                Map.entry("actiontrail_enabled", "true"),
                Map.entry("actiontrail_ttl", "180"),
                Map.entry("oss_access_enabled", "true"),
                Map.entry("oss_access_ttl", "180")
            ))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.log.Audit("example",
    aliuid="12345678",
    display_name="tf-audit-test",
    multi_accounts=[
        "123456789123",
        "12345678912300123",
    ],
    resource_directory_type="custom",
    variable_map={
        "actiontrail_enabled": "true",
        "actiontrail_ttl": "180",
        "oss_access_enabled": "true",
        "oss_access_ttl": "180",
    })
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.log.Audit("example", {
    aliuid: "12345678",
    displayName: "tf-audit-test",
    multiAccounts: [
        "123456789123",
        "12345678912300123",
    ],
    resourceDirectoryType: "custom",
    variableMap: {
        actiontrail_enabled: "true",
        actiontrail_ttl: "180",
        oss_access_enabled: "true",
        oss_access_ttl: "180",
    },
});
resources:
  example:
    type: alicloud:log:Audit
    properties:
      aliuid: 12345678
      displayName: tf-audit-test
      multiAccounts:
        - 123456789123
        - 12345678912300123
      resourceDirectoryType: custom
      variableMap:
        actiontrail_enabled: true
        actiontrail_ttl: 180
        oss_access_enabled: true
        oss_access_ttl: 180

Create Audit Resource

new Audit(name: string, args: AuditArgs, opts?: CustomResourceOptions);
@overload
def Audit(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          aliuid: Optional[str] = None,
          display_name: Optional[str] = None,
          multi_accounts: Optional[Sequence[str]] = None,
          resource_directory_type: Optional[str] = None,
          variable_map: Optional[Mapping[str, Any]] = None)
@overload
def Audit(resource_name: str,
          args: AuditArgs,
          opts: Optional[ResourceOptions] = None)
func NewAudit(ctx *Context, name string, args AuditArgs, opts ...ResourceOption) (*Audit, error)
public Audit(string name, AuditArgs args, CustomResourceOptions? opts = null)
public Audit(String name, AuditArgs args)
public Audit(String name, AuditArgs args, CustomResourceOptions options)
type: alicloud:log:Audit
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AuditArgs
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 AuditArgs
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 AuditArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuditArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AuditArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Audit Resource Properties

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

Inputs

The Audit resource accepts the following input properties:

Aliuid string

Aliuid value of your account.

DisplayName string

Name of SLS log audit.

MultiAccounts List<string>

Multi-account configuration, please fill in multiple aliuid.

ResourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

VariableMap Dictionary<string, object>

Log audit detailed configuration.

Aliuid string

Aliuid value of your account.

DisplayName string

Name of SLS log audit.

MultiAccounts []string

Multi-account configuration, please fill in multiple aliuid.

ResourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

VariableMap map[string]interface{}

Log audit detailed configuration.

aliuid String

Aliuid value of your account.

displayName String

Name of SLS log audit.

multiAccounts List<String>

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType String

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap Map<String,Object>

Log audit detailed configuration.

aliuid string

Aliuid value of your account.

displayName string

Name of SLS log audit.

multiAccounts string[]

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap {[key: string]: any}

Log audit detailed configuration.

aliuid str

Aliuid value of your account.

display_name str

Name of SLS log audit.

multi_accounts Sequence[str]

Multi-account configuration, please fill in multiple aliuid.

resource_directory_type str

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variable_map Mapping[str, Any]

Log audit detailed configuration.

aliuid String

Aliuid value of your account.

displayName String

Name of SLS log audit.

multiAccounts List<String>

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType String

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap Map<Any>

Log audit detailed configuration.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Audit Resource

Get an existing Audit 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?: AuditState, opts?: CustomResourceOptions): Audit
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aliuid: Optional[str] = None,
        display_name: Optional[str] = None,
        multi_accounts: Optional[Sequence[str]] = None,
        resource_directory_type: Optional[str] = None,
        variable_map: Optional[Mapping[str, Any]] = None) -> Audit
func GetAudit(ctx *Context, name string, id IDInput, state *AuditState, opts ...ResourceOption) (*Audit, error)
public static Audit Get(string name, Input<string> id, AuditState? state, CustomResourceOptions? opts = null)
public static Audit get(String name, Output<String> id, AuditState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Aliuid string

Aliuid value of your account.

DisplayName string

Name of SLS log audit.

MultiAccounts List<string>

Multi-account configuration, please fill in multiple aliuid.

ResourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

VariableMap Dictionary<string, object>

Log audit detailed configuration.

Aliuid string

Aliuid value of your account.

DisplayName string

Name of SLS log audit.

MultiAccounts []string

Multi-account configuration, please fill in multiple aliuid.

ResourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

VariableMap map[string]interface{}

Log audit detailed configuration.

aliuid String

Aliuid value of your account.

displayName String

Name of SLS log audit.

multiAccounts List<String>

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType String

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap Map<String,Object>

Log audit detailed configuration.

aliuid string

Aliuid value of your account.

displayName string

Name of SLS log audit.

multiAccounts string[]

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType string

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap {[key: string]: any}

Log audit detailed configuration.

aliuid str

Aliuid value of your account.

display_name str

Name of SLS log audit.

multi_accounts Sequence[str]

Multi-account configuration, please fill in multiple aliuid.

resource_directory_type str

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variable_map Mapping[str, Any]

Log audit detailed configuration.

aliuid String

Aliuid value of your account.

displayName String

Name of SLS log audit.

multiAccounts List<String>

Multi-account configuration, please fill in multiple aliuid.

resourceDirectoryType String

Resource Directory type. Optional values are all or custom. If the value is custom, argument multi_account should be provided.

variableMap Map<Any>

Log audit detailed configuration.

Import

Log audit can be imported using the id, e.g.

 $ pulumi import alicloud:log/audit:Audit example tf-audit-test

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.