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

Description

Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column 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 DescribeTable Source #

See: newDescribeTable smart constructor.

Constructors

DescribeTable' 

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.

  • schema :: Maybe Text

    The schema that contains the table. If no schema is specified, then matching tables for all schemas 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.

  • table :: Maybe Text

    The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database 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 be described. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials.

Instances

Instances details
ToJSON DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

ToHeaders DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

ToPath DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

ToQuery DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

AWSPager DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

AWSRequest DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Associated Types

type AWSResponse DescribeTable #

Generic DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Associated Types

type Rep DescribeTable :: Type -> Type #

Read DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Show DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

NFData DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Methods

rnf :: DescribeTable -> () #

Eq DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Hashable DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

type AWSResponse DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

type Rep DescribeTable Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

newDescribeTable Source #

Create a value of DescribeTable 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:DescribeTable', describeTable_clusterIdentifier - The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

$sel:connectedDatabase:DescribeTable', describeTable_connectedDatabase - A database name. The connected database is specified when you connect with your authentication credentials.

$sel:dbUser:DescribeTable', describeTable_dbUser - The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

$sel:maxResults:DescribeTable', describeTable_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.

DescribeTable, describeTable_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.

DescribeTable, describeTable_schema - The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.

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

$sel:table:DescribeTable', describeTable_table - The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned

$sel:workgroupName:DescribeTable', describeTable_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:DescribeTable', describeTable_database - The name of the database that contains the tables to be described. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials.

Request Lenses

describeTable_clusterIdentifier :: Lens' DescribeTable (Maybe Text) Source #

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

describeTable_connectedDatabase :: Lens' DescribeTable (Maybe Text) Source #

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

describeTable_dbUser :: Lens' DescribeTable (Maybe Text) Source #

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

describeTable_maxResults :: Lens' DescribeTable (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.

describeTable_nextToken :: Lens' DescribeTable (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.

describeTable_schema :: Lens' DescribeTable (Maybe Text) Source #

The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.

describeTable_secretArn :: Lens' DescribeTable (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.

describeTable_table :: Lens' DescribeTable (Maybe Text) Source #

The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned

describeTable_workgroupName :: Lens' DescribeTable (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.

describeTable_database :: Lens' DescribeTable Text Source #

The name of the database that contains the tables to be described. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials.

Destructuring the Response

data DescribeTableResponse Source #

See: newDescribeTableResponse smart constructor.

Constructors

DescribeTableResponse' 

Fields

  • columnList :: Maybe [ColumnMetadata]

    A list of columns in the table.

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

  • tableName :: Maybe Text

    The table name.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Associated Types

type Rep DescribeTableResponse :: Type -> Type #

Read DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Show DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

NFData DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

Methods

rnf :: DescribeTableResponse -> () #

Eq DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

type Rep DescribeTableResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeTable

type Rep DescribeTableResponse = D1 ('MetaData "DescribeTableResponse" "Amazonka.RedshiftData.DescribeTable" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" 'False) (C1 ('MetaCons "DescribeTableResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "columnList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ColumnMetadata])) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tableName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDescribeTableResponse Source #

Create a value of DescribeTableResponse 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:columnList:DescribeTableResponse', describeTableResponse_columnList - A list of columns in the table.

DescribeTable, describeTableResponse_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.

DescribeTableResponse, describeTableResponse_tableName - The table name.

$sel:httpStatus:DescribeTableResponse', describeTableResponse_httpStatus - The response's http status code.

Response Lenses

describeTableResponse_nextToken :: Lens' DescribeTableResponse (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.