UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

101 lines (100 loc) 2.96 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Provides information on a DigitalOcean database user resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const main = digitalocean.getDatabaseCluster({ * name: "main-cluster", * }); * const example = main.then(main => digitalocean.getDatabaseUser({ * clusterId: main.id, * name: "example-user", * })); * export const databaseUserPassword = example.then(example => example.password); * ``` */ export declare function getDatabaseUser(args: GetDatabaseUserArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseUserResult>; /** * A collection of arguments for invoking getDatabaseUser. */ export interface GetDatabaseUserArgs { /** * The ID of the database cluster. */ clusterId: string; /** * The name of the database user. */ name: string; } /** * A collection of values returned by getDatabaseUser. */ export interface GetDatabaseUserResult { /** * Access certificate for TLS client authentication. (Kafka only) */ readonly accessCert: string; /** * Access key for TLS client authentication. (Kafka only) */ readonly accessKey: string; readonly clusterId: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The authentication method of the MySQL user. The value will be `mysqlNativePassword` or `cachingSha2Password`. */ readonly mysqlAuthPlugin: string; readonly name: string; /** * The password of the database user. This will not be set for MongoDB users. */ readonly password: string; /** * The role of the database user. The value will be either `primary` or `normal`. */ readonly role: string; readonly settings: outputs.GetDatabaseUserSetting[]; } /** * Provides information on a DigitalOcean database user resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const main = digitalocean.getDatabaseCluster({ * name: "main-cluster", * }); * const example = main.then(main => digitalocean.getDatabaseUser({ * clusterId: main.id, * name: "example-user", * })); * export const databaseUserPassword = example.then(example => example.password); * ``` */ export declare function getDatabaseUserOutput(args: GetDatabaseUserOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDatabaseUserResult>; /** * A collection of arguments for invoking getDatabaseUser. */ export interface GetDatabaseUserOutputArgs { /** * The ID of the database cluster. */ clusterId: pulumi.Input<string>; /** * The name of the database user. */ name: pulumi.Input<string>; }