| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- data ListGroupResources = ListGroupResources' {}
- newListGroupResources :: ListGroupResources
- listGroupResources_filters :: Lens' ListGroupResources (Maybe [ResourceFilter])
- listGroupResources_group :: Lens' ListGroupResources (Maybe Text)
- listGroupResources_groupName :: Lens' ListGroupResources (Maybe Text)
- listGroupResources_maxResults :: Lens' ListGroupResources (Maybe Natural)
- listGroupResources_nextToken :: Lens' ListGroupResources (Maybe Text)
- data ListGroupResourcesResponse = ListGroupResourcesResponse' {}
- newListGroupResourcesResponse :: Int -> ListGroupResourcesResponse
- listGroupResourcesResponse_nextToken :: Lens' ListGroupResourcesResponse (Maybe Text)
- listGroupResourcesResponse_queryErrors :: Lens' ListGroupResourcesResponse (Maybe [QueryError])
- listGroupResourcesResponse_resourceIdentifiers :: Lens' ListGroupResourcesResponse (Maybe [ResourceIdentifier])
- listGroupResourcesResponse_resources :: Lens' ListGroupResourcesResponse (Maybe [ListGroupResourcesItem])
- listGroupResourcesResponse_httpStatus :: Lens' ListGroupResourcesResponse Int
Creating a Request
data ListGroupResources Source #
See: newListGroupResources smart constructor.
Constructors
| ListGroupResources' | |
Fields
| |
Instances
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 formatAWS::ServiceCode::ResourceType. For example,AWS::EC2::Instance, orAWS::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 formatAWS::ServiceCode::ResourceType. For example,AWS::EC2::Instance, orAWS::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
| |
Instances
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.
listGroupResourcesResponse_httpStatus :: Lens' ListGroupResourcesResponse Int Source #
The response's http status code.