UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

100 lines 2.96 kB
import * as pulumi from "@pulumi/pulumi"; /** * Gets information about the privileges in a database. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * // Get the database privilege for the user "my-user" on the database "my-database" hosted on instance id 11111111-1111-1111-1111-111111111111 and on the default region. e.g: fr-par * const main = scaleway.databases.getPrivilege({ * instanceId: "11111111-1111-111111111111", * userName: "my-user", * databaseName: "my-database", * }); * ``` */ export declare function getPrivilege(args: GetPrivilegeArgs, opts?: pulumi.InvokeOptions): Promise<GetPrivilegeResult>; /** * A collection of arguments for invoking getPrivilege. */ export interface GetPrivilegeArgs { /** * The database name. */ databaseName: string; /** * The Database Instance ID. */ instanceId: string; /** * `region`) The region in which the resource exists. */ region?: string; /** * The user name. */ userName: string; } /** * A collection of values returned by getPrivilege. */ export interface GetPrivilegeResult { readonly databaseName: string; readonly effectivePermission: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly instanceId: string; /** * The permission for this user on the database. Possible values are `readonly`, `readwrite`, `all` * , `custom` and `none`. */ readonly permission: string; readonly permissionStatus: string; readonly region?: string; readonly userName: string; } /** * Gets information about the privileges in a database. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * // Get the database privilege for the user "my-user" on the database "my-database" hosted on instance id 11111111-1111-1111-1111-111111111111 and on the default region. e.g: fr-par * const main = scaleway.databases.getPrivilege({ * instanceId: "11111111-1111-111111111111", * userName: "my-user", * databaseName: "my-database", * }); * ``` */ export declare function getPrivilegeOutput(args: GetPrivilegeOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPrivilegeResult>; /** * A collection of arguments for invoking getPrivilege. */ export interface GetPrivilegeOutputArgs { /** * The database name. */ databaseName: pulumi.Input<string>; /** * The Database Instance ID. */ instanceId: pulumi.Input<string>; /** * `region`) The region in which the resource exists. */ region?: pulumi.Input<string | undefined>; /** * The user name. */ userName: pulumi.Input<string>; } //# sourceMappingURL=getPrivilege.d.ts.map