amazonka-redshift-data-2.0: Amazon Redshift Data API Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Creating a Request

data ListTables Source #

See: newListTables smart constructor.

Constructors

ListTables' 

Fields

  • clusterIdentifier :: Maybe Text

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

  • connectedDatabase :: Maybe Text

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

  • dbUser :: Maybe Text

    The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

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

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

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

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

  • workgroupName :: Maybe Text

    The serverless workgroup name. This parameter is required when connecting to a serverless workgroup and 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
ToJSON ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.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

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 #

Generic ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Associated Types

type Rep ListTables :: Type -> Type #

Read ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Show ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

NFData ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Methods

rnf :: ListTables -> () #

Eq ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Hashable ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type AWSResponse ListTables Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type Rep 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: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 SchemaPatternare 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 SchemaPatternare 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

  • 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
Generic ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Associated Types

type Rep ListTablesResponse :: Type -> Type #

Read ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Show ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

NFData ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

Methods

rnf :: ListTablesResponse -> () #

Eq ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type Rep ListTablesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListTables

type Rep ListTablesResponse = D1 ('MetaData "ListTablesResponse" "Amazonka.RedshiftData.ListTables" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" '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:

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.