SearchAssets
Searches for assets in AWS Glue Data Catalog using full-text search, filters, sorting, and aggregations. Returns matching assets with relevance-ranked results.
Request Syntax
{
"FilterClause": { ... },
"MaxResults": number,
"NextToken": "string",
"SearchText": "string",
"Sort": {
"Attribute": "string",
"Order": "string"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- FilterClause
-
The filter clause to apply to the search. Supports nested AND/OR logic with attribute-level and map-level filters.
Type: SearchFilterClause object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- MaxResults
-
The maximum number of results to return in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NextToken
-
A continuation token, if this is a continuation call.
Type: String
Required: No
- SearchText
-
The text to search for. At least one of
searchTextorfilterClausemust be provided.Type: String
Length Constraints: Minimum length of 1. Maximum length of 1000.
Required: No
- Sort
-
The sort criteria for the search results.
Type: SearchSort object
Required: No
Response Syntax
{
"Items": [
{
"AssetDescription": "string",
"AssetName": "string",
"AssetTypeId": "string",
"Id": "string",
"UpdatedAt": number
}
],
"NextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- Items
-
The list of assets matching the search criteria.
Type: Array of SearchResultItem objects
- NextToken
-
A continuation token, present if the current segment is not the last.
Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
Access to a resource was denied.
- Message
-
A message describing the problem.
HTTP Status Code: 400
- InternalServiceException
-
An internal service error occurred.
- Message
-
A message describing the problem.
HTTP Status Code: 500
- InvalidInputException
-
The input provided was not valid.
- FromFederationSource
-
Indicates whether or not the exception relates to a federated source.
- Message
-
A message describing the problem.
HTTP Status Code: 400
- ThrottlingException
-
The throttling threshhold was exceeded.
- Message
-
A message describing the problem.
HTTP Status Code: 400
Examples
Example
The following example runs a full-text search for assets.
aws glue search-assets --search-text "sales" --max-results 10 { "Items": [ { "Id": "quarterly-sales-2026q1", "AssetName": "Quarterly Sales 2026 Q1", "AssetDescription": "Aggregated quarterly sales metrics", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "DataSet" } ] }
Example
The following example searches with a filter clause and sort order.
aws glue search-assets \ --search-text "sales" \ --max-results 10 \ --filter-clause '{"AttributeFilter":{"Attribute":"AssetTypeId","Operator":"equals","Value":{"StringValue":"DataSet"}}}' \ --sort '{"Attribute":"name","Order":"ASCENDING"}' { "Items": [ { "Id": "quarterly-sales-2026q1", "AssetName": "Quarterly Sales 2026 Q1", "AssetDescription": "Aggregated quarterly sales metrics", "UpdatedAt": "2026-06-16T06:42:00.442Z", "AssetTypeId": "DataSet" } ] }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: