flexibleengine.DdsAuditLogPolicy
Explore with Pulumi AI
Manages a DDS audit log policy resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const instanceId = config.requireObject("instanceId");
const keepDays = config.requireObject("keepDays");
const test = new flexibleengine.DdsAuditLogPolicy("test", {
instanceId: instanceId,
keepDays: keepDays,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
keep_days = config.require_object("keepDays")
test = flexibleengine.DdsAuditLogPolicy("test",
instance_id=instance_id,
keep_days=keep_days)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
instanceId := cfg.RequireObject("instanceId")
keepDays := cfg.RequireObject("keepDays")
_, err := flexibleengine.NewDdsAuditLogPolicy(ctx, "test", &flexibleengine.DdsAuditLogPolicyArgs{
InstanceId: pulumi.Any(instanceId),
KeepDays: pulumi.Any(keepDays),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var instanceId = config.RequireObject<dynamic>("instanceId");
var keepDays = config.RequireObject<dynamic>("keepDays");
var test = new Flexibleengine.DdsAuditLogPolicy("test", new()
{
InstanceId = instanceId,
KeepDays = keepDays,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.DdsAuditLogPolicy;
import com.pulumi.flexibleengine.DdsAuditLogPolicyArgs;
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) {
final var config = ctx.config();
final var instanceId = config.get("instanceId");
final var keepDays = config.get("keepDays");
var test = new DdsAuditLogPolicy("test", DdsAuditLogPolicyArgs.builder()
.instanceId(instanceId)
.keepDays(keepDays)
.build());
}
}
configuration:
instanceId:
type: dynamic
keepDays:
type: dynamic
resources:
test:
type: flexibleengine:DdsAuditLogPolicy
properties:
instanceId: ${instanceId}
keepDays: ${keepDays}
Create DdsAuditLogPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DdsAuditLogPolicy(name: string, args: DdsAuditLogPolicyArgs, opts?: CustomResourceOptions);
@overload
def DdsAuditLogPolicy(resource_name: str,
args: DdsAuditLogPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DdsAuditLogPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
audit_scope: Optional[str] = None,
audit_types: Optional[Sequence[str]] = None,
dds_audit_log_policy_id: Optional[str] = None,
region: Optional[str] = None,
reserve_auditlogs: Optional[str] = None)
func NewDdsAuditLogPolicy(ctx *Context, name string, args DdsAuditLogPolicyArgs, opts ...ResourceOption) (*DdsAuditLogPolicy, error)
public DdsAuditLogPolicy(string name, DdsAuditLogPolicyArgs args, CustomResourceOptions? opts = null)
public DdsAuditLogPolicy(String name, DdsAuditLogPolicyArgs args)
public DdsAuditLogPolicy(String name, DdsAuditLogPolicyArgs args, CustomResourceOptions options)
type: flexibleengine:DdsAuditLogPolicy
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 DdsAuditLogPolicyArgs
- 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 DdsAuditLogPolicyArgs
- 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 DdsAuditLogPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DdsAuditLogPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DdsAuditLogPolicyArgs
- 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 ddsAuditLogPolicyResource = new Flexibleengine.DdsAuditLogPolicy("ddsAuditLogPolicyResource", new()
{
InstanceId = "string",
KeepDays = 0,
AuditScope = "string",
AuditTypes = new[]
{
"string",
},
DdsAuditLogPolicyId = "string",
Region = "string",
ReserveAuditlogs = "string",
});
example, err := flexibleengine.NewDdsAuditLogPolicy(ctx, "ddsAuditLogPolicyResource", &flexibleengine.DdsAuditLogPolicyArgs{
InstanceId: pulumi.String("string"),
KeepDays: pulumi.Float64(0),
AuditScope: pulumi.String("string"),
AuditTypes: pulumi.StringArray{
pulumi.String("string"),
},
DdsAuditLogPolicyId: pulumi.String("string"),
Region: pulumi.String("string"),
ReserveAuditlogs: pulumi.String("string"),
})
var ddsAuditLogPolicyResource = new DdsAuditLogPolicy("ddsAuditLogPolicyResource", DdsAuditLogPolicyArgs.builder()
.instanceId("string")
.keepDays(0)
.auditScope("string")
.auditTypes("string")
.ddsAuditLogPolicyId("string")
.region("string")
.reserveAuditlogs("string")
.build());
dds_audit_log_policy_resource = flexibleengine.DdsAuditLogPolicy("ddsAuditLogPolicyResource",
instance_id="string",
keep_days=0,
audit_scope="string",
audit_types=["string"],
dds_audit_log_policy_id="string",
region="string",
reserve_auditlogs="string")
const ddsAuditLogPolicyResource = new flexibleengine.DdsAuditLogPolicy("ddsAuditLogPolicyResource", {
instanceId: "string",
keepDays: 0,
auditScope: "string",
auditTypes: ["string"],
ddsAuditLogPolicyId: "string",
region: "string",
reserveAuditlogs: "string",
});
type: flexibleengine:DdsAuditLogPolicy
properties:
auditScope: string
auditTypes:
- string
ddsAuditLogPolicyId: string
instanceId: string
keepDays: 0
region: string
reserveAuditlogs: string
DdsAuditLogPolicy 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 DdsAuditLogPolicy resource accepts the following input properties:
- Instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- Audit
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- Audit
Types List<string> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- Dds
Audit stringLog Policy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- Instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- Audit
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- Audit
Types []string - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- Dds
Audit stringLog Policy Id - The resource ID.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- instance
Id String Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- audit
Scope String - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types List<String> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit StringLog Policy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs String - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- audit
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types string[] - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit stringLog Policy Id - The resource ID.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- instance_
id str Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- audit_
scope str - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit_
types Sequence[str] - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds_
audit_ strlog_ policy_ id - The resource ID.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve_
auditlogs str - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- instance
Id String Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- audit
Scope String - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types List<String> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit StringLog Policy Id - The resource ID.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs String - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the DdsAuditLogPolicy 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 DdsAuditLogPolicy Resource
Get an existing DdsAuditLogPolicy 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?: DdsAuditLogPolicyState, opts?: CustomResourceOptions): DdsAuditLogPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
audit_scope: Optional[str] = None,
audit_types: Optional[Sequence[str]] = None,
dds_audit_log_policy_id: Optional[str] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
region: Optional[str] = None,
reserve_auditlogs: Optional[str] = None) -> DdsAuditLogPolicy
func GetDdsAuditLogPolicy(ctx *Context, name string, id IDInput, state *DdsAuditLogPolicyState, opts ...ResourceOption) (*DdsAuditLogPolicy, error)
public static DdsAuditLogPolicy Get(string name, Input<string> id, DdsAuditLogPolicyState? state, CustomResourceOptions? opts = null)
public static DdsAuditLogPolicy get(String name, Output<String> id, DdsAuditLogPolicyState state, CustomResourceOptions options)
resources: _: type: flexibleengine:DdsAuditLogPolicy 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
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- Audit
Types List<string> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- Dds
Audit stringLog Policy Id - The resource ID.
- Instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- Audit
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- Audit
Types []string - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- Dds
Audit stringLog Policy Id - The resource ID.
- Instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- audit
Scope String - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types List<String> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit StringLog Policy Id - The resource ID.
- instance
Id String Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs String - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- audit
Scope string - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types string[] - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit stringLog Policy Id - The resource ID.
- instance
Id string Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs string - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- audit_
scope str - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit_
types Sequence[str] - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds_
audit_ strlog_ policy_ id - The resource ID.
- instance_
id str Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve_
auditlogs str - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
- audit
Scope String - Specifies the audit scope. If this parameter is left blank or set to all, all audit log policies are enabled. You can enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters "[]{}():? The dollar sign ($) can be used only in escape mode.
- audit
Types List<String> - Specifies the audit type. The value is auth, insert, delete, update, query or command.
- dds
Audit StringLog Policy Id - The resource ID.
- instance
Id String Specifies the ID of the DDS instance.
Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days for storing audit logs. The value ranges from 7 to 732.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- reserve
Auditlogs String - Specifies whether the historical audit logs are
retained when SQL audit is disabled.
- true: indicates that historical audit logs are retained when SQL audit is disabled.(default value)
- false: indicates that existing historical audit logs are deleted when SQL audit is disabled.
Import
The DDS audit log policy can be imported using the instance ID, e.g.:
$ pulumi import flexibleengine:index/ddsAuditLogPolicy:DdsAuditLogPolicy test <instance_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.