AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.redshiftserverless.getCredentials
Explore with Pulumi AI
Provides redshift serverless temporary credentials for a workgroup.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.redshiftserverless.getCredentials({
workgroupName: exampleAwsRedshiftserverlessWorkgroup.workgroupName,
});
import pulumi
import pulumi_aws as aws
example = aws.redshiftserverless.get_credentials(workgroup_name=example_aws_redshiftserverless_workgroup["workgroupName"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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: exampleAwsRedshiftserverlessWorkgroup.WorkgroupName,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.RedshiftServerless.GetCredentials.Invoke(new()
{
WorkgroupName = exampleAwsRedshiftserverlessWorkgroup.WorkgroupName,
});
});
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(exampleAwsRedshiftserverlessWorkgroup.workgroupName())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:redshiftserverless:getCredentials
Arguments:
workgroupName: ${exampleAwsRedshiftserverlessWorkgroup.workgroupName}
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:
- Workgroup
Name string - The name of the workgroup associated with the database.
- Db
Name string - 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.
- Workgroup
Name string - The name of the workgroup associated with the database.
- Db
Name string - 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.
- workgroup
Name String - The name of the workgroup associated with the database.
- db
Name String - The name of the database to get temporary authorization to log on to.
- duration
Seconds Integer - The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.
- workgroup
Name string - The name of the workgroup associated with the database.
- db
Name string - The name of the database to get temporary authorization to log on to.
- duration
Seconds 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.
- workgroup
Name String - The name of the workgroup associated with the database.
- db
Name String - The name of the database to get temporary authorization to log on to.
- duration
Seconds 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:
- Db
Password string - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - Db
User string - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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.
- Workgroup
Name string - Db
Name string - Duration
Seconds int
- Db
Password string - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - Db
User string - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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.
- Workgroup
Name string - Db
Name string - Duration
Seconds int
- db
Password String - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - db
User String - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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.
- workgroup
Name String - db
Name String - duration
Seconds Integer
- db
Password string - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - db
User string - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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.
- workgroup
Name string - db
Name string - duration
Seconds number
- db_
password str - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - db_
user str - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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
- db
Password String - Temporary password that authorizes the user name returned by
db_user
to log on to the databasedb_name
. - db
User String - A database user name that is authorized to log on to the database
db_name
using the passworddb_password
. If the specifieddb_user
exists in the database, the new user name has the same database privileges as the user named indb_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.
- workgroup
Name String - db
Name String - duration
Seconds Number
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.