Import
Mongodb Audit Policy can be imported using the id, e.g.
$ pulumi import alicloud:mongodb/auditPolicy:AuditPolicy example <id>
Create AuditPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AuditPolicy(name: string, args: AuditPolicyArgs, opts?: CustomResourceOptions);@overload
def AuditPolicy(resource_name: str,
args: AuditPolicyArgs,
opts: Optional[ResourceOptions] = None)
@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)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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var auditPolicyResource = new AliCloud.MongoDB.AuditPolicy("auditPolicyResource", new()
{
AuditStatus = "string",
DbInstanceId = "string",
StoragePeriod = 0,
});
example, err := mongodb.NewAuditPolicy(ctx, "auditPolicyResource", &mongodb.AuditPolicyArgs{
AuditStatus: pulumi.String("string"),
DbInstanceId: pulumi.String("string"),
StoragePeriod: pulumi.Int(0),
})
var auditPolicyResource = new AuditPolicy("auditPolicyResource", AuditPolicyArgs.builder()
.auditStatus("string")
.dbInstanceId("string")
.storagePeriod(0)
.build());
audit_policy_resource = alicloud.mongodb.AuditPolicy("auditPolicyResource",
audit_status="string",
db_instance_id="string",
storage_period=0)
const auditPolicyResource = new alicloud.mongodb.AuditPolicy("auditPolicyResource", {
auditStatus: "string",
dbInstanceId: "string",
storagePeriod: 0,
});
type: alicloud:mongodb:AuditPolicy
properties:
auditStatus: string
dbInstanceId: string
storagePeriod: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AuditPolicy resource accepts the following input properties:
- Audit
Status string - Audit state, Valid values:
enable,disabled. - Db
Instance stringId - Database Instance Id
- Storage
Period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- Audit
Status string - Audit state, Valid values:
enable,disabled. - Db
Instance stringId - Database Instance Id
- Storage
Period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status String - Audit state, Valid values:
enable,disabled. - db
Instance StringId - Database Instance Id
- storage
Period Integer - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status string - Audit state, Valid values:
enable,disabled. - db
Instance stringId - Database Instance Id
- storage
Period number - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit_
status str - Audit state, Valid values:
enable,disabled. - db_
instance_ strid - Database Instance Id
- storage_
period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status String - Audit state, Valid values:
enable,disabled. - db
Instance StringId - Database Instance Id
- storage
Period Number - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
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 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) -> AuditPolicyfunc 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)resources: _: type: alicloud:mongodb:AuditPolicy 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.
- Audit
Status string - Audit state, Valid values:
enable,disabled. - Db
Instance stringId - Database Instance Id
- Storage
Period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- Audit
Status string - Audit state, Valid values:
enable,disabled. - Db
Instance stringId - Database Instance Id
- Storage
Period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status String - Audit state, Valid values:
enable,disabled. - db
Instance StringId - Database Instance Id
- storage
Period Integer - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status string - Audit state, Valid values:
enable,disabled. - db
Instance stringId - Database Instance Id
- storage
Period number - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit_
status str - Audit state, Valid values:
enable,disabled. - db_
instance_ strid - Database Instance Id
- storage_
period int - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
- audit
Status String - Audit state, Valid values:
enable,disabled. - db
Instance StringId - Database Instance Id
- storage
Period Number - Audit log retention duration. The value range is 1 to 365 days. The default value is 30 days.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
