ListResourcesCommand

Lists the resources registered to be managed by the Data Catalog.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LakeFormationClient, ListResourcesCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, ListResourcesCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // ListResourcesRequest
  FilterConditionList: [ // FilterConditionList
    { // FilterCondition
      Field: "RESOURCE_ARN" || "ROLE_ARN" || "LAST_MODIFIED",
      ComparisonOperator: "EQ" || "NE" || "LE" || "LT" || "GE" || "GT" || "CONTAINS" || "NOT_CONTAINS" || "BEGINS_WITH" || "IN" || "BETWEEN",
      StringValueList: [ // StringValueList
        "STRING_VALUE",
      ],
    },
  ],
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListResourcesCommand(input);
const response = await client.send(command);
// { // ListResourcesResponse
//   ResourceInfoList: [ // ResourceInfoList
//     { // ResourceInfo
//       ResourceArn: "STRING_VALUE",
//       RoleArn: "STRING_VALUE",
//       LastModified: new Date("TIMESTAMP"),
//       WithFederation: true || false,
//       HybridAccessEnabled: true || false,
//       WithPrivilegedAccess: true || false,
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListResourcesCommand Input

See ListResourcesCommandInput for more details

Parameter
Type
Description
FilterConditionList
FilterCondition[] | undefined

Any applicable row-level and/or column-level filtering conditions for the resources.

MaxResults
number | undefined

The maximum number of resource results.

NextToken
string | undefined

A continuation token, if this is not the first call to retrieve these resources.

ListResourcesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

A continuation token, if this is not the first call to retrieve these resources.

ResourceInfoList
ResourceInfo[] | undefined

A summary of the data lake resources.

Throws

Name
Fault
Details
InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

LakeFormationServiceException
Base exception class for all service exceptions from LakeFormation service.