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

Description

Lists the schemas in a database. A token is returned to page through the schema 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 ListSchemas Source #

See: newListSchemas smart constructor.

Constructors

ListSchemas' 

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 schemas to return in the response. If more schemas 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.

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

  • 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 schemas to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials.

Instances

Instances details
ToJSON ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

ToHeaders ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Methods

toHeaders :: ListSchemas -> [Header] #

ToPath ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

ToQuery ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

AWSPager ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

AWSRequest ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Associated Types

type AWSResponse ListSchemas #

Generic ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Associated Types

type Rep ListSchemas :: Type -> Type #

Read ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Show ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

NFData ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Methods

rnf :: ListSchemas -> () #

Eq ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Hashable ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

type AWSResponse ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

type Rep ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

newListSchemas Source #

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

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

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

$sel:maxResults:ListSchemas', listSchemas_maxResults - The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then NextToken is returned to page through the results.

ListSchemas, listSchemas_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:ListSchemas', listSchemas_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.

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

$sel:workgroupName:ListSchemas', listSchemas_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:ListSchemas', listSchemas_database - The name of the database that contains the schemas to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials.

Request Lenses

listSchemas_clusterIdentifier :: Lens' ListSchemas (Maybe Text) Source #

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

listSchemas_connectedDatabase :: Lens' ListSchemas (Maybe Text) Source #

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

listSchemas_dbUser :: Lens' ListSchemas (Maybe Text) Source #

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

listSchemas_maxResults :: Lens' ListSchemas (Maybe Natural) Source #

The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then NextToken is returned to page through the results.

listSchemas_nextToken :: Lens' ListSchemas (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.

listSchemas_schemaPattern :: Lens' ListSchemas (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.

listSchemas_secretArn :: Lens' ListSchemas (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.

listSchemas_workgroupName :: Lens' ListSchemas (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.

listSchemas_database :: Lens' ListSchemas Text Source #

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

Destructuring the Response

data ListSchemasResponse Source #

See: newListSchemasResponse smart constructor.

Constructors

ListSchemasResponse' 

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.

  • schemas :: Maybe [Text]

    The schemas that match the request pattern.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Associated Types

type Rep ListSchemasResponse :: Type -> Type #

Read ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Show ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

NFData ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Methods

rnf :: ListSchemasResponse -> () #

Eq ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

type Rep ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

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

newListSchemasResponse Source #

Create a value of ListSchemasResponse 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:

ListSchemas, listSchemasResponse_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:schemas:ListSchemasResponse', listSchemasResponse_schemas - The schemas that match the request pattern.

$sel:httpStatus:ListSchemasResponse', listSchemasResponse_httpStatus - The response's http status code.

Response Lenses

listSchemasResponse_nextToken :: Lens' ListSchemasResponse (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.

listSchemasResponse_schemas :: Lens' ListSchemasResponse (Maybe [Text]) Source #

The schemas that match the request pattern.