libZSservicesZSamazonka-resourcegroupsZSamazonka-resourcegroups
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ResourceGroups.SearchResources

Description

Returns a list of AWS resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:SearchResources
  • cloudformation:DescribeStacks
  • cloudformation:ListStackResources
  • tag:GetResources

This operation returns paginated results.

Synopsis

Creating a Request

data SearchResources Source #

See: newSearchResources smart constructor.

Constructors

SearchResources' 

Fields

  • 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 provided by a previous call's NextToken response to indicate where the output should continue from.

  • maxResults :: Maybe Natural

    The total 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 that is specific to the operation. If additional items exist beyond the maximum you specify, 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. Note that the service might 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.

  • resourceQuery :: ResourceQuery

    The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.

Instances

Instances details
Eq SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Read SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Show SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Generic SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Associated Types

type Rep SearchResources :: Type -> Type #

NFData SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Methods

rnf :: SearchResources -> () #

Hashable SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

ToJSON SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

AWSPager SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

AWSRequest SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Associated Types

type AWSResponse SearchResources #

ToHeaders SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

ToPath SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

ToQuery SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type Rep SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type Rep SearchResources = D1 ('MetaData "SearchResources" "Amazonka.ResourceGroups.SearchResources" "libZSservicesZSamazonka-resourcegroupsZSamazonka-resourcegroups" 'False) (C1 ('MetaCons "SearchResources'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "resourceQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ResourceQuery))))
type AWSResponse SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

newSearchResources Source #

Create a value of SearchResources 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:nextToken:SearchResources', searchResources_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 provided by a previous call's NextToken response to indicate where the output should continue from.

$sel:maxResults:SearchResources', searchResources_maxResults - The total 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 that is specific to the operation. If additional items exist beyond the maximum you specify, 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. Note that the service might 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.

$sel:resourceQuery:SearchResources', searchResources_resourceQuery - The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.

Request Lenses

searchResources_nextToken :: Lens' SearchResources (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 provided by a previous call's NextToken response to indicate where the output should continue from.

searchResources_maxResults :: Lens' SearchResources (Maybe Natural) Source #

The total 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 that is specific to the operation. If additional items exist beyond the maximum you specify, 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. Note that the service might 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.

searchResources_resourceQuery :: Lens' SearchResources ResourceQuery Source #

The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.

Destructuring the Response

data SearchResourcesResponse Source #

See: newSearchResourcesResponse smart constructor.

Constructors

SearchResourcesResponse' 

Fields

  • queryErrors :: Maybe [QueryError]

    A list of QueryError objects. Each error is an object that contains ErrorCode and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

  • 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.

  • resourceIdentifiers :: Maybe [ResourceIdentifier]

    The ARNs and resource types of resources that are members of the group that you specified.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Read SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Show SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Generic SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Associated Types

type Rep SearchResourcesResponse :: Type -> Type #

NFData SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Methods

rnf :: SearchResourcesResponse -> () #

type Rep SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type Rep SearchResourcesResponse = D1 ('MetaData "SearchResourcesResponse" "Amazonka.ResourceGroups.SearchResources" "libZSservicesZSamazonka-resourcegroupsZSamazonka-resourcegroups" 'False) (C1 ('MetaCons "SearchResourcesResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "queryErrors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [QueryError])) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "resourceIdentifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ResourceIdentifier])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newSearchResourcesResponse Source #

Create a value of SearchResourcesResponse 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:queryErrors:SearchResourcesResponse', searchResourcesResponse_queryErrors - A list of QueryError objects. Each error is an object that contains ErrorCode and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

$sel:nextToken:SearchResources', searchResourcesResponse_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:resourceIdentifiers:SearchResourcesResponse', searchResourcesResponse_resourceIdentifiers - The ARNs and resource types of resources that are members of the group that you specified.

$sel:httpStatus:SearchResourcesResponse', searchResourcesResponse_httpStatus - The response's http status code.

Response Lenses

searchResourcesResponse_queryErrors :: Lens' SearchResourcesResponse (Maybe [QueryError]) Source #

A list of QueryError objects. Each error is an object that contains ErrorCode and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

searchResourcesResponse_nextToken :: Lens' SearchResourcesResponse (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.

searchResourcesResponse_resourceIdentifiers :: Lens' SearchResourcesResponse (Maybe [ResourceIdentifier]) Source #

The ARNs and resource types of resources that are members of the group that you specified.