ListResourceCatalogsCommand

Lists Amazon SageMaker Catalogs based on given filters and orders. The maximum number of ResourceCatalogs viewable is 1000.

Example Syntax

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

import { SageMakerClient, ListResourceCatalogsCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
// const { SageMakerClient, ListResourceCatalogsCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
const client = new SageMakerClient(config);
const input = { // ListResourceCatalogsRequest
  NameContains: "STRING_VALUE",
  CreationTimeAfter: new Date("TIMESTAMP"),
  CreationTimeBefore: new Date("TIMESTAMP"),
  SortOrder: "Ascending" || "Descending",
  SortBy: "CreationTime",
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListResourceCatalogsCommand(input);
const response = await client.send(command);
// { // ListResourceCatalogsResponse
//   ResourceCatalogs: [ // ResourceCatalogList
//     { // ResourceCatalog
//       ResourceCatalogArn: "STRING_VALUE", // required
//       ResourceCatalogName: "STRING_VALUE", // required
//       Description: "STRING_VALUE", // required
//       CreationTime: new Date("TIMESTAMP"), // required
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListResourceCatalogsCommand Input

Parameter
Type
Description
CreationTimeAfter
Date | undefined

Use this parameter to search for ResourceCatalogs created after a specific date and time.

CreationTimeBefore
Date | undefined

Use this parameter to search for ResourceCatalogs created before a specific date and time.

MaxResults
number | undefined

The maximum number of results returned by ListResourceCatalogs.

NameContains
string | undefined

A string that partially matches one or more ResourceCatalogs names. Filters ResourceCatalog by name.

NextToken
string | undefined

A token to resume pagination of ListResourceCatalogs results.

SortBy
ResourceCatalogSortBy | undefined

The value on which the resource catalog list is sorted.

SortOrder
ResourceCatalogSortOrder | undefined

The order in which the resource catalogs are listed.

ListResourceCatalogsCommand Output

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

A token to resume pagination of ListResourceCatalogs results.

ResourceCatalogs
ResourceCatalog[] | undefined

A list of the requested ResourceCatalogs.

Throws

Name
Fault
Details
SageMakerServiceException
Base exception class for all service exceptions from SageMaker service.