Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data GetCredentials = GetCredentials' {
- dbName :: Maybe Text
- durationSeconds :: Maybe Int
- workgroupName :: Text
- newGetCredentials :: Text -> GetCredentials
- getCredentials_dbName :: Lens' GetCredentials (Maybe Text)
- getCredentials_durationSeconds :: Lens' GetCredentials (Maybe Int)
- getCredentials_workgroupName :: Lens' GetCredentials Text
- data GetCredentialsResponse = GetCredentialsResponse' {
- dbPassword :: Maybe (Sensitive Text)
- dbUser :: Maybe (Sensitive Text)
- expiration :: Maybe POSIX
- nextRefreshTime :: Maybe POSIX
- httpStatus :: Int
- newGetCredentialsResponse :: Int -> GetCredentialsResponse
- getCredentialsResponse_dbPassword :: Lens' GetCredentialsResponse (Maybe Text)
- getCredentialsResponse_dbUser :: Lens' GetCredentialsResponse (Maybe Text)
- getCredentialsResponse_expiration :: Lens' GetCredentialsResponse (Maybe UTCTime)
- getCredentialsResponse_nextRefreshTime :: Lens' GetCredentialsResponse (Maybe UTCTime)
- getCredentialsResponse_httpStatus :: Lens' GetCredentialsResponse Int
Creating a Request
data GetCredentials Source #
See: newGetCredentials
smart constructor.
GetCredentials' | |
|
Instances
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.
GetCredentialsResponse' | |
|
Instances
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.
getCredentialsResponse_httpStatus :: Lens' GetCredentialsResponse Int Source #
The response's http status code.