aws logo
AWS Classic v5.29.1, Feb 4 23

aws.redshiftserverless.getCredentials

Provides redshift serverless temporary credentials for a workgroup.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.RedshiftServerless.GetCredentials.Invoke(new()
    {
        WorkgroupName = aws_redshiftserverless_workgroup.Example.Workgroup_name,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/redshiftserverless"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := redshiftserverless.GetCredentials(ctx, &redshiftserverless.GetCredentialsArgs{
			WorkgroupName: aws_redshiftserverless_workgroup.Example.Workgroup_name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshiftserverless.RedshiftserverlessFunctions;
import com.pulumi.aws.redshiftserverless.inputs.GetCredentialsArgs;
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 = RedshiftserverlessFunctions.getCredentials(GetCredentialsArgs.builder()
            .workgroupName(aws_redshiftserverless_workgroup.example().workgroup_name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.redshiftserverless.get_credentials(workgroup_name=aws_redshiftserverless_workgroup["example"]["workgroup_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.redshiftserverless.getCredentials({
    workgroupName: aws_redshiftserverless_workgroup.example.workgroup_name,
});
variables:
  example:
    fn::invoke:
      Function: aws:redshiftserverless:getCredentials
      Arguments:
        workgroupName: ${aws_redshiftserverless_workgroup.example.workgroup_name}

Using getCredentials

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCredentials(args: GetCredentialsArgs, opts?: InvokeOptions): Promise<GetCredentialsResult>
function getCredentialsOutput(args: GetCredentialsOutputArgs, opts?: InvokeOptions): Output<GetCredentialsResult>
def get_credentials(db_name: Optional[str] = None,
                    duration_seconds: Optional[int] = None,
                    workgroup_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetCredentialsResult
def get_credentials_output(db_name: Optional[pulumi.Input[str]] = None,
                    duration_seconds: Optional[pulumi.Input[int]] = None,
                    workgroup_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetCredentialsResult]
func GetCredentials(ctx *Context, args *GetCredentialsArgs, opts ...InvokeOption) (*GetCredentialsResult, error)
func GetCredentialsOutput(ctx *Context, args *GetCredentialsOutputArgs, opts ...InvokeOption) GetCredentialsResultOutput

> Note: This function is named GetCredentials in the Go SDK.

public static class GetCredentials 
{
    public static Task<GetCredentialsResult> InvokeAsync(GetCredentialsArgs args, InvokeOptions? opts = null)
    public static Output<GetCredentialsResult> Invoke(GetCredentialsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCredentialsResult> getCredentials(GetCredentialsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:redshiftserverless/getCredentials:getCredentials
  arguments:
    # arguments dictionary

The following arguments are supported:

WorkgroupName string

The name of the workgroup associated with the database.

DbName string

The name of the database to get temporary authorization to log on to.

DurationSeconds int

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

WorkgroupName string

The name of the workgroup associated with the database.

DbName string

The name of the database to get temporary authorization to log on to.

DurationSeconds int

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

workgroupName String

The name of the workgroup associated with the database.

dbName String

The name of the database to get temporary authorization to log on to.

durationSeconds Integer

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

workgroupName string

The name of the workgroup associated with the database.

dbName string

The name of the database to get temporary authorization to log on to.

durationSeconds number

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

workgroup_name str

The name of the workgroup associated with the database.

db_name str

The name of the database to get temporary authorization to log on to.

duration_seconds int

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

workgroupName String

The name of the workgroup associated with the database.

dbName String

The name of the database to get temporary authorization to log on to.

durationSeconds Number

The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

getCredentials Result

The following output properties are available:

DbPassword string

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

DbUser string

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

Expiration string

Date and time the password in db_password expires.

Id string

The provider-assigned unique ID for this managed resource.

WorkgroupName string
DbName string
DurationSeconds int
DbPassword string

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

DbUser string

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

Expiration string

Date and time the password in db_password expires.

Id string

The provider-assigned unique ID for this managed resource.

WorkgroupName string
DbName string
DurationSeconds int
dbPassword String

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

dbUser String

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

expiration String

Date and time the password in db_password expires.

id String

The provider-assigned unique ID for this managed resource.

workgroupName String
dbName String
durationSeconds Integer
dbPassword string

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

dbUser string

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

expiration string

Date and time the password in db_password expires.

id string

The provider-assigned unique ID for this managed resource.

workgroupName string
dbName string
durationSeconds number
db_password str

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

db_user str

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

expiration str

Date and time the password in db_password expires.

id str

The provider-assigned unique ID for this managed resource.

workgroup_name str
db_name str
duration_seconds int
dbPassword String

Temporary password that authorizes the user name returned by db_user to log on to the database db_name.

dbUser String

A database user name that is authorized to log on to the database db_name using the password db_password . If the specified db_user exists in the database, the new user name has the same database privileges as the user named in db_user . By default, the user is added to PUBLIC. the user doesn't exist in the database.

expiration String

Date and time the password in db_password expires.

id String

The provider-assigned unique ID for this managed resource.

workgroupName String
dbName String
durationSeconds Number

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.