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 tables in a database. If neither SchemaPattern
nor
TablePattern
are specified, then all tables in the database are
returned. A token is returned to page through the table 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 ListTables = ListTables' {}
- newListTables :: Text -> Text -> ListTables
- listTables_dbUser :: Lens' ListTables (Maybe Text)
- listTables_connectedDatabase :: Lens' ListTables (Maybe Text)
- listTables_nextToken :: Lens' ListTables (Maybe Text)
- listTables_secretArn :: Lens' ListTables (Maybe Text)
- listTables_tablePattern :: Lens' ListTables (Maybe Text)
- listTables_maxResults :: Lens' ListTables (Maybe Natural)
- listTables_schemaPattern :: Lens' ListTables (Maybe Text)
- listTables_clusterIdentifier :: Lens' ListTables Text
- listTables_database :: Lens' ListTables Text
- data ListTablesResponse = ListTablesResponse' {
- nextToken :: Maybe Text
- tables :: Maybe [TableMember]
- httpStatus :: Int
- newListTablesResponse :: Int -> ListTablesResponse
- listTablesResponse_nextToken :: Lens' ListTablesResponse (Maybe Text)
- listTablesResponse_tables :: Lens' ListTablesResponse (Maybe [TableMember])
- listTablesResponse_httpStatus :: Lens' ListTablesResponse Int
Creating a Request
data ListTables Source #
See: newListTables
smart constructor.
ListTables' | |
|
Instances
Create a value of ListTables
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:ListTables'
, listTables_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:connectedDatabase:ListTables'
, listTables_connectedDatabase
- A database name. The connected database is specified when you connect
with your authentication credentials.
$sel:nextToken:ListTables'
, listTables_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:ListTables'
, listTables_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:tablePattern:ListTables'
, listTables_tablePattern
- A pattern to filter results by table name. Within a table pattern, "%"
means match any substring of 0 or more characters and "_" means match
any one character. Only table name entries matching the search pattern
are returned. If TablePattern
is not specified, then all tables that
match SchemaPattern
are returned. If neither SchemaPattern
or
TablePattern
are specified, then all tables are returned.
$sel:maxResults:ListTables'
, listTables_maxResults
- The maximum number of tables to return in the response. If more tables
exist than fit in one response, then NextToken
is returned to page
through the results.
$sel:schemaPattern:ListTables'
, listTables_schemaPattern
- A pattern to filter results by schema name. Within a schema pattern,
"%" means match any substring of 0 or more characters and "_" means
match any one character. Only schema name entries matching the search
pattern are returned. If SchemaPattern
is not specified, then all
tables that match TablePattern
are returned. If neither
SchemaPattern
or TablePattern
are specified, then all tables are
returned.
$sel:clusterIdentifier:ListTables'
, listTables_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ListTables'
, listTables_database
- The name of the database that contains the tables to list. If
ConnectedDatabase
is not specified, this is also the database to
connect to with your authentication credentials.
Request Lenses
listTables_dbUser :: Lens' ListTables (Maybe Text) Source #
The database user name. This parameter is required when authenticating using temporary credentials.
listTables_connectedDatabase :: Lens' ListTables (Maybe Text) Source #
A database name. The connected database is specified when you connect with your authentication credentials.
listTables_nextToken :: Lens' ListTables (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.
listTables_secretArn :: Lens' ListTables (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.
listTables_tablePattern :: Lens' ListTables (Maybe Text) Source #
A pattern to filter results by table name. Within a table pattern, "%"
means match any substring of 0 or more characters and "_" means match
any one character. Only table name entries matching the search pattern
are returned. If TablePattern
is not specified, then all tables that
match SchemaPattern
are returned. If neither SchemaPattern
or
TablePattern
are specified, then all tables are returned.
listTables_maxResults :: Lens' ListTables (Maybe Natural) Source #
The maximum number of tables to return in the response. If more tables
exist than fit in one response, then NextToken
is returned to page
through the results.
listTables_schemaPattern :: Lens' ListTables (Maybe Text) Source #
A pattern to filter results by schema name. Within a schema pattern,
"%" means match any substring of 0 or more characters and "_" means
match any one character. Only schema name entries matching the search
pattern are returned. If SchemaPattern
is not specified, then all
tables that match TablePattern
are returned. If neither
SchemaPattern
or TablePattern
are specified, then all tables are
returned.
listTables_clusterIdentifier :: Lens' ListTables Text Source #
The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
listTables_database :: Lens' ListTables Text Source #
The name of the database that contains the tables to list. If
ConnectedDatabase
is not specified, this is also the database to
connect to with your authentication credentials.
Destructuring the Response
data ListTablesResponse Source #
See: newListTablesResponse
smart constructor.
ListTablesResponse' | |
|
Instances
newListTablesResponse Source #
Create a value of ListTablesResponse
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:ListTables'
, listTablesResponse_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:tables:ListTablesResponse'
, listTablesResponse_tables
- The tables that match the request pattern.
$sel:httpStatus:ListTablesResponse'
, listTablesResponse_httpStatus
- The response's http status code.
Response Lenses
listTablesResponse_nextToken :: Lens' ListTablesResponse (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.
listTablesResponse_tables :: Lens' ListTablesResponse (Maybe [TableMember]) Source #
The tables that match the request pattern.
listTablesResponse_httpStatus :: Lens' ListTablesResponse Int Source #
The response's http status code.