Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Returns a list of existing resource groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
resource-groups:ListGroups
This operation returns paginated results.
Synopsis
- data ListGroups = ListGroups' {
- filters :: Maybe [GroupFilter]
- nextToken :: Maybe Text
- maxResults :: Maybe Natural
- newListGroups :: ListGroups
- listGroups_filters :: Lens' ListGroups (Maybe [GroupFilter])
- listGroups_nextToken :: Lens' ListGroups (Maybe Text)
- listGroups_maxResults :: Lens' ListGroups (Maybe Natural)
- data ListGroupsResponse = ListGroupsResponse' {
- groups :: Maybe [Group]
- nextToken :: Maybe Text
- groupIdentifiers :: Maybe [GroupIdentifier]
- httpStatus :: Int
- newListGroupsResponse :: Int -> ListGroupsResponse
- listGroupsResponse_groups :: Lens' ListGroupsResponse (Maybe [Group])
- listGroupsResponse_nextToken :: Lens' ListGroupsResponse (Maybe Text)
- listGroupsResponse_groupIdentifiers :: Lens' ListGroupsResponse (Maybe [GroupIdentifier])
- listGroupsResponse_httpStatus :: Lens' ListGroupsResponse Int
Creating a Request
data ListGroups Source #
See: newListGroups
smart constructor.
ListGroups' | |
|
Instances
newListGroups :: ListGroups Source #
Create a value of ListGroups
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:ListGroups'
, listGroups_filters
- Filters, formatted as GroupFilter objects, that you want to apply to a
ListGroups
operation.
resource-type
- Filter the results to include only those of the specified resource types. Specify up to five resource types in the formatAWS::ServiceCode::ResourceType
. For example,AWS::EC2::Instance
, orAWS::S3::Bucket
.configuration-type
- Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:AWS:EC2::CapacityReservationPool
AWS:EC2::HostManagement
$sel:nextToken:ListGroups'
, listGroups_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:ListGroups'
, listGroups_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
listGroups_filters :: Lens' ListGroups (Maybe [GroupFilter]) Source #
Filters, formatted as GroupFilter objects, that you want to apply to a
ListGroups
operation.
resource-type
- Filter the results to include only those of the specified resource types. Specify up to five resource types in the formatAWS::ServiceCode::ResourceType
. For example,AWS::EC2::Instance
, orAWS::S3::Bucket
.configuration-type
- Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:AWS:EC2::CapacityReservationPool
AWS:EC2::HostManagement
listGroups_nextToken :: Lens' ListGroups (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.
listGroups_maxResults :: Lens' ListGroups (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 ListGroupsResponse Source #
See: newListGroupsResponse
smart constructor.
ListGroupsResponse' | |
|
Instances
newListGroupsResponse Source #
Create a value of ListGroupsResponse
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:groups:ListGroupsResponse'
, listGroupsResponse_groups
- /__Deprecated - don't use this field. Use the GroupIdentifiers
response field instead.__/
$sel:nextToken:ListGroups'
, listGroupsResponse_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:groupIdentifiers:ListGroupsResponse'
, listGroupsResponse_groupIdentifiers
- A list of GroupIdentifier objects. Each identifier is an object that
contains both the Name
and the GroupArn
.
$sel:httpStatus:ListGroupsResponse'
, listGroupsResponse_httpStatus
- The response's http status code.
Response Lenses
listGroupsResponse_groups :: Lens' ListGroupsResponse (Maybe [Group]) Source #
/__Deprecated - don't use this field. Use the GroupIdentifiers
response field instead.__/
listGroupsResponse_nextToken :: Lens' ListGroupsResponse (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
.
listGroupsResponse_groupIdentifiers :: Lens' ListGroupsResponse (Maybe [GroupIdentifier]) Source #
A list of GroupIdentifier objects. Each identifier is an object that
contains both the Name
and the GroupArn
.
listGroupsResponse_httpStatus :: Lens' ListGroupsResponse Int Source #
The response's http status code.