amazonka-resource-explorer-v2-2.0: Amazon Resource Explorer SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.ResourceExplorer2.Search

Description

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

Creating a Request

data Search Source #

See: newSearch smart constructor.

Constructors

Search' 

Fields

  • maxResults :: Maybe Natural

    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.

  • nextToken :: Maybe Text

    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.

  • viewArn :: Maybe Text

    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.

  • queryString :: Sensitive Text

    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.

Instances

Instances details
ToJSON Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

ToHeaders Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

toHeaders :: Search -> [Header] #

ToPath Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

toPath :: Search -> ByteString #

ToQuery Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

AWSPager Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

AWSRequest Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Associated Types

type AWSResponse Search #

Generic Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Associated Types

type Rep Search :: Type -> Type #

Methods

from :: Search -> Rep Search x #

to :: Rep Search x -> Search #

Show Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

NFData Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

rnf :: Search -> () #

Eq Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

(==) :: Search -> Search -> Bool #

(/=) :: Search -> Search -> Bool #

Hashable Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

hashWithSalt :: Int -> Search -> Int #

hash :: Search -> Int #

type AWSResponse Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

type Rep Search Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

type Rep Search = D1 ('MetaData "Search" "Amazonka.ResourceExplorer2.Search" "amazonka-resource-explorer-v2-2.0-DYDynTzMYCcKX3QLWjH6Yt" 'False) (C1 ('MetaCons "Search'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "viewArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Text)))))

newSearch Source #

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.

Constructors

SearchResponse' 

Fields

  • count :: Maybe ResourceCount

    The number of resources that match the query.

  • nextToken :: Maybe Text

    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.

  • resources :: Maybe [Resource]

    The list of structures that describe the resources that match the query.

  • viewArn :: Maybe Text

    The Amazon resource name (ARN) of the view that this operation used to perform the search.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Associated Types

type Rep SearchResponse :: Type -> Type #

Read SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Show SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

NFData SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

Methods

rnf :: SearchResponse -> () #

Eq SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

type Rep SearchResponse Source # 
Instance details

Defined in Amazonka.ResourceExplorer2.Search

type Rep SearchResponse = D1 ('MetaData "SearchResponse" "Amazonka.ResourceExplorer2.Search" "amazonka-resource-explorer-v2-2.0-DYDynTzMYCcKX3QLWjH6Yt" 'False) (C1 ('MetaCons "SearchResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "count") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourceCount)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "resources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Resource])) :*: (S1 ('MetaSel ('Just "viewArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newSearchResponse Source #

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.