import * as pulumi from "@pulumi/pulumi"; /** * Create and manage Scaleway database privileges. * For more information refer to [the API documentation](https://www.scaleway.com/en/developers/api/managed-database-postgre-mysql/#user-and-permissions). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const mainRdbInstance = new scaleway.RdbInstance("mainRdbInstance", { * nodeType: "DB-DEV-S", * engine: "PostgreSQL-11", * isHaCluster: true, * disableBackup: true, * userName: "my_initial_user", * password: "thiZ_is_v&ry_s3cret", * }); * const mainRdbDatabase = new scaleway.RdbDatabase("mainRdbDatabase", {instanceId: mainRdbInstance.id}); * const mainRdbUser = new scaleway.RdbUser("mainRdbUser", { * instanceId: mainRdbInstance.id, * password: "thiZ_is_v&ry_s3cret", * isAdmin: false, * }); * const mainRdbPrivilege = new scaleway.RdbPrivilege("mainRdbPrivilege", { * instanceId: mainRdbInstance.id, * userName: mainRdbUser.name, * databaseName: mainRdbDatabase.name, * permission: "all", * }); * ``` * * ## Import * * The user privileges can be imported using the `{region}/{instance_id}/{database_name}/{user_name}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/rdbPrivilege:RdbPrivilege o fr-par/11111111-1111-1111-1111-111111111111/database_name/foo * ``` */ export declare class RdbPrivilege extends pulumi.CustomResource { /** * Get an existing RdbPrivilege 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, state?: RdbPrivilegeState, opts?: pulumi.CustomResourceOptions): RdbPrivilege; /** * Returns true if the given object is an instance of RdbPrivilege. 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 RdbPrivilege; /** * Name of the database (e.g. `my-db-name`). */ readonly databaseName: pulumi.Output; /** * UUID of the Database Instance. */ readonly instanceId: pulumi.Output; /** * Permission to set. Valid values are `readonly`, `readwrite`, `all`, `custom` and `none`. */ readonly permission: pulumi.Output; /** * `region`) The region in which the resource exists. */ readonly region: pulumi.Output; /** * Name of the user (e.g. `my-db-user`). */ readonly userName: pulumi.Output; /** * Create a RdbPrivilege 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: RdbPrivilegeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RdbPrivilege resources. */ export interface RdbPrivilegeState { /** * Name of the database (e.g. `my-db-name`). */ databaseName?: pulumi.Input; /** * UUID of the Database Instance. */ instanceId?: pulumi.Input; /** * Permission to set. Valid values are `readonly`, `readwrite`, `all`, `custom` and `none`. */ permission?: pulumi.Input; /** * `region`) The region in which the resource exists. */ region?: pulumi.Input; /** * Name of the user (e.g. `my-db-user`). */ userName?: pulumi.Input; } /** * The set of arguments for constructing a RdbPrivilege resource. */ export interface RdbPrivilegeArgs { /** * Name of the database (e.g. `my-db-name`). */ databaseName: pulumi.Input; /** * UUID of the Database Instance. */ instanceId: pulumi.Input; /** * Permission to set. Valid values are `readonly`, `readwrite`, `all`, `custom` and `none`. */ permission: pulumi.Input; /** * `region`) The region in which the resource exists. */ region?: pulumi.Input; /** * Name of the user (e.g. `my-db-user`). */ userName: pulumi.Input; }