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

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

  • group' :: Maybe Text

    The name or the ARN of the resource group

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

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

Instances

Instances details
ToJSON ListGroupResources Source # 
Instance details

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

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 #

Generic ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Associated Types

type Rep ListGroupResources :: Type -> Type #

Read ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Show ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

NFData ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Methods

rnf :: ListGroupResources -> () #

Eq ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Hashable ListGroupResources Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

type AWSResponse 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" "amazonka-resourcegroups-2.0-B1PbpVYkdAmDCiu1dJFqfU" 'False) (C1 ('MetaCons "ListGroupResources'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ResourceFilter])) :*: S1 ('MetaSel ('Just "group'") '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)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))

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

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.

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.

Request Lenses

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_group :: Lens' ListGroupResources (Maybe Text) Source #

The name or the ARN of the resource group

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.

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.

Destructuring the Response

data ListGroupResourcesResponse Source #

See: newListGroupResourcesResponse smart constructor.

Constructors

ListGroupResourcesResponse' 

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]

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

  • resources :: Maybe [ListGroupResourcesItem]

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Associated Types

type Rep ListGroupResourcesResponse :: Type -> Type #

Read ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Show ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

NFData ListGroupResourcesResponse Source # 
Instance details

Defined in Amazonka.ResourceGroups.ListGroupResources

Eq 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" "amazonka-resourcegroups-2.0-B1PbpVYkdAmDCiu1dJFqfU" 'False) (C1 ('MetaCons "ListGroupResourcesResponse'" '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 "resources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ListGroupResourcesItem])) :*: 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:

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

$sel:resources:ListGroupResourcesResponse', listGroupResourcesResponse_resources - An array of resources from which you can determine each resource's identity, type, and group membership status.

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

Response Lenses

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

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

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.