getClusterCredentials

Provides redshift cluster temporary credentials.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshift.RedshiftFunctions;
import com.pulumi.aws.redshift.inputs.GetClusterCredentialsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = RedshiftFunctions.getClusterCredentials(GetClusterCredentialsArgs.builder()
.clusterIdentifier(aws_redshift_cluster.example().cluster_identifier())
.dbUser(aws_redshift_cluster.example().master_username())
.build());
}
}

Return

A collection of values returned by getClusterCredentials.

Parameters

argument

A collection of arguments for invoking getClusterCredentials.


suspend fun getClusterCredentials(autoCreate: Boolean? = null, clusterIdentifier: String, dbGroups: List<String>? = null, dbName: String? = null, dbUser: String, durationSeconds: Int? = null): GetClusterCredentialsResult

Return

A collection of values returned by getClusterCredentials.

Parameters

autoCreate

Create a database user with the name specified for the user named in db_user if one does not exist.

clusterIdentifier

Unique identifier of the cluster that contains the database for which your are requesting credentials.

dbGroups

List of the names of existing database groups that the user named in db_user will join for the current session, in addition to any group memberships for an existing user. If not specified, a new user is added only to PUBLIC.

dbName

Name of a database that DbUser is authorized to log on to. If db_name is not specified, db_user can log on to any existing database.

dbUser

Name of a database user. If a user name matching db_user exists in the database, the temporary user credentials have the same permissions as the existing user. If db_user doesn't exist in the database and auto_create is True, a new user is created using the value for db_user with PUBLIC permissions. If a database user matching the value for db_user doesn't exist and not is False, then the command succeeds but the connection attempt will fail because the user doesn't exist in the database.

durationSeconds

The number of seconds until the returned temporary password expires. Valid values are between 900 and 3600. Default value is 900.

See also


Return

A collection of values returned by getClusterCredentials.

Parameters

argument

Builder for com.pulumi.aws.redshift.kotlin.inputs.GetClusterCredentialsPlainArgs.

See also