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

Description

Returns a list of ARNs of the resources that are members of a specified resource group.

Minimum permissions

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

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

This operation returns paginated results.

Synopsis

Creating a Request

data ListGroupResources Source #

See: newListGroupResources smart constructor.

Constructors

ListGroupResources' 

Fields

  • group' :: Maybe Text

    The name or the ARN of the resource group

  • filters :: Maybe [ResourceFilter]

    Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation. Filters the results to include only those of the specified resource types.

    • resource-type - Filter resources by their type. Specify up to five resource types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.

    When you specify a resource-type filter for ListGroupResources, AWS Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your resource-type filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a ListGroupResources request returns a BadRequestException error with a message similar to the following:

    The resource types specified as filters in the request are not valid.

    The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies AWS::AllSupported, because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or AWS CloudFormation stack-based queries).

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

  • groupName :: Maybe Text

    /__Deprecated - don't use this parameter. Use the Group request field instead.__/

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

Instances

Instances details
Eq ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Read ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Show ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Generic ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Associated Types

type Rep ListGroupResources :: Type -> Type #

NFData ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Methods

rnf :: ListGroupResources -> () #

Hashable ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

ToJSON ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

AWSPager ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

AWSRequest ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Associated Types

type AWSResponse ListGroupResources #

ToHeaders ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

ToPath ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

ToQuery ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

type Rep ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

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

Defined in Amazonka.ResourceGroups.ListGroupResources

newListGroupResources :: ListGroupResources Source #

Create a value of ListGroupResources 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:group':ListGroupResources', listGroupResources_group - The name or the ARN of the resource group

$sel:filters:ListGroupResources', listGroupResources_filters - Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation. Filters the results to include only those of the specified resource types.

  • resource-type - Filter resources by their type. Specify up to five resource types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.

When you specify a resource-type filter for ListGroupResources, AWS Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your resource-type filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a ListGroupResources request returns a BadRequestException error with a message similar to the following:

The resource types specified as filters in the request are not valid.

The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies AWS::AllSupported, because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or AWS CloudFormation stack-based queries).

$sel:nextToken:ListGroupResources', listGroupResources_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:groupName:ListGroupResources', listGroupResources_groupName - /__Deprecated - don't use this parameter. Use the Group request field instead.__/

$sel:maxResults:ListGroupResources', listGroupResources_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.

Request Lenses

listGroupResources_group :: Lens' ListGroupResources (Maybe Text) Source #

The name or the ARN of the resource group

listGroupResources_filters :: Lens' ListGroupResources (Maybe [ResourceFilter]) Source #

Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation. Filters the results to include only those of the specified resource types.

  • resource-type - Filter resources by their type. Specify up to five resource types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.

When you specify a resource-type filter for ListGroupResources, AWS Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your resource-type filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a ListGroupResources request returns a BadRequestException error with a message similar to the following:

The resource types specified as filters in the request are not valid.

The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies AWS::AllSupported, because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or AWS CloudFormation stack-based queries).

listGroupResources_nextToken :: Lens' ListGroupResources (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.

listGroupResources_groupName :: Lens' ListGroupResources (Maybe Text) Source #

/__Deprecated - don't use this parameter. Use the Group request field instead.__/

listGroupResources_maxResults :: Lens' ListGroupResources (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.

Destructuring the Response

data ListGroupResourcesResponse Source #

See: newListGroupResourcesResponse smart constructor.

Constructors

ListGroupResourcesResponse' 

Fields

  • resources :: Maybe [ListGroupResourcesItem]

    An array of resources from which you can determine each resource's identity, type, and group membership status.

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

    __/Deprecated - don't use this parameter. Use the Resources response field instead./__

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Read ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Show ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Generic ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Associated Types

type Rep ListGroupResourcesResponse :: Type -> Type #

NFData ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

type Rep ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

type Rep ListGroupResourcesResponse = D1 ('MetaData "ListGroupResourcesResponse" "Amazonka.ResourceGroups.ListGroupResources" "libZSservicesZSamazonka-resourcegroupsZSamazonka-resourcegroups" 'False) (C1 ('MetaCons "ListGroupResourcesResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ListGroupResourcesItem])) :*: 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)))))

newListGroupResourcesResponse Source #

Create a value of ListGroupResourcesResponse 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:resources:ListGroupResourcesResponse', listGroupResourcesResponse_resources - An array of resources from which you can determine each resource's identity, type, and group membership status.

$sel:queryErrors:ListGroupResourcesResponse', listGroupResourcesResponse_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:ListGroupResources', listGroupResourcesResponse_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:ListGroupResourcesResponse', listGroupResourcesResponse_resourceIdentifiers - __/Deprecated - don't use this parameter. Use the Resources response field instead./__

$sel:httpStatus:ListGroupResourcesResponse', listGroupResourcesResponse_httpStatus - The response's http status code.

Response Lenses

listGroupResourcesResponse_resources :: Lens' ListGroupResourcesResponse (Maybe [ListGroupResourcesItem]) Source #

An array of resources from which you can determine each resource's identity, type, and group membership status.

listGroupResourcesResponse_queryErrors :: Lens' ListGroupResourcesResponse (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.

listGroupResourcesResponse_nextToken :: Lens' ListGroupResourcesResponse (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.

listGroupResourcesResponse_resourceIdentifiers :: Lens' ListGroupResourcesResponse (Maybe [ResourceIdentifier]) Source #

__/Deprecated - don't use this parameter. Use the Resources response field instead./__