libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

Creating a Request

data ListTables Source #

See: newListTables smart constructor.

Constructors

ListTables' 

Fields

  • dbUser :: Maybe Text

    The database user name. This parameter is required when authenticating using temporary credentials.

  • connectedDatabase :: Maybe Text

    A database name. The connected database is specified when you connect with your authentication credentials.

  • nextToken :: Maybe Text

    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.

  • secretArn :: Maybe Text

    The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

  • tablePattern :: Maybe Text

    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 SchemaPatternare returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned.

  • maxResults :: Maybe Natural

    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.

  • schemaPattern :: Maybe Text

    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.

  • clusterIdentifier :: Text

    The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

  • database :: Text

    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.

Instances

Instances details
Eq ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Read ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Show ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Generic ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Associated Types

type Rep ListTables :: Type -> Type #

NFData ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Methods

rnf :: ListTables -> () #

Hashable ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

ToJSON ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

AWSPager ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

AWSRequest ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Associated Types

type AWSResponse ListTables #

ToHeaders ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Methods

toHeaders :: ListTables -> [Header] #

ToPath ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

ToQuery ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type Rep ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type AWSResponse ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

newListTables Source #

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

Constructors

ListTablesResponse' 

Fields

  • nextToken :: Maybe Text

    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.

  • tables :: Maybe [TableMember]

    The tables that match the request pattern.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Read ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Show ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Generic ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Associated Types

type Rep ListTablesResponse :: Type -> Type #

NFData ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Methods

rnf :: ListTablesResponse -> () #

type Rep ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type Rep ListTablesResponse = D1 ('MetaData "ListTablesResponse" "Amazonka.RedshiftData.ListTables" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "ListTablesResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TableMember])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.