flexibleengine.RdsSqlAudit
Explore with Pulumi AI
Manages RDS SQL audit resource within FlexibleEngine.
NOTE: Only MySQL and PostgreSQL engines are supported.
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 test = new flexibleengine.RdsSqlAudit("test", {
instanceId: instanceId,
keepDays: 5,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
test = flexibleengine.RdsSqlAudit("test",
instance_id=instance_id,
keep_days=5)
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")
_, err := flexibleengine.NewRdsSqlAudit(ctx, "test", &flexibleengine.RdsSqlAuditArgs{
InstanceId: pulumi.Any(instanceId),
KeepDays: pulumi.Float64(5),
})
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 test = new Flexibleengine.RdsSqlAudit("test", new()
{
InstanceId = instanceId,
KeepDays = 5,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.RdsSqlAudit;
import com.pulumi.flexibleengine.RdsSqlAuditArgs;
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");
var test = new RdsSqlAudit("test", RdsSqlAuditArgs.builder()
.instanceId(instanceId)
.keepDays(5)
.build());
}
}
configuration:
instanceId:
type: dynamic
resources:
test:
type: flexibleengine:RdsSqlAudit
properties:
instanceId: ${instanceId}
keepDays: 5
Create RdsSqlAudit Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RdsSqlAudit(name: string, args: RdsSqlAuditArgs, opts?: CustomResourceOptions);
@overload
def RdsSqlAudit(resource_name: str,
args: RdsSqlAuditArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RdsSqlAudit(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
audit_types: Optional[Sequence[str]] = None,
rds_sql_audit_id: Optional[str] = None,
region: Optional[str] = None,
reserve_auditlogs: Optional[bool] = None,
timeouts: Optional[RdsSqlAuditTimeoutsArgs] = None)
func NewRdsSqlAudit(ctx *Context, name string, args RdsSqlAuditArgs, opts ...ResourceOption) (*RdsSqlAudit, error)
public RdsSqlAudit(string name, RdsSqlAuditArgs args, CustomResourceOptions? opts = null)
public RdsSqlAudit(String name, RdsSqlAuditArgs args)
public RdsSqlAudit(String name, RdsSqlAuditArgs args, CustomResourceOptions options)
type: flexibleengine:RdsSqlAudit
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 RdsSqlAuditArgs
- 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 RdsSqlAuditArgs
- 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 RdsSqlAuditArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RdsSqlAuditArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RdsSqlAuditArgs
- 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 rdsSqlAuditResource = new Flexibleengine.RdsSqlAudit("rdsSqlAuditResource", new()
{
InstanceId = "string",
KeepDays = 0,
AuditTypes = new[]
{
"string",
},
RdsSqlAuditId = "string",
Region = "string",
ReserveAuditlogs = false,
Timeouts = new Flexibleengine.Inputs.RdsSqlAuditTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := flexibleengine.NewRdsSqlAudit(ctx, "rdsSqlAuditResource", &flexibleengine.RdsSqlAuditArgs{
InstanceId: pulumi.String("string"),
KeepDays: pulumi.Float64(0),
AuditTypes: pulumi.StringArray{
pulumi.String("string"),
},
RdsSqlAuditId: pulumi.String("string"),
Region: pulumi.String("string"),
ReserveAuditlogs: pulumi.Bool(false),
Timeouts: &flexibleengine.RdsSqlAuditTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var rdsSqlAuditResource = new RdsSqlAudit("rdsSqlAuditResource", RdsSqlAuditArgs.builder()
.instanceId("string")
.keepDays(0)
.auditTypes("string")
.rdsSqlAuditId("string")
.region("string")
.reserveAuditlogs(false)
.timeouts(RdsSqlAuditTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
rds_sql_audit_resource = flexibleengine.RdsSqlAudit("rdsSqlAuditResource",
instance_id="string",
keep_days=0,
audit_types=["string"],
rds_sql_audit_id="string",
region="string",
reserve_auditlogs=False,
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const rdsSqlAuditResource = new flexibleengine.RdsSqlAudit("rdsSqlAuditResource", {
instanceId: "string",
keepDays: 0,
auditTypes: ["string"],
rdsSqlAuditId: "string",
region: "string",
reserveAuditlogs: false,
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: flexibleengine:RdsSqlAudit
properties:
auditTypes:
- string
instanceId: string
keepDays: 0
rdsSqlAuditId: string
region: string
reserveAuditlogs: false
timeouts:
create: string
delete: string
update: string
RdsSqlAudit 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 RdsSqlAudit resource accepts the following input properties:
- Instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - Audit
Types List<string> - Specifies the list of audit types.
- Rds
Sql stringAudit 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- Timeouts
Rds
Sql Audit Timeouts
- Instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - Audit
Types []string - Specifies the list of audit types.
- Rds
Sql stringAudit 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- Timeouts
Rds
Sql Audit Timeouts Args
- instance
Id String - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - audit
Types List<String> - Specifies the list of audit types.
- rds
Sql StringAudit 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 Boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts
- instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - audit
Types string[] - Specifies the list of audit types.
- rds
Sql stringAudit 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 boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts
- instance_
id str - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - audit_
types Sequence[str] - Specifies the list of audit types.
- rds_
sql_ straudit_ 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts Args
- instance
Id String - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - audit
Types List<String> - Specifies the list of audit types.
- rds
Sql StringAudit 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 Boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the RdsSqlAudit 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 RdsSqlAudit Resource
Get an existing RdsSqlAudit 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?: RdsSqlAuditState, opts?: CustomResourceOptions): RdsSqlAudit
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
audit_types: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
keep_days: Optional[float] = None,
rds_sql_audit_id: Optional[str] = None,
region: Optional[str] = None,
reserve_auditlogs: Optional[bool] = None,
timeouts: Optional[RdsSqlAuditTimeoutsArgs] = None) -> RdsSqlAudit
func GetRdsSqlAudit(ctx *Context, name string, id IDInput, state *RdsSqlAuditState, opts ...ResourceOption) (*RdsSqlAudit, error)
public static RdsSqlAudit Get(string name, Input<string> id, RdsSqlAuditState? state, CustomResourceOptions? opts = null)
public static RdsSqlAudit get(String name, Output<String> id, RdsSqlAuditState state, CustomResourceOptions options)
resources: _: type: flexibleengine:RdsSqlAudit 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
Types List<string> - Specifies the list of audit types.
- Instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- Keep
Days double - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - Rds
Sql stringAudit 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- Timeouts
Rds
Sql Audit Timeouts
- Audit
Types []string - Specifies the list of audit types.
- Instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- Keep
Days float64 - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - Rds
Sql stringAudit 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- Timeouts
Rds
Sql Audit Timeouts Args
- audit
Types List<String> - Specifies the list of audit types.
- instance
Id String - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days Double - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - rds
Sql StringAudit 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 Boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts
- audit
Types string[] - Specifies the list of audit types.
- instance
Id string - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days number - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - rds
Sql stringAudit 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 boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts
- audit_
types Sequence[str] - Specifies the list of audit types.
- instance_
id str - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep_
days float - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - rds_
sql_ straudit_ 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 bool - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts
Rds
Sql Audit Timeouts Args
- audit
Types List<String> - Specifies the list of audit types.
- instance
Id String - Specifies the ID of the RDS instance. Changing this parameter will create a new resource.
- keep
Days Number - Specifies the number of days for storing audit logs. Value ranges from
1
to732
. - rds
Sql StringAudit 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 Boolean - Specifies whether the historical audit logs will be reserved for some time when SQL audit is disabled. It is valid only when SQL audit is disabled.
- timeouts Property Map
Supporting Types
RdsSqlAuditTimeouts, RdsSqlAuditTimeoutsArgs
Import
The RDS SQL audit can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/rdsSqlAudit:RdsSqlAudit test <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.