// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; export class Role extends pulumi.CustomResource { /** * Get an existing Role 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. */ public static get(name: string, id: pulumi.Input, state?: RoleState, opts?: pulumi.CustomResourceOptions): Role { return new Role(name, state, { ...opts, id: id }); } /** * Determine whether a role bypasses every row-level security (RLS) policy */ public readonly bypassRowLevelSecurity: pulumi.Output; /** * How many concurrent connections can be made with this role */ public readonly connectionLimit: pulumi.Output; /** * Define a role's ability to create databases */ public readonly createDatabase: pulumi.Output; /** * Determine whether this role will be permitted to create new roles */ public readonly createRole: pulumi.Output; public readonly encrypted: pulumi.Output; /** * Control whether the password is stored encrypted in the system catalogs */ public readonly encryptedPassword: pulumi.Output; /** * Determine whether a role "inherits" the privileges of roles it is a member of */ public readonly inherit: pulumi.Output; /** * Determine whether a role is allowed to log in */ public readonly login: pulumi.Output; /** * The name of the role */ public readonly name: pulumi.Output; /** * Sets the role's password */ public readonly password: pulumi.Output; /** * Determine whether a role is allowed to initiate streaming replication or put the system in and out of backup mode */ public readonly replication: pulumi.Output; /** * Skip actually running the DROP ROLE command when removing a ROLE from PostgreSQL */ public readonly skipDropRole: pulumi.Output; /** * Skip actually running the REASSIGN OWNED command when removing a role from PostgreSQL */ public readonly skipReassignOwned: pulumi.Output; /** * Determine whether the new role is a "superuser" */ public readonly superuser: pulumi.Output; /** * Sets a date and time after which the role's password is no longer valid */ public readonly validUntil: pulumi.Output; /** * Create a Role 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?: RoleArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: RoleArgs | RoleState, opts?: pulumi.CustomResourceOptions) { let inputs: pulumi.Inputs = {}; if (opts && opts.id) { const state: RoleState = argsOrState as RoleState | undefined; inputs["bypassRowLevelSecurity"] = state ? state.bypassRowLevelSecurity : undefined; inputs["connectionLimit"] = state ? state.connectionLimit : undefined; inputs["createDatabase"] = state ? state.createDatabase : undefined; inputs["createRole"] = state ? state.createRole : undefined; inputs["encrypted"] = state ? state.encrypted : undefined; inputs["encryptedPassword"] = state ? state.encryptedPassword : undefined; inputs["inherit"] = state ? state.inherit : undefined; inputs["login"] = state ? state.login : undefined; inputs["name"] = state ? state.name : undefined; inputs["password"] = state ? state.password : undefined; inputs["replication"] = state ? state.replication : undefined; inputs["skipDropRole"] = state ? state.skipDropRole : undefined; inputs["skipReassignOwned"] = state ? state.skipReassignOwned : undefined; inputs["superuser"] = state ? state.superuser : undefined; inputs["validUntil"] = state ? state.validUntil : undefined; } else { const args = argsOrState as RoleArgs | undefined; inputs["bypassRowLevelSecurity"] = args ? args.bypassRowLevelSecurity : undefined; inputs["connectionLimit"] = args ? args.connectionLimit : undefined; inputs["createDatabase"] = args ? args.createDatabase : undefined; inputs["createRole"] = args ? args.createRole : undefined; inputs["encrypted"] = args ? args.encrypted : undefined; inputs["encryptedPassword"] = args ? args.encryptedPassword : undefined; inputs["inherit"] = args ? args.inherit : undefined; inputs["login"] = args ? args.login : undefined; inputs["name"] = args ? args.name : undefined; inputs["password"] = args ? args.password : undefined; inputs["replication"] = args ? args.replication : undefined; inputs["skipDropRole"] = args ? args.skipDropRole : undefined; inputs["skipReassignOwned"] = args ? args.skipReassignOwned : undefined; inputs["superuser"] = args ? args.superuser : undefined; inputs["validUntil"] = args ? args.validUntil : undefined; } super("postgresql:role/role:Role", name, inputs, opts); } } /** * Input properties used for looking up and filtering Role resources. */ export interface RoleState { /** * Determine whether a role bypasses every row-level security (RLS) policy */ readonly bypassRowLevelSecurity?: pulumi.Input; /** * How many concurrent connections can be made with this role */ readonly connectionLimit?: pulumi.Input; /** * Define a role's ability to create databases */ readonly createDatabase?: pulumi.Input; /** * Determine whether this role will be permitted to create new roles */ readonly createRole?: pulumi.Input; readonly encrypted?: pulumi.Input; /** * Control whether the password is stored encrypted in the system catalogs */ readonly encryptedPassword?: pulumi.Input; /** * Determine whether a role "inherits" the privileges of roles it is a member of */ readonly inherit?: pulumi.Input; /** * Determine whether a role is allowed to log in */ readonly login?: pulumi.Input; /** * The name of the role */ readonly name?: pulumi.Input; /** * Sets the role's password */ readonly password?: pulumi.Input; /** * Determine whether a role is allowed to initiate streaming replication or put the system in and out of backup mode */ readonly replication?: pulumi.Input; /** * Skip actually running the DROP ROLE command when removing a ROLE from PostgreSQL */ readonly skipDropRole?: pulumi.Input; /** * Skip actually running the REASSIGN OWNED command when removing a role from PostgreSQL */ readonly skipReassignOwned?: pulumi.Input; /** * Determine whether the new role is a "superuser" */ readonly superuser?: pulumi.Input; /** * Sets a date and time after which the role's password is no longer valid */ readonly validUntil?: pulumi.Input; } /** * The set of arguments for constructing a Role resource. */ export interface RoleArgs { /** * Determine whether a role bypasses every row-level security (RLS) policy */ readonly bypassRowLevelSecurity?: pulumi.Input; /** * How many concurrent connections can be made with this role */ readonly connectionLimit?: pulumi.Input; /** * Define a role's ability to create databases */ readonly createDatabase?: pulumi.Input; /** * Determine whether this role will be permitted to create new roles */ readonly createRole?: pulumi.Input; readonly encrypted?: pulumi.Input; /** * Control whether the password is stored encrypted in the system catalogs */ readonly encryptedPassword?: pulumi.Input; /** * Determine whether a role "inherits" the privileges of roles it is a member of */ readonly inherit?: pulumi.Input; /** * Determine whether a role is allowed to log in */ readonly login?: pulumi.Input; /** * The name of the role */ readonly name?: pulumi.Input; /** * Sets the role's password */ readonly password?: pulumi.Input; /** * Determine whether a role is allowed to initiate streaming replication or put the system in and out of backup mode */ readonly replication?: pulumi.Input; /** * Skip actually running the DROP ROLE command when removing a ROLE from PostgreSQL */ readonly skipDropRole?: pulumi.Input; /** * Skip actually running the REASSIGN OWNED command when removing a role from PostgreSQL */ readonly skipReassignOwned?: pulumi.Input; /** * Determine whether the new role is a "superuser" */ readonly superuser?: pulumi.Input; /** * Sets a date and time after which the role's password is no longer valid */ readonly validUntil?: pulumi.Input; }