Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

AuditPolicy

Provides a MongoDB Audit Policy resource.

For information about MongoDB Audit Policy and how to use it, see What is Audit Policy.

NOTE: Available in v1.148.0+.

Create a AuditPolicy Resource

new AuditPolicy(name: string, args: AuditPolicyArgs, opts?: CustomResourceOptions);
@overload
def AuditPolicy(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                audit_status: Optional[str] = None,
                db_instance_id: Optional[str] = None,
                storage_period: Optional[int] = None)
@overload
def AuditPolicy(resource_name: str,
                args: AuditPolicyArgs,
                opts: Optional[ResourceOptions] = None)
func NewAuditPolicy(ctx *Context, name string, args AuditPolicyArgs, opts ...ResourceOption) (*AuditPolicy, error)
public AuditPolicy(string name, AuditPolicyArgs args, CustomResourceOptions? opts = null)
public AuditPolicy(String name, AuditPolicyArgs args)
public AuditPolicy(String name, AuditPolicyArgs args, CustomResourceOptions options)
type: alicloud:mongodb:AuditPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

AuditStatus string

The status of the audit log. Valid values: disabled, enable.

DbInstanceId string

The ID of the instance.

StoragePeriod int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

AuditStatus string

The status of the audit log. Valid values: disabled, enable.

DbInstanceId string

The ID of the instance.

StoragePeriod int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus String

The status of the audit log. Valid values: disabled, enable.

dbInstanceId String

The ID of the instance.

storagePeriod Integer

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus string

The status of the audit log. Valid values: disabled, enable.

dbInstanceId string

The ID of the instance.

storagePeriod number

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

audit_status str

The status of the audit log. Valid values: disabled, enable.

db_instance_id str

The ID of the instance.

storage_period int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus String

The status of the audit log. Valid values: disabled, enable.

dbInstanceId String

The ID of the instance.

storagePeriod Number

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

Outputs

All input properties are implicitly available as output properties. Additionally, the AuditPolicy 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 an Existing AuditPolicy Resource

Get an existing AuditPolicy 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?: AuditPolicyState, opts?: CustomResourceOptions): AuditPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        audit_status: Optional[str] = None,
        db_instance_id: Optional[str] = None,
        storage_period: Optional[int] = None) -> AuditPolicy
func GetAuditPolicy(ctx *Context, name string, id IDInput, state *AuditPolicyState, opts ...ResourceOption) (*AuditPolicy, error)
public static AuditPolicy Get(string name, Input<string> id, AuditPolicyState? state, CustomResourceOptions? opts = null)
public static AuditPolicy get(String name, Output<String> id, AuditPolicyState 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:
AuditStatus string

The status of the audit log. Valid values: disabled, enable.

DbInstanceId string

The ID of the instance.

StoragePeriod int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

AuditStatus string

The status of the audit log. Valid values: disabled, enable.

DbInstanceId string

The ID of the instance.

StoragePeriod int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus String

The status of the audit log. Valid values: disabled, enable.

dbInstanceId String

The ID of the instance.

storagePeriod Integer

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus string

The status of the audit log. Valid values: disabled, enable.

dbInstanceId string

The ID of the instance.

storagePeriod number

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

audit_status str

The status of the audit log. Valid values: disabled, enable.

db_instance_id str

The ID of the instance.

storage_period int

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

auditStatus String

The status of the audit log. Valid values: disabled, enable.

dbInstanceId String

The ID of the instance.

storagePeriod Number

The retention period of audit logs. Valid values: 1 to 30. Default value: 30.

Import

MongoDB Audit Policy can be imported using the id, e.g.

 $ pulumi import alicloud:mongodb/auditPolicy:AuditPolicy example <db_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.