@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
139 lines (138 loc) • 5.61 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages RDS SQL audit resource within HuaweiCloud.
*
* > **NOTE:** Only MySQL and PostgreSQL engines are supported.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const instanceId = config.requireObject("instanceId");
* const test = new huaweicloud.rds.SqlAudit("test", {
* instanceId: instanceId,
* keepDays: 5,
* });
* ```
*
* ## Import
*
* The RDS SQL audit can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Rds/sqlAudit:SqlAudit test <id>
* ```
*/
export declare class SqlAudit extends pulumi.CustomResource {
/**
* Get an existing SqlAudit resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SqlAuditState, opts?: pulumi.CustomResourceOptions): SqlAudit;
/**
* Returns true if the given object is an instance of SqlAudit. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is SqlAudit;
/**
* Specifies the list of audit types. Value options: **CREATE_USER**, **DROP_USER**,
* **RENAME_USER**, **GRANT**, **REVOKE**, **CREATE**, **ALTER**, **DROP**, **RENAME**, **TRUNCATE**, **INSERT**,
* **DELETE**, **UPDATE**, **REPLACE**, **SELECT**, **BEGIN/COMMIT/ROLLBACK**, **PREPARED_STATEMENT**.
* It is not supported for PostgreSQL.
*/
readonly auditTypes: pulumi.Output<string[]>;
/**
* Specifies the ID of the RDS instance.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Specifies the number of days for storing audit logs. Value ranges from `1` to `732`.
*/
readonly keepDays: pulumi.Output<number>;
/**
* 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.
*/
readonly region: pulumi.Output<string>;
/**
* 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.
*/
readonly reserveAuditlogs: pulumi.Output<boolean | undefined>;
/**
* Create a SqlAudit resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SqlAuditArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SqlAudit resources.
*/
export interface SqlAuditState {
/**
* Specifies the list of audit types. Value options: **CREATE_USER**, **DROP_USER**,
* **RENAME_USER**, **GRANT**, **REVOKE**, **CREATE**, **ALTER**, **DROP**, **RENAME**, **TRUNCATE**, **INSERT**,
* **DELETE**, **UPDATE**, **REPLACE**, **SELECT**, **BEGIN/COMMIT/ROLLBACK**, **PREPARED_STATEMENT**.
* It is not supported for PostgreSQL.
*/
auditTypes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the ID of the RDS instance.
*/
instanceId?: pulumi.Input<string>;
/**
* Specifies the number of days for storing audit logs. Value ranges from `1` to `732`.
*/
keepDays?: pulumi.Input<number>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* 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.
*/
reserveAuditlogs?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a SqlAudit resource.
*/
export interface SqlAuditArgs {
/**
* Specifies the list of audit types. Value options: **CREATE_USER**, **DROP_USER**,
* **RENAME_USER**, **GRANT**, **REVOKE**, **CREATE**, **ALTER**, **DROP**, **RENAME**, **TRUNCATE**, **INSERT**,
* **DELETE**, **UPDATE**, **REPLACE**, **SELECT**, **BEGIN/COMMIT/ROLLBACK**, **PREPARED_STATEMENT**.
* It is not supported for PostgreSQL.
*/
auditTypes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the ID of the RDS instance.
*/
instanceId: pulumi.Input<string>;
/**
* Specifies the number of days for storing audit logs. Value ranges from `1` to `732`.
*/
keepDays: pulumi.Input<number>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* 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.
*/
reserveAuditlogs?: pulumi.Input<boolean>;
}