Skip to content

Retrieves all databases defined in a given Data Catalog

Description

Retrieves all databases defined in a given Data Catalog.

Usage

glue_get_databases(CatalogId, NextToken, MaxResults, ResourceShareType,
  AttributesToGet)

Arguments

  • CatalogId

The ID of the Data Catalog from which to retrieve Databases. If none is provided, the Amazon Web Services account ID is used by default.

  • NextToken

A continuation token, if this is a continuation call.

  • MaxResults

The maximum number of databases to return in one response.

  • ResourceShareType

Allows you to specify that you want to list the databases shared with your account. The allowable values are FEDERATED, FOREIGN or ALL.

  • If set to FEDERATED, will list the federated databases (referencing an external entity) shared with your account.
  • If set to FOREIGN, will list the databases shared with your account.
  • If set to ALL, will list the databases shared with your account, as well as the databases in yor local account.

  • AttributesToGet

Specifies the database fields returned by the get_databases call. This parameter doesn’t accept an empty list. The request must include the NAME.

Value

A list with the following syntax:

list(
  DatabaseList = list(
    list(
      Name = "string",
      Description = "string",
      LocationUri = "string",
      Parameters = list(
        "string"
      ),
      CreateTime = as.POSIXct(
        "2015-01-01"
      ),
      CreateTableDefaultPermissions = list(
        list(
          Principal = list(
            DataLakePrincipalIdentifier = "string"
          ),
          Permissions = list(
            "ALL"|"SELECT"|"ALTER"|"DROP"|"DELETE"|"INSERT"|"CREATE_DATABASE"|"CREATE_TABLE"|"DATA_LOCATION_ACCESS"
          )
        )
      ),
      TargetDatabase = list(
        CatalogId = "string",
        DatabaseName = "string",
        Region = "string"
      ),
      CatalogId = "string",
      FederatedDatabase = list(
        Identifier = "string",
        ConnectionName = "string",
        ConnectionType = "string"
      )
    )
  ),
  NextToken = "string"
)

Request syntax

svc$get_databases(
  CatalogId = "string",
  NextToken = "string",
  MaxResults = 123,
  ResourceShareType = "FOREIGN"|"ALL"|"FEDERATED",
  AttributesToGet = list(
    "NAME"|"TARGET_DATABASE"
  )
)