search
async
¶
search(
query_string: QueryString,
*,
config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
max_results: Optional[int] = None,
view_arn: Optional[str] = None,
next_token: Optional[str] = None,
) -> SearchOutput
Searches for resources and displays details about all resources that match the specified criteria. You must specify a query string.
All search queries must use a view. If you don't explicitly specify a view, then Amazon Web Services Resource Explorer uses the default view for the Amazon Web Services Region in which you call this operation. The results are the logical intersection of the results that match both the QueryString parameter supplied to this operation and the SearchFilter parameter attached to the view.
For the complete syntax supported by the QueryString parameter, see Search query syntax reference for Resource Explorer.
If your search results are empty, or are missing results that you think should be there, see Troubleshooting Resource Explorer search.
Parameters:
-
query_string(QueryString) –A string that includes keywords and filters that specify the resources that you want to include in the results.
For the complete syntax supported by the
QueryStringparameter, see Search query syntax reference for Resource Explorer.The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.
The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for
QueryStringto refine the results. -
max_results(Optional[int], default:None) –The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the
NextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results.An API operation can return fewer results than the maximum even when there are more results available. You should check
NextTokenafter every operation to ensure that you receive all of the results. -
view_arn(Optional[str], default:None) –Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a
401 Unauthorizedexception. -
next_token(Optional[str], default:None) –The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call'sNextTokenresponse to indicate where the output should continue from. The pagination tokens expire after 24 hours.
Raises:
-
AccessDeniedException–The credentials that you used to call this operation don't have the minimum required permissions.
-
InternalServerException–The request failed because of internal service error. Try your request again later.
-
ResourceNotFoundException–You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.
-
ThrottlingException–The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer.
-
UnauthorizedException–The principal making the request isn't permitted to perform the operation.
-
ValidationException–You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_resource_explorer_2/_services/async_resource_explorer2.py
1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 | |