- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
SearchListingsCommand
Searches listings (records of an asset at a given time) in Amazon DataZone.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, SearchListingsCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, SearchListingsCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // SearchListingsInput
domainIdentifier: "STRING_VALUE", // required
searchText: "STRING_VALUE",
searchIn: [ // SearchInList
{ // SearchInItem
attribute: "STRING_VALUE", // required
},
],
maxResults: Number("int"),
nextToken: "STRING_VALUE",
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 SearchListingsCommand(input);
const response = await client.send(command);
// { // SearchListingsOutput
// items: [ // SearchResultItems
// { // SearchResultItem Union: only one key present
// assetListing: { // AssetListingItem
// listingId: "STRING_VALUE",
// listingRevision: "STRING_VALUE",
// name: "STRING_VALUE",
// entityId: "STRING_VALUE",
// entityRevision: "STRING_VALUE",
// entityType: "STRING_VALUE",
// description: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// listingCreatedBy: "STRING_VALUE",
// listingUpdatedBy: "STRING_VALUE",
// glossaryTerms: [ // DetailedGlossaryTerms
// { // DetailedGlossaryTerm
// name: "STRING_VALUE",
// shortDescription: "STRING_VALUE",
// },
// ],
// owningProjectId: "STRING_VALUE",
// additionalAttributes: { // AssetListingItemAdditionalAttributes
// forms: "STRING_VALUE",
// latestTimeSeriesDataPointForms: [ // TimeSeriesDataPointSummaryFormOutputList
// { // TimeSeriesDataPointSummaryFormOutput
// formName: "STRING_VALUE", // required
// typeIdentifier: "STRING_VALUE", // required
// typeRevision: "STRING_VALUE",
// timestamp: new Date("TIMESTAMP"), // required
// contentSummary: "STRING_VALUE",
// id: "STRING_VALUE",
// },
// ],
// },
// },
// dataProductListing: { // DataProductListingItem
// listingId: "STRING_VALUE",
// listingRevision: "STRING_VALUE",
// name: "STRING_VALUE",
// entityId: "STRING_VALUE",
// entityRevision: "STRING_VALUE",
// description: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// listingCreatedBy: "STRING_VALUE",
// listingUpdatedBy: "STRING_VALUE",
// glossaryTerms: [
// {
// name: "STRING_VALUE",
// shortDescription: "STRING_VALUE",
// },
// ],
// owningProjectId: "STRING_VALUE",
// additionalAttributes: { // DataProductListingItemAdditionalAttributes
// forms: "STRING_VALUE",
// },
// items: [ // ListingSummaryItems
// { // ListingSummaryItem
// listingId: "STRING_VALUE",
// listingRevision: "STRING_VALUE",
// glossaryTerms: [
// {
// name: "STRING_VALUE",
// shortDescription: "STRING_VALUE",
// },
// ],
// },
// ],
// },
// },
// ],
// nextToken: "STRING_VALUE",
// totalMatchCount: Number("int"),
// };
SearchListingsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainIdentifier Required | string | undefined | The identifier of the domain in which to search listings. |
additionalAttributes | SearchOutputAdditionalAttribute[] | undefined | Specifies additional attributes for the search. |
filters | FilterClause | undefined | Specifies the filters for the search of listings. |
maxResults | number | undefined | The maximum number of results to return in a single call to |
nextToken | string | undefined | When the number of results is greater than the default value for the |
searchIn | SearchInItem[] | undefined | The details of the search. |
searchText | string | undefined | Specifies the text for which to search. |
sort | SearchSort | undefined | Specifies the way for sorting the search results. |
SearchListingsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
items | SearchResultItem[] | undefined | The results of the |
nextToken | string | undefined | When the number of results is greater than the default value for the |
totalMatchCount | number | undefined | Total number of search results. |
Throws
Name | Fault | Details |
---|
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. |