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 |
Amazonka.RedshiftData.ListTables
Description
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 - 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 ListTables = ListTables' {}
- newListTables :: Text -> ListTables
- listTables_clusterIdentifier :: Lens' ListTables (Maybe Text)
- listTables_connectedDatabase :: Lens' ListTables (Maybe Text)
- listTables_dbUser :: Lens' ListTables (Maybe Text)
- listTables_maxResults :: Lens' ListTables (Maybe Natural)
- listTables_nextToken :: Lens' ListTables (Maybe Text)
- listTables_schemaPattern :: Lens' ListTables (Maybe Text)
- listTables_secretArn :: Lens' ListTables (Maybe Text)
- listTables_tablePattern :: Lens' ListTables (Maybe Text)
- listTables_workgroupName :: Lens' ListTables (Maybe 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.
Constructors
ListTables' | |
Fields
|
Instances
Arguments
:: Text | |
-> ListTables |
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:clusterIdentifier:ListTables'
, listTables_clusterIdentifier
- The cluster identifier. This parameter is required when connecting to a
cluster and authenticating using either Secrets Manager or temporary
credentials.
$sel:connectedDatabase:ListTables'
, listTables_connectedDatabase
- A database name. The connected database is specified when you connect
with your authentication credentials.
$sel:dbUser:ListTables'
, listTables_dbUser
- The database user name. This parameter is required when connecting to a
cluster and authenticating using temporary credentials.
$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.
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: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.
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:workgroupName:ListTables'
, listTables_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: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_clusterIdentifier :: Lens' ListTables (Maybe Text) Source #
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or 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_dbUser :: Lens' ListTables (Maybe Text) Source #
The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.
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_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_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_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_workgroupName :: Lens' ListTables (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.
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.
Constructors
ListTablesResponse' | |
Fields
|
Instances
newListTablesResponse Source #
Arguments
:: Int | |
-> ListTablesResponse |
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:
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.