amazonka-resourcegroups-2.0: Amazon Resource Groups 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.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

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

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

  • resourceQuery :: ResourceQuery

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

Instances

Instances details
ToJSON SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.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

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 #

Generic SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Associated Types

type Rep SearchResources :: Type -> Type #

Read SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Show SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

NFData SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Methods

rnf :: SearchResources -> () #

Eq SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Hashable SearchResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type AWSResponse 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" "amazonka-resourcegroups-2.0-B1PbpVYkdAmDCiu1dJFqfU" 'False) (C1 ('MetaCons "SearchResources'" '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 "resourceQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ResourceQuery))))

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

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.

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_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_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_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

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

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

  • 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
Generic SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Associated Types

type Rep SearchResourcesResponse :: Type -> Type #

Read SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Show SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

NFData SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

Methods

rnf :: SearchResourcesResponse -> () #

Eq SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type Rep SearchResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.SearchResources

type Rep SearchResourcesResponse = D1 ('MetaData "SearchResourcesResponse" "Amazonka.ResourceGroups.SearchResources" "amazonka-resourcegroups-2.0-B1PbpVYkdAmDCiu1dJFqfU" 'False) (C1 ('MetaCons "SearchResourcesResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "queryErrors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [QueryError]))) :*: (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:

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: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: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_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_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_resourceIdentifiers :: Lens' SearchResourcesResponse (Maybe [ResourceIdentifier]) Source #

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