search
async
¶
search(
domain_identifier: DomainId,
search_scope: InventorySearchScope,
*,
config_overrides: Optional[AsyncDataZoneClientConfig] = None,
owning_project_identifier: Optional[ProjectId] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
search_text: Optional[SearchText] = None,
search_in: Optional[SearchInList] = None,
filters: Optional[FilterClause] = None,
sort: Optional[SearchSort] = None,
additional_attributes: Optional[SearchOutputAdditionalAttributes] = None,
) -> SearchOutput
Searches for assets in Amazon DataZone.
Search in Amazon DataZone is a powerful capability that enables users to discover and explore data assets, glossary terms, and data products across their organization. It provides both basic and advanced search functionality, allowing users to find resources based on names, descriptions, metadata, and other attributes. Search can be scoped to specific types of resources (like assets, glossary terms, or data products) and can be filtered using various criteria such as creation date, owner, or status. The search functionality is essential for making the wealth of data resources in an organization discoverable and usable, helping users find the right data for their needs quickly and efficiently.
Many search commands in Amazon DataZone are paginated, including search and search-types. When the result set is large, Amazon DataZone returns a nextToken in the response. This token can be used to retrieve the next page of results.
Prerequisites:
-
The --domain-identifier must refer to an existing Amazon DataZone domain.
-
--search-scope must be one of: ASSET, GLOSSARY_TERM, DATA_PRODUCT, or GLOSSARY.
-
The user must have search permissions in the specified domain.
-
If using --filters, ensure that the JSON is well-formed and that each filter includes valid attribute and value keys.
-
For paginated results, be prepared to use --next-token to fetch additional pages.
To run a standard free-text search, the searchText parameter must be supplied. By default, all searchable fields are indexed for semantic search and will return semantic matches for SearchListings queries. To prevent semantic search indexing for a custom form attribute, see the CreateFormType API documentation. To run a lexical search query, enclose the query with double quotes (""). This will disable semantic search even for fields that have semantic search enabled and will only return results that contain the keywords wrapped by double quotes (order of tokens in the query is not enforced). Free-text search is supported for all attributes annotated with @amazon.datazone#searchable.
To run a filtered search, provide filter clause using the filters parameter. To filter on glossary terms, use the special attribute __DataZoneGlossaryTerms. To filter on an indexed numeric attribute (i.e., a numeric attribute annotated with @amazon.datazone#sortable), provide a filter using the intValue parameter. The filters parameter can also be used to run more advanced free-text searches that target specific attributes (attributes must be annotated with @amazon.datazone#searchable for free-text search). Create/update timestamp filtering is supported using the special creationTime/lastUpdatedTime attributes. Filter types can be mixed and matched to power complex queries.
To find out whether an attribute has been annotated and indexed for a given search type, use the GetFormType API to retrieve the form containing the attribute.
Parameters:
-
domain_identifier(DomainId) –The identifier of the Amazon DataZone domain.
-
owning_project_identifier(Optional[ProjectId], default:None) –The identifier of the owning project specified for the search.
-
max_results(Optional[MaxResults], default:None) –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 ofMaxResults, the response contains aNextTokenvalue that you can use in a subsequent call toSearchto list the next set of results. -
next_token(Optional[PaginationToken], default:None) –When the number of results is greater than the default value for the
MaxResultsparameter, or if you explicitly specify a value forMaxResultsthat is less than the number of results, the response includes a pagination token namedNextToken. You can specify thisNextTokenvalue in a subsequent call toSearchto list the next set of results. -
search_scope(InventorySearchScope) –The scope of the search.
-
search_text(Optional[SearchText], default:None) –Specifies the text for which to search.
-
search_in(Optional[SearchInList], default:None) –The details of the search.
-
filters(Optional[FilterClause], default:None) –Specifies the search filters.
-
sort(Optional[SearchSort], default:None) –Specifies the way in which the search results are to be sorted.
-
additional_attributes(Optional[SearchOutputAdditionalAttributes], default:None) –Specifies additional attributes for the
Searchaction.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ThrottlingException–The request was denied due to request throttling.
-
UnauthorizedException–You do not have permission to perform this action.
-
InternalServerException–The request has failed because of an unknown error, exception or failure.
-
ValidationException–The input fails to satisfy the constraints specified by the Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_datazone/_services/async_data_zone.py
9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 | |