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

Description

List the databases in a cluster. A token is returned to page through the database 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 ListDatabases Source #

See: newListDatabases smart constructor.

Constructors

ListDatabases' 

Fields

  • dbUser :: Maybe Text

    The database user name. This parameter is required when authenticating using temporary 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 databases to return in the response. If more databases exist than fit in one response, then NextToken is returned to page through the results.

  • 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. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

Instances

Instances details
Eq ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Read ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Show ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Generic ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Associated Types

type Rep ListDatabases :: Type -> Type #

NFData ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Methods

rnf :: ListDatabases -> () #

Hashable ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

ToJSON ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

AWSPager ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

AWSRequest ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Associated Types

type AWSResponse ListDatabases #

ToHeaders ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

ToPath ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

ToQuery ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

type Rep ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

type Rep ListDatabases = D1 ('MetaData "ListDatabases" "Amazonka.RedshiftData.ListDatabases" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "ListDatabases'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbUser") '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 "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

newListDatabases Source #

Create a value of ListDatabases 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:ListDatabases', listDatabases_dbUser - The database user name. This parameter is required when authenticating using temporary credentials.

$sel:nextToken:ListDatabases', listDatabases_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:ListDatabases', listDatabases_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:ListDatabases', listDatabases_maxResults - The maximum number of databases to return in the response. If more databases exist than fit in one response, then NextToken is returned to page through the results.

$sel:clusterIdentifier:ListDatabases', listDatabases_clusterIdentifier - The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

$sel:database:ListDatabases', listDatabases_database - The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

Request Lenses

listDatabases_dbUser :: Lens' ListDatabases (Maybe Text) Source #

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

listDatabases_nextToken :: Lens' ListDatabases (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.

listDatabases_secretArn :: Lens' ListDatabases (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.

listDatabases_maxResults :: Lens' ListDatabases (Maybe Natural) Source #

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

listDatabases_clusterIdentifier :: Lens' ListDatabases Text Source #

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

listDatabases_database :: Lens' ListDatabases Text Source #

The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

Destructuring the Response

data ListDatabasesResponse Source #

See: newListDatabasesResponse smart constructor.

Constructors

ListDatabasesResponse' 

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.

  • databases :: Maybe [Text]

    The names of databases.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Read ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Show ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Generic ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Associated Types

type Rep ListDatabasesResponse :: Type -> Type #

NFData ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Methods

rnf :: ListDatabasesResponse -> () #

type Rep ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

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

newListDatabasesResponse Source #

Create a value of ListDatabasesResponse 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:ListDatabases', listDatabasesResponse_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:databases:ListDatabasesResponse', listDatabasesResponse_databases - The names of databases.

$sel:httpStatus:ListDatabasesResponse', listDatabasesResponse_httpStatus - The response's http status code.

Response Lenses

listDatabasesResponse_nextToken :: Lens' ListDatabasesResponse (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.