v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1465272236.5 KB

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).

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.

If the DbName parameter is specified, the IAM policy must allow access to the resource dbname for the specified database name.

post/#X-Amz-Target=RedshiftServerless.GetCredentials

Headers

X-Amz-Target'RedshiftServerless.GetCredentials' required

Request body

customDomainNamestring

The custom domain name associated with the workgroup. The custom domain name or the workgroup name must be included in the request.

dbNamestring
<p>The name of the database to get temporary authorization to log on to.</p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 64 alphanumeric characters or hyphens.</p> </li> <li> <p>Must contain only uppercase or lowercase letters, numbers, underscore, plus sign, period (dot), at symbol (@), or hyphen.</p> </li> <li> <p>The first character must be a letter.</p> </li> <li> <p>Must not contain a colon ( : ) or slash ( / ).</p> </li> <li> <p>Cannot be a reserved word. A list of reserved words can be found in <a href="https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html">Reserved Words </a> in the Amazon Redshift Database Developer Guide</p> </li> </ul>
durationSecondsinteger

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

workgroupNamestring

The name of the workgroup associated with the database.

Response

Success

dbPasswordstring password

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

dbUserstring password

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

expirationstring date-time

The date and time the password in <code>DbPassword</code> expires.

nextRefreshTimestring date-time

The date and time of when the <code>DbUser</code> and <code>DbPassword</code> authorization refreshes.