SearchCommand

Searches for assets in Amazon DataZone.

Example Syntax

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

import { DataZoneClient, SearchCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, SearchCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // SearchInput
  domainIdentifier: "STRING_VALUE", // required
  owningProjectIdentifier: "STRING_VALUE",
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
  searchScope: "ASSET" || "GLOSSARY" || "GLOSSARY_TERM" || "DATA_PRODUCT", // required
  searchText: "STRING_VALUE",
  searchIn: [ // SearchInList
    { // SearchInItem
      attribute: "STRING_VALUE", // required
    },
  ],
  filters: { // FilterClause Union: only one key present
    filter: { // Filter
      attribute: "STRING_VALUE", // required
      value: "STRING_VALUE", // required
    },
    and: [ // FilterList
      {//  Union: only one key present
        filter: {
          attribute: "STRING_VALUE", // required
          value: "STRING_VALUE", // required
        },
        and: [
          "<FilterClause>",
        ],
        or: [
          "<FilterClause>",
        ],
      },
    ],
    or: [
      "<FilterClause>",
    ],
  },
  sort: { // SearchSort
    attribute: "STRING_VALUE", // required
    order: "ASCENDING" || "DESCENDING",
  },
  additionalAttributes: [ // SearchOutputAdditionalAttributes
    "FORMS" || "TIME_SERIES_DATA_POINT_FORMS",
  ],
};
const command = new SearchCommand(input);
const response = await client.send(command);
// { // SearchOutput
//   items: [ // SearchInventoryResultItems
//     { // SearchInventoryResultItem Union: only one key present
//       glossaryItem: { // GlossaryItem
//         domainId: "STRING_VALUE", // required
//         id: "STRING_VALUE", // required
//         name: "STRING_VALUE", // required
//         owningProjectId: "STRING_VALUE", // required
//         description: "STRING_VALUE",
//         status: "DISABLED" || "ENABLED", // required
//         createdAt: new Date("TIMESTAMP"),
//         createdBy: "STRING_VALUE",
//         updatedAt: new Date("TIMESTAMP"),
//         updatedBy: "STRING_VALUE",
//       },
//       glossaryTermItem: { // GlossaryTermItem
//         domainId: "STRING_VALUE", // required
//         glossaryId: "STRING_VALUE", // required
//         id: "STRING_VALUE", // required
//         name: "STRING_VALUE", // required
//         shortDescription: "STRING_VALUE",
//         longDescription: "STRING_VALUE",
//         termRelations: { // TermRelations
//           isA: [ // GlossaryTerms
//             "STRING_VALUE",
//           ],
//           classifies: [
//             "STRING_VALUE",
//           ],
//         },
//         status: "ENABLED" || "DISABLED", // required
//         createdAt: new Date("TIMESTAMP"),
//         createdBy: "STRING_VALUE",
//         updatedAt: new Date("TIMESTAMP"),
//         updatedBy: "STRING_VALUE",
//       },
//       assetItem: { // AssetItem
//         domainId: "STRING_VALUE", // required
//         identifier: "STRING_VALUE", // required
//         name: "STRING_VALUE", // required
//         typeIdentifier: "STRING_VALUE", // required
//         typeRevision: "STRING_VALUE", // required
//         externalIdentifier: "STRING_VALUE",
//         description: "STRING_VALUE",
//         createdAt: new Date("TIMESTAMP"),
//         createdBy: "STRING_VALUE",
//         firstRevisionCreatedAt: new Date("TIMESTAMP"),
//         firstRevisionCreatedBy: "STRING_VALUE",
//         glossaryTerms: [
//           "STRING_VALUE",
//         ],
//         owningProjectId: "STRING_VALUE", // required
//         additionalAttributes: { // AssetItemAdditionalAttributes
//           formsOutput: [ // FormOutputList
//             { // FormOutput
//               formName: "STRING_VALUE", // required
//               typeName: "STRING_VALUE",
//               typeRevision: "STRING_VALUE",
//               content: "STRING_VALUE",
//             },
//           ],
//           readOnlyFormsOutput: [
//             {
//               formName: "STRING_VALUE", // required
//               typeName: "STRING_VALUE",
//               typeRevision: "STRING_VALUE",
//               content: "STRING_VALUE",
//             },
//           ],
//           latestTimeSeriesDataPointFormsOutput: [ // TimeSeriesDataPointSummaryFormOutputList
//             { // TimeSeriesDataPointSummaryFormOutput
//               formName: "STRING_VALUE", // required
//               typeIdentifier: "STRING_VALUE", // required
//               typeRevision: "STRING_VALUE",
//               timestamp: new Date("TIMESTAMP"), // required
//               contentSummary: "STRING_VALUE",
//               id: "STRING_VALUE",
//             },
//           ],
//         },
//       },
//       dataProductItem: { // DataProductResultItem
//         domainId: "STRING_VALUE", // required
//         id: "STRING_VALUE", // required
//         name: "STRING_VALUE", // required
//         owningProjectId: "STRING_VALUE", // required
//         description: "STRING_VALUE",
//         glossaryTerms: [
//           "STRING_VALUE",
//         ],
//         createdAt: new Date("TIMESTAMP"),
//         createdBy: "STRING_VALUE",
//         firstRevisionCreatedAt: new Date("TIMESTAMP"),
//         firstRevisionCreatedBy: "STRING_VALUE",
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
//   totalMatchCount: Number("int"),
// };

SearchCommand Input

See SearchCommandInput for more details

Parameter
Type
Description
domainIdentifier
Required
string | undefined

The identifier of the Amazon DataZone domain.

searchScope
Required
InventorySearchScope | undefined

The scope of the search.

additionalAttributes
SearchOutputAdditionalAttribute[] | undefined

Specifies additional attributes for the Search action.

filters
FilterClause | undefined

Specifies the search filters.

maxResults
number | undefined

The maximum number of results to return in a single call to Search. When the number of results to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to Search to list the next set of results.

nextToken
string | undefined

When the number of results is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to Search to list the next set of results.

owningProjectIdentifier
string | undefined

The identifier of the owning project specified for the search.

searchIn
SearchInItem[] | undefined

The details of the search.

searchText
string | undefined

Specifies the text for which to search.

sort
SearchSort | undefined

Specifies the way in which the search results are to be sorted.

SearchCommand Output

See SearchCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
items
SearchInventoryResultItem[] | undefined

The results of the Search action.

nextToken
string | undefined

When the number of results is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to Search to list the next set of results.

totalMatchCount
number | undefined

Total number of search results.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

The request has failed because of an unknown error, exception or failure.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by the Amazon Web Services service.

UnauthorizedException
client

You do not have permission to perform this action.

DataZoneServiceException
Base exception class for all service exceptions from DataZone service.