Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters:
- Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.
- Temporary credentials - specify the cluster identifier, the database
name, and the database user name. Permission to call the
redshift:GetClusterCredentials
operation is required to use this method.
This operation returns paginated results.
Synopsis
- data ListDatabases = ListDatabases' {}
- newListDatabases :: Text -> Text -> ListDatabases
- listDatabases_dbUser :: Lens' ListDatabases (Maybe Text)
- listDatabases_nextToken :: Lens' ListDatabases (Maybe Text)
- listDatabases_secretArn :: Lens' ListDatabases (Maybe Text)
- listDatabases_maxResults :: Lens' ListDatabases (Maybe Natural)
- listDatabases_clusterIdentifier :: Lens' ListDatabases Text
- listDatabases_database :: Lens' ListDatabases Text
- data ListDatabasesResponse = ListDatabasesResponse' {}
- newListDatabasesResponse :: Int -> ListDatabasesResponse
- listDatabasesResponse_nextToken :: Lens' ListDatabasesResponse (Maybe Text)
- listDatabasesResponse_databases :: Lens' ListDatabasesResponse (Maybe [Text])
- listDatabasesResponse_httpStatus :: Lens' ListDatabasesResponse Int
Creating a Request
data ListDatabases Source #
See: newListDatabases
smart constructor.
ListDatabases' | |
|
Instances
Create a value of ListDatabases
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:dbUser:ListDatabases'
, listDatabases_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:nextToken:ListDatabases'
, listDatabases_nextToken
- A value that indicates the starting point for the next set of response
records in a subsequent request. If a value is returned in a response,
you can retrieve the next set of records by providing this returned
NextToken value in the next NextToken parameter and retrying the
command. If the NextToken field is empty, all response records have been
retrieved for the request.
$sel:secretArn:ListDatabases'
, listDatabases_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:maxResults:ListDatabases'
, listDatabases_maxResults
- The maximum number of databases to return in the response. If more
databases exist than fit in one response, then NextToken
is returned
to page through the results.
$sel:clusterIdentifier:ListDatabases'
, listDatabases_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ListDatabases'
, listDatabases_database
- The name of the database. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
Request Lenses
listDatabases_dbUser :: Lens' ListDatabases (Maybe Text) Source #
The database user name. This parameter is required when authenticating using temporary credentials.
listDatabases_nextToken :: Lens' ListDatabases (Maybe Text) Source #
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
listDatabases_secretArn :: Lens' ListDatabases (Maybe Text) Source #
The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
listDatabases_maxResults :: Lens' ListDatabases (Maybe Natural) Source #
The maximum number of databases to return in the response. If more
databases exist than fit in one response, then NextToken
is returned
to page through the results.
listDatabases_clusterIdentifier :: Lens' ListDatabases Text Source #
The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
listDatabases_database :: Lens' ListDatabases Text Source #
The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
Destructuring the Response
data ListDatabasesResponse Source #
See: newListDatabasesResponse
smart constructor.
ListDatabasesResponse' | |
|
Instances
newListDatabasesResponse Source #
Create a value of ListDatabasesResponse
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:nextToken:ListDatabases'
, listDatabasesResponse_nextToken
- A value that indicates the starting point for the next set of response
records in a subsequent request. If a value is returned in a response,
you can retrieve the next set of records by providing this returned
NextToken value in the next NextToken parameter and retrying the
command. If the NextToken field is empty, all response records have been
retrieved for the request.
$sel:databases:ListDatabasesResponse'
, listDatabasesResponse_databases
- The names of databases.
$sel:httpStatus:ListDatabasesResponse'
, listDatabasesResponse_httpStatus
- The response's http status code.
Response Lenses
listDatabasesResponse_nextToken :: Lens' ListDatabasesResponse (Maybe Text) Source #
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
listDatabasesResponse_databases :: Lens' ListDatabasesResponse (Maybe [Text]) Source #
The names of databases.
listDatabasesResponse_httpStatus :: Lens' ListDatabasesResponse Int Source #
The response's http status code.