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

See: newListDatabases smart constructor.

Constructors

ListDatabases' 

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.

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

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

Instances

Instances details
ToJSON ListDatabases Source # 
Instance details

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

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 #

Generic ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Associated Types

type Rep ListDatabases :: Type -> Type #

Read ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Show ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

NFData ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Methods

rnf :: ListDatabases -> () #

Eq ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Hashable ListDatabases Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

type AWSResponse 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" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" 'False) (C1 ('MetaCons "ListDatabases'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)))) :*: ((S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "workgroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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

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

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

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.

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:workgroupName:ListDatabases', listDatabases_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:ListDatabases', listDatabases_database - The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

Request Lenses

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

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

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

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

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

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

  • databases :: Maybe [Text]

    The names of databases.

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

Defined in Amazonka.RedshiftData.ListDatabases

Associated Types

type Rep ListDatabasesResponse :: Type -> Type #

Read ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Show ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

NFData ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

Methods

rnf :: ListDatabasesResponse -> () #

Eq ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

type Rep ListDatabasesResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.ListDatabases

type Rep ListDatabasesResponse = D1 ('MetaData "ListDatabasesResponse" "Amazonka.RedshiftData.ListDatabases" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" 'False) (C1 ('MetaCons "ListDatabasesResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "databases") '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))))

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:databases:ListDatabasesResponse', listDatabasesResponse_databases - The names of databases.

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