1. Packages
  2. AWS Classic
  3. API Docs
  4. redshiftserverless
  5. getCredentials

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.46.0 published on Wednesday, Jul 24, 2024 by Pulumi

aws.redshiftserverless.getCredentials

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.46.0 published on Wednesday, Jul 24, 2024 by Pulumi

    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:

    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.46.0 published on Wednesday, Jul 24, 2024 by Pulumi