AuditLogConfig

Provides a Redis And Memcache (KVStore) Audit Log Config resource.

NOTE: Available in v1.130.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.KVStore.AuditLogConfig("example", new AliCloud.KVStore.AuditLogConfigArgs
        {
            DbAudit = true,
            InstanceId = "r-abc123455",
            Retention = 1,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kvstore.NewAuditLogConfig(ctx, "example", &kvstore.AuditLogConfigArgs{
			DbAudit:    pulumi.Bool(true),
			InstanceId: pulumi.String("r-abc123455"),
			Retention:  pulumi.Int(1),
		})
		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.kvstore.AuditLogConfig;
import com.pulumi.alicloud.kvstore.AuditLogConfigArgs;
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 AuditLogConfig("example", AuditLogConfigArgs.builder()        
            .dbAudit(true)
            .instanceId("r-abc123455")
            .retention(1)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.kvstore.AuditLogConfig("example",
    db_audit=True,
    instance_id="r-abc123455",
    retention=1)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.kvstore.AuditLogConfig("example", {
    dbAudit: true,
    instanceId: "r-abc123455",
    retention: 1,
});
resources:
  example:
    type: alicloud:kvstore:AuditLogConfig
    properties:
      dbAudit: true
      instanceId: r-abc123455
      retention: 1

Create AuditLogConfig Resource

new AuditLogConfig(name: string, args: AuditLogConfigArgs, opts?: CustomResourceOptions);
@overload
def AuditLogConfig(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   db_audit: Optional[bool] = None,
                   instance_id: Optional[str] = None,
                   retention: Optional[int] = None)
@overload
def AuditLogConfig(resource_name: str,
                   args: AuditLogConfigArgs,
                   opts: Optional[ResourceOptions] = None)
func NewAuditLogConfig(ctx *Context, name string, args AuditLogConfigArgs, opts ...ResourceOption) (*AuditLogConfig, error)
public AuditLogConfig(string name, AuditLogConfigArgs args, CustomResourceOptions? opts = null)
public AuditLogConfig(String name, AuditLogConfigArgs args)
public AuditLogConfig(String name, AuditLogConfigArgs args, CustomResourceOptions options)
type: alicloud:kvstore:AuditLogConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

InstanceId string

Instance ID, Call the Describeinstances Get.

DbAudit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
Retention int

Audit Log Retention Period Value: 1~365.

InstanceId string

Instance ID, Call the Describeinstances Get.

DbAudit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
Retention int

Audit Log Retention Period Value: 1~365.

instanceId String

Instance ID, Call the Describeinstances Get.

dbAudit Boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
retention Integer

Audit Log Retention Period Value: 1~365.

instanceId string

Instance ID, Call the Describeinstances Get.

dbAudit boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
retention number

Audit Log Retention Period Value: 1~365.

instance_id str

Instance ID, Call the Describeinstances Get.

db_audit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
retention int

Audit Log Retention Period Value: 1~365.

instanceId String

Instance ID, Call the Describeinstances Get.

dbAudit Boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
retention Number

Audit Log Retention Period Value: 1~365.

Outputs

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

CreateTime string

Instance Creation Time.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

CreateTime string

Instance Creation Time.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

createTime String

Instance Creation Time.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

createTime string

Instance Creation Time.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the resource.

create_time str

Instance Creation Time.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the resource.

createTime String

Instance Creation Time.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

Look up Existing AuditLogConfig Resource

Get an existing AuditLogConfig 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?: AuditLogConfigState, opts?: CustomResourceOptions): AuditLogConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        db_audit: Optional[bool] = None,
        instance_id: Optional[str] = None,
        retention: Optional[int] = None,
        status: Optional[str] = None) -> AuditLogConfig
func GetAuditLogConfig(ctx *Context, name string, id IDInput, state *AuditLogConfigState, opts ...ResourceOption) (*AuditLogConfig, error)
public static AuditLogConfig Get(string name, Input<string> id, AuditLogConfigState? state, CustomResourceOptions? opts = null)
public static AuditLogConfig get(String name, Output<String> id, AuditLogConfigState 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:
CreateTime string

Instance Creation Time.

DbAudit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
InstanceId string

Instance ID, Call the Describeinstances Get.

Retention int

Audit Log Retention Period Value: 1~365.

Status string

The status of the resource.

CreateTime string

Instance Creation Time.

DbAudit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
InstanceId string

Instance ID, Call the Describeinstances Get.

Retention int

Audit Log Retention Period Value: 1~365.

Status string

The status of the resource.

createTime String

Instance Creation Time.

dbAudit Boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
instanceId String

Instance ID, Call the Describeinstances Get.

retention Integer

Audit Log Retention Period Value: 1~365.

status String

The status of the resource.

createTime string

Instance Creation Time.

dbAudit boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
instanceId string

Instance ID, Call the Describeinstances Get.

retention number

Audit Log Retention Period Value: 1~365.

status string

The status of the resource.

create_time str

Instance Creation Time.

db_audit bool

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
instance_id str

Instance ID, Call the Describeinstances Get.

retention int

Audit Log Retention Period Value: 1~365.

status str

The status of the resource.

createTime String

Instance Creation Time.

dbAudit Boolean

Indicates Whether to Enable the Audit Log. Valid value:

  • true: Default Value, Open.
  • false: Closed.
instanceId String

Instance ID, Call the Describeinstances Get.

retention Number

Audit Log Retention Period Value: 1~365.

status String

The status of the resource.

Import

Redis And Memcache (KVStore) Audit Log Config can be imported using the id, e.g.

 $ pulumi import alicloud:kvstore/auditLogConfig:AuditLogConfig example <instance_id>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.