search
¶
search(
domain_identifier: DomainId,
search_scope: InventorySearchScope,
*,
config_overrides: Optional[DataZoneClientConfig] = 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/data_zone.py
9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 | |