amazonka-redshift-serverless-2.0: Amazon Redshift Serverless SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.RedshiftServerLess.GetCredentials

Description

Returns a database user name and temporary password with temporary authorization to log in to Amazon Redshift Serverless.

By default, the temporary credentials expire in 900 seconds. You can optionally specify a duration between 900 seconds (15 minutes) and 3600 seconds (60 minutes).

 <p>The Identity and Access Management (IAM) user or role that runs GetCredentials must have an IAM policy attached that allows access to all necessary actions and resources.</p> <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access to the resource dbname for the specified database name.</p>
Synopsis

Creating a Request

data GetCredentials Source #

See: newGetCredentials smart constructor.

Constructors

GetCredentials' 

Fields

  • dbName :: Maybe Text

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

    Constraints:

    • Must be 1 to 64 alphanumeric characters or hyphens.
    • Must contain only uppercase or lowercase letters, numbers, underscore, plus sign, period (dot), at symbol (@), or hyphen.
    • The first character must be a letter.
    • Must not contain a colon ( : ) or slash ( / ).
    • Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide
  • durationSeconds :: Maybe Int

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

  • workgroupName :: Text

    The name of the workgroup associated with the database.

Instances

Instances details
ToJSON GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

ToHeaders GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

ToPath GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

ToQuery GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

AWSRequest GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Associated Types

type AWSResponse GetCredentials #

Generic GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Associated Types

type Rep GetCredentials :: Type -> Type #

Read GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Show GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

NFData GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Methods

rnf :: GetCredentials -> () #

Eq GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Hashable GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

type AWSResponse GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

type Rep GetCredentials Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

type Rep GetCredentials = D1 ('MetaData "GetCredentials" "Amazonka.RedshiftServerLess.GetCredentials" "amazonka-redshift-serverless-2.0-ApuSN33KEWs53jvwyBa3sl" 'False) (C1 ('MetaCons "GetCredentials'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "durationSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "workgroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetCredentials Source #

Create a value of GetCredentials with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

GetCredentials, getCredentials_dbName - The name of the database to get temporary authorization to log on to.

Constraints:

  • Must be 1 to 64 alphanumeric characters or hyphens.
  • Must contain only uppercase or lowercase letters, numbers, underscore, plus sign, period (dot), at symbol (@), or hyphen.
  • The first character must be a letter.
  • Must not contain a colon ( : ) or slash ( / ).
  • Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide

$sel:durationSeconds:GetCredentials', getCredentials_durationSeconds - The number of seconds until the returned temporary password expires. The minimum is 900 seconds, and the maximum is 3600 seconds.

GetCredentials, getCredentials_workgroupName - The name of the workgroup associated with the database.

Request Lenses

getCredentials_dbName :: Lens' GetCredentials (Maybe Text) Source #

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

Constraints:

  • Must be 1 to 64 alphanumeric characters or hyphens.
  • Must contain only uppercase or lowercase letters, numbers, underscore, plus sign, period (dot), at symbol (@), or hyphen.
  • The first character must be a letter.
  • Must not contain a colon ( : ) or slash ( / ).
  • Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide

getCredentials_durationSeconds :: Lens' GetCredentials (Maybe Int) Source #

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

getCredentials_workgroupName :: Lens' GetCredentials Text Source #

The name of the workgroup associated with the database.

Destructuring the Response

data GetCredentialsResponse Source #

See: newGetCredentialsResponse smart constructor.

Constructors

GetCredentialsResponse' 

Fields

  • dbPassword :: Maybe (Sensitive Text)

    A temporary password that authorizes the user name returned by DbUser to log on to the database DbName.

  • dbUser :: Maybe (Sensitive Text)

    A database user name that is authorized to log on to the database DbName using the password DbPassword. If the specified DbUser exists in the database, the new user name has the same database privileges as the the user named in DbUser. By default, the user is added to PUBLIC.

  • expiration :: Maybe POSIX

    The date and time the password in DbPassword expires.

  • nextRefreshTime :: Maybe POSIX

    The date and time of when the DbUser and DbPassword authorization refreshes.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetCredentialsResponse Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Associated Types

type Rep GetCredentialsResponse :: Type -> Type #

Show GetCredentialsResponse Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

NFData GetCredentialsResponse Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

Methods

rnf :: GetCredentialsResponse -> () #

Eq GetCredentialsResponse Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

type Rep GetCredentialsResponse Source # 
Instance details

Defined in Amazonka.RedshiftServerLess.GetCredentials

type Rep GetCredentialsResponse = D1 ('MetaData "GetCredentialsResponse" "Amazonka.RedshiftServerLess.GetCredentials" "amazonka-redshift-serverless-2.0-ApuSN33KEWs53jvwyBa3sl" 'False) (C1 ('MetaCons "GetCredentialsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbPassword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text)))) :*: (S1 ('MetaSel ('Just "expiration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "nextRefreshTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newGetCredentialsResponse Source #

Create a value of GetCredentialsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dbPassword:GetCredentialsResponse', getCredentialsResponse_dbPassword - A temporary password that authorizes the user name returned by DbUser to log on to the database DbName.

$sel:dbUser:GetCredentialsResponse', getCredentialsResponse_dbUser - A database user name that is authorized to log on to the database DbName using the password DbPassword. If the specified DbUser exists in the database, the new user name has the same database privileges as the the user named in DbUser. By default, the user is added to PUBLIC.

$sel:expiration:GetCredentialsResponse', getCredentialsResponse_expiration - The date and time the password in DbPassword expires.

$sel:nextRefreshTime:GetCredentialsResponse', getCredentialsResponse_nextRefreshTime - The date and time of when the DbUser and DbPassword authorization refreshes.

$sel:httpStatus:GetCredentialsResponse', getCredentialsResponse_httpStatus - The response's http status code.

Response Lenses

getCredentialsResponse_dbPassword :: Lens' GetCredentialsResponse (Maybe Text) Source #

A temporary password that authorizes the user name returned by DbUser to log on to the database DbName.

getCredentialsResponse_dbUser :: Lens' GetCredentialsResponse (Maybe Text) Source #

A database user name that is authorized to log on to the database DbName using the password DbPassword. If the specified DbUser exists in the database, the new user name has the same database privileges as the the user named in DbUser. By default, the user is added to PUBLIC.

getCredentialsResponse_expiration :: Lens' GetCredentialsResponse (Maybe UTCTime) Source #

The date and time the password in DbPassword expires.

getCredentialsResponse_nextRefreshTime :: Lens' GetCredentialsResponse (Maybe UTCTime) Source #

The date and time of when the DbUser and DbPassword authorization refreshes.