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 |
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 - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name.
- Temporary credentials - when connecting to a cluster, specify the
cluster identifier, the database name, and the database user name.
Also, permission to call the
redshift:GetClusterCredentials
operation is required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, permission to call theredshift-serverless:GetCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
This operation returns paginated results.
Synopsis
- data ListDatabases = ListDatabases' {}
- newListDatabases :: Text -> ListDatabases
- listDatabases_clusterIdentifier :: Lens' ListDatabases (Maybe Text)
- listDatabases_dbUser :: Lens' ListDatabases (Maybe Text)
- listDatabases_maxResults :: Lens' ListDatabases (Maybe Natural)
- listDatabases_nextToken :: Lens' ListDatabases (Maybe Text)
- listDatabases_secretArn :: Lens' ListDatabases (Maybe Text)
- listDatabases_workgroupName :: Lens' ListDatabases (Maybe Text)
- listDatabases_database :: Lens' ListDatabases Text
- data ListDatabasesResponse = ListDatabasesResponse' {}
- newListDatabasesResponse :: Int -> ListDatabasesResponse
- listDatabasesResponse_databases :: Lens' ListDatabasesResponse (Maybe [Text])
- listDatabasesResponse_nextToken :: 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:clusterIdentifier:ListDatabases'
, listDatabases_clusterIdentifier
- The cluster identifier. This parameter is required when connecting to a
cluster and authenticating using either Secrets Manager or temporary
credentials.
$sel:dbUser:ListDatabases'
, listDatabases_dbUser
- The database user name. This parameter is required when connecting to a
cluster and authenticating using temporary credentials.
$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.
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.
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:workgroupName:ListDatabases'
, listDatabases_workgroupName
- The serverless workgroup name. This parameter is required when
connecting to a serverless workgroup and 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_clusterIdentifier :: Lens' ListDatabases (Maybe Text) Source #
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
listDatabases_dbUser :: Lens' ListDatabases (Maybe Text) Source #
The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.
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_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_workgroupName :: Lens' ListDatabases (Maybe Text) Source #
The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and 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:databases:ListDatabasesResponse'
, listDatabasesResponse_databases
- The names of databases.
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:httpStatus:ListDatabasesResponse'
, listDatabasesResponse_httpStatus
- The response's http status code.
Response Lenses
listDatabasesResponse_databases :: Lens' ListDatabasesResponse (Maybe [Text]) Source #
The names of databases.
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_httpStatus :: Lens' ListDatabasesResponse Int Source #
The response's http status code.