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
9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 | |