Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
This operation returns paginated results.
Synopsis
- data Search = Search' {}
- newSearch :: Text -> Search
- search_maxResults :: Lens' Search (Maybe Natural)
- search_nextToken :: Lens' Search (Maybe Text)
- search_viewArn :: Lens' Search (Maybe Text)
- search_queryString :: Lens' Search Text
- data SearchResponse = SearchResponse' {}
- newSearchResponse :: Int -> SearchResponse
- searchResponse_count :: Lens' SearchResponse (Maybe ResourceCount)
- searchResponse_nextToken :: Lens' SearchResponse (Maybe Text)
- searchResponse_resources :: Lens' SearchResponse (Maybe [Resource])
- searchResponse_viewArn :: Lens' SearchResponse (Maybe Text)
- searchResponse_httpStatus :: Lens' SearchResponse Int
Creating a Request
See: newSearch
smart constructor.
Search' | |
|
Instances
Create a value of Search
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:maxResults:Search'
, search_maxResults
- 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 NextToken
response element is
present and has a value (is not null). Include that value as the
NextToken
request 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 NextToken
after
every operation to ensure that you receive all of the results.
Search
, search_nextToken
- The parameter for receiving additional results if you receive a
NextToken
response in a previous request. A NextToken
response
indicates that more output is available. Set this parameter to the value
of the previous call's NextToken
response to indicate where the
output should continue from.
Search
, search_viewArn
- 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 Unauthorized
exception.
$sel:queryString:Search'
, search_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 QueryString
parameter, 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 QueryString
to refine the results.
Request Lenses
search_maxResults :: Lens' Search (Maybe Natural) Source #
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 NextToken
response element is
present and has a value (is not null). Include that value as the
NextToken
request 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 NextToken
after
every operation to ensure that you receive all of the results.
search_nextToken :: Lens' Search (Maybe Text) Source #
The parameter for receiving additional results if you receive a
NextToken
response in a previous request. A NextToken
response
indicates that more output is available. Set this parameter to the value
of the previous call's NextToken
response to indicate where the
output should continue from.
search_viewArn :: Lens' Search (Maybe Text) Source #
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 Unauthorized
exception.
search_queryString :: Lens' Search Text Source #
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 QueryString
parameter, 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 QueryString
to refine the results.
Destructuring the Response
data SearchResponse Source #
See: newSearchResponse
smart constructor.
SearchResponse' | |
|
Instances
Create a value of SearchResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:count:SearchResponse'
, searchResponse_count
- The number of resources that match the query.
Search
, searchResponse_nextToken
- If present, indicates that more output is available than is included in
the current response. Use this value in the NextToken
request
parameter in a subsequent call to the operation to get the next part of
the output. You should repeat this until the NextToken
response
element comes back as null
.
$sel:resources:SearchResponse'
, searchResponse_resources
- The list of structures that describe the resources that match the query.
Search
, searchResponse_viewArn
- The
Amazon resource name (ARN)
of the view that this operation used to perform the search.
$sel:httpStatus:SearchResponse'
, searchResponse_httpStatus
- The response's http status code.
Response Lenses
searchResponse_count :: Lens' SearchResponse (Maybe ResourceCount) Source #
The number of resources that match the query.
searchResponse_nextToken :: Lens' SearchResponse (Maybe Text) Source #
If present, indicates that more output is available than is included in
the current response. Use this value in the NextToken
request
parameter in a subsequent call to the operation to get the next part of
the output. You should repeat this until the NextToken
response
element comes back as null
.
searchResponse_resources :: Lens' SearchResponse (Maybe [Resource]) Source #
The list of structures that describe the resources that match the query.
searchResponse_viewArn :: Lens' SearchResponse (Maybe Text) Source #
The Amazon resource name (ARN) of the view that this operation used to perform the search.
searchResponse_httpStatus :: Lens' SearchResponse Int Source #
The response's http status code.