import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface MdbPostgresqlUserConfig extends cdktf.TerraformMetaArguments { /** * Authentication method for the user. Possible values are `AUTH_METHOD_PASSWORD`, `AUTH_METHOD_IAM`. Default is `AUTH_METHOD_PASSWORD`. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#auth_method MdbPostgresqlUser#auth_method} */ readonly authMethod?: string; /** * The ID of the PostgreSQL cluster. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#cluster_id MdbPostgresqlUser#cluster_id} */ readonly clusterId: string; /** * The maximum number of connections per user. (Default 50). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#conn_limit MdbPostgresqlUser#conn_limit} */ readonly connLimit?: number; /** * The `true` value means that resource is protected from accidental deletion. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#deletion_protection MdbPostgresqlUser#deletion_protection} */ readonly deletionProtection?: string; /** * Generate password using Connection Manager. Allowed values: true or false. It's used only during user creation and is ignored during updating. * * ~> **Must specify either password or generate_password**. * * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#generate_password MdbPostgresqlUser#generate_password} */ readonly generatePassword?: boolean | cdktf.IResolvable; /** * List of the user's grants. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#grants MdbPostgresqlUser#grants} */ readonly grants?: string[]; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#id MdbPostgresqlUser#id} * * Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. * If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. */ readonly id?: string; /** * User's ability to login. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#login MdbPostgresqlUser#login} */ readonly login?: boolean | cdktf.IResolvable; /** * The name of the user. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#name MdbPostgresqlUser#name} */ readonly name: string; /** * The password of the user. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#password MdbPostgresqlUser#password} */ readonly password?: string; /** * Map of user settings. [Full description](https://yandex.cloud/docs/managed-postgresql/api-ref/grpc/Cluster/create#yandex.cloud.mdb.postgresql.v1.UserSettings). * * * `default_transaction_isolation` - defines the default isolation level to be set for all new SQL transactions. One of: * - `read uncommitted` * - `read committed` * - `repeatable read` * - `serializable` * * * `lock_timeout` - The maximum time (in milliseconds) for any statement to wait for acquiring a lock on an table, index, row or other database object (default 0) * * * `log_min_duration_statement` - This setting controls logging of the duration of statements. (default -1 disables logging of the duration of statements.) * * * `synchronous_commit` - This setting defines whether DBMS will commit transaction in a synchronous way. One of: * - `on` * - `off` * - `local` * - `remote write` * - `remote apply` * * * `temp_file_limit` - The maximum storage space size (in kilobytes) that a single process can use to create temporary files. * * * `log_statement` - This setting specifies which SQL statements should be logged (on the user level). One of: * - `none` * - `ddl` * - `mod` * - `all` * * * `pool_mode` - Mode that the connection pooler is working in with specified user. One of: * - `session` * - `transaction` * - `statement` * * * `prepared_statements_pooling` - This setting allows user to use prepared statements with transaction pooling. Boolean. * * * `catchup_timeout` - The connection pooler setting. It determines the maximum allowed replication lag (in seconds). Pooler will reject connections to the replica with a lag above this threshold. Default value is 0, which disables this feature. Integer. * * * `wal_sender_timeout` - The maximum time (in milliseconds) to wait for WAL replication (can be set only for PostgreSQL 12+). Terminate replication connections that are inactive for longer than this amount of time. Integer. * * * `idle_in_transaction_session_timeout` - Sets the maximum allowed idle time (in milliseconds) between queries, when in a transaction. Value of 0 (default) disables the timeout. Integer. * * * `statement_timeout` - The maximum time (in milliseconds) to wait for statement. Value of 0 (default) disables the timeout. Integer. * * * `pgaudit` - Settings of the PostgreSQL Audit Extension (pgaudit). [Full description](https://yandex.cloud/ru/docs/managed-postgresql/api-ref/grpc/Cluster/create#yandex.cloud.mdb.postgresql.v1.PGAuditSettings). String (json with with escaped quotes). Example `"{\"log\": [\"READ\", \"WRITE\"]}"` * * * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#settings MdbPostgresqlUser#settings} */ readonly settings?: { [key: string]: string; }; /** * permission block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#permission MdbPostgresqlUser#permission} */ readonly permission?: MdbPostgresqlUserPermission[] | cdktf.IResolvable; /** * timeouts block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#timeouts MdbPostgresqlUser#timeouts} */ readonly timeouts?: MdbPostgresqlUserTimeouts; } export interface MdbPostgresqlUserPermission { /** * The name of the database that the permission grants access to. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#database_name MdbPostgresqlUser#database_name} */ readonly databaseName: string; } export declare function mdbPostgresqlUserPermissionToTerraform(struct?: MdbPostgresqlUserPermission | cdktf.IResolvable): any; export declare function mdbPostgresqlUserPermissionToHclTerraform(struct?: MdbPostgresqlUserPermission | cdktf.IResolvable): any; export declare class MdbPostgresqlUserPermissionOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): MdbPostgresqlUserPermission | cdktf.IResolvable | undefined; set internalValue(value: MdbPostgresqlUserPermission | cdktf.IResolvable | undefined); private _databaseName?; get databaseName(): string; set databaseName(value: string); get databaseNameInput(): string; } export declare class MdbPostgresqlUserPermissionList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: MdbPostgresqlUserPermission[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): MdbPostgresqlUserPermissionOutputReference; } export interface MdbPostgresqlUserTimeouts { /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#create MdbPostgresqlUser#create} */ readonly create?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#delete MdbPostgresqlUser#delete} */ readonly delete?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#read MdbPostgresqlUser#read} */ readonly read?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#update MdbPostgresqlUser#update} */ readonly update?: string; } export declare function mdbPostgresqlUserTimeoutsToTerraform(struct?: MdbPostgresqlUserTimeouts | cdktf.IResolvable): any; export declare function mdbPostgresqlUserTimeoutsToHclTerraform(struct?: MdbPostgresqlUserTimeouts | cdktf.IResolvable): any; export declare class MdbPostgresqlUserTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): MdbPostgresqlUserTimeouts | cdktf.IResolvable | undefined; set internalValue(value: MdbPostgresqlUserTimeouts | cdktf.IResolvable | undefined); private _create?; get create(): string; set create(value: string); resetCreate(): void; get createInput(): string; private _delete?; get delete(): string; set delete(value: string); resetDelete(): void; get deleteInput(): string; private _read?; get read(): string; set read(value: string); resetRead(): void; get readInput(): string; private _update?; get update(): string; set update(value: string); resetUpdate(): void; get updateInput(): string; } /** * Represents a {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user yandex_mdb_postgresql_user} */ export declare class MdbPostgresqlUser extends cdktf.TerraformResource { static readonly tfResourceType = "yandex_mdb_postgresql_user"; /** * Generates CDKTF code for importing a MdbPostgresqlUser resource upon running "cdktf plan " * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the MdbPostgresqlUser to import * @param importFromId The id of the existing MdbPostgresqlUser that should be imported. Refer to the {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the MdbPostgresqlUser to import is found */ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any; /** * Create a new {@link https://registry.terraform.io/providers/yandex-cloud/yandex/0.177.0/docs/resources/mdb_postgresql_user yandex_mdb_postgresql_user} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options MdbPostgresqlUserConfig */ constructor(scope: Construct, id: string, config: MdbPostgresqlUserConfig); private _authMethod?; get authMethod(): string; set authMethod(value: string); resetAuthMethod(): void; get authMethodInput(): string; private _clusterId?; get clusterId(): string; set clusterId(value: string); get clusterIdInput(): string; private _connLimit?; get connLimit(): number; set connLimit(value: number); resetConnLimit(): void; get connLimitInput(): number; private _connectionManager; get connectionManager(): any; private _deletionProtection?; get deletionProtection(): string; set deletionProtection(value: string); resetDeletionProtection(): void; get deletionProtectionInput(): string; private _generatePassword?; get generatePassword(): boolean | cdktf.IResolvable; set generatePassword(value: boolean | cdktf.IResolvable); resetGeneratePassword(): void; get generatePasswordInput(): any; private _grants?; get grants(): string[]; set grants(value: string[]); resetGrants(): void; get grantsInput(): string[]; private _id?; get id(): string; set id(value: string); resetId(): void; get idInput(): string; private _login?; get login(): boolean | cdktf.IResolvable; set login(value: boolean | cdktf.IResolvable); resetLogin(): void; get loginInput(): any; private _name?; get name(): string; set name(value: string); get nameInput(): string; private _password?; get password(): string; set password(value: string); resetPassword(): void; get passwordInput(): string; private _settings?; get settings(): { [key: string]: string; }; set settings(value: { [key: string]: string; }); resetSettings(): void; get settingsInput(): { [key: string]: string; }; private _permission; get permission(): MdbPostgresqlUserPermissionList; putPermission(value: MdbPostgresqlUserPermission[] | cdktf.IResolvable): void; resetPermission(): void; get permissionInput(): any; private _timeouts; get timeouts(): MdbPostgresqlUserTimeoutsOutputReference; putTimeouts(value: MdbPostgresqlUserTimeouts): void; resetTimeouts(): void; get timeoutsInput(): any; protected synthesizeAttributes(): { [name: string]: any; }; protected synthesizeHclAttributes(): { [name: string]: any; }; }