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

See: newListSchemas smart constructor.

Constructors

ListSchemas' 

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.

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

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

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

Instances

Instances details
Eq ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Read ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Show ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Generic ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Associated Types

type Rep ListSchemas :: Type -> Type #

NFData ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Methods

rnf :: ListSchemas -> () #

Hashable ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

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

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

type Rep ListSchemas Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

type Rep ListSchemas = D1 ('MetaData "ListSchemas" "Amazonka.RedshiftData.ListSchemas" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "ListSchemas'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "connectedDatabase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "schemaPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse 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:dbUser:ListSchemas', listSchemas_dbUser - The database user name. This parameter is required when authenticating using temporary credentials.

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

$sel:nextToken: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:secretArn: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: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.

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

$sel:clusterIdentifier:ListSchemas', listSchemas_clusterIdentifier - The cluster identifier. This parameter is required when 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_dbUser :: Lens' ListSchemas (Maybe Text) Source #

The database user name. This parameter is required when authenticating using 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_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_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_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_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_clusterIdentifier :: Lens' ListSchemas Text Source #

The cluster identifier. This parameter is required when 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

  • schemas :: Maybe [Text]

    The schemas that match the request pattern.

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Read ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Show ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Generic ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Associated Types

type Rep ListSchemasResponse :: Type -> Type #

NFData ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

Methods

rnf :: ListSchemasResponse -> () #

type Rep ListSchemasResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListSchemas

type Rep ListSchemasResponse = D1 ('MetaData "ListSchemasResponse" "Amazonka.RedshiftData.ListSchemas" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "ListSchemasResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "schemas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "nextToken") '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:

$sel:schemas:ListSchemasResponse', listSchemasResponse_schemas - The schemas that match the request pattern.

$sel:nextToken: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:httpStatus:ListSchemasResponse', listSchemasResponse_httpStatus - The response's http status code.

Response Lenses

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

The schemas that match the request pattern.

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.