Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
AWS Resource Groups
AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, Amazon Relational Database Service databases, and Amazon S3 buckets into groups using criteria that you define as tags. A resource group is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags. You can create a group of resources based on their roles in your cloud infrastructure, lifecycle stages, regions, application layers, or virtually any criteria. Resource groups enable you to automate management tasks, such as those in AWS Systems Manager Automation documents, on tag-related resources in AWS Systems Manager. Groups of tagged resources also let you quickly view a custom console in AWS Systems Manager that shows AWS Config compliance and other monitoring data about member resources.
To create a resource group, build a resource query, and specify tags that identify the criteria that members of the group have in common. Tags are key-value pairs.
For more information about Resource Groups, see the AWS Resource Groups User Guide .
AWS Resource Groups uses a REST-compliant API that you can use to perform the following types of operations.
- Create, Read, Update, and Delete (CRUD) operations on resource groups and resource query entities
- Applying, editing, and removing tags from resource groups
- Resolving resource group member ARNs so they can be returned as search results
- Getting data about resources that are members of a group
- Searching AWS resources based on a resource query
- resourceGroups :: Service
- _ForbiddenException :: AsError a => Getting (First ServiceError) a ServiceError
- _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServerErrorException :: AsError a => Getting (First ServiceError) a ServiceError
- _MethodNotAllowedException :: AsError a => Getting (First ServiceError) a ServiceError
- _UnauthorizedException :: AsError a => Getting (First ServiceError) a ServiceError
- _BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.ResourceGroups.SearchResources
- module Network.AWS.ResourceGroups.GetTags
- module Network.AWS.ResourceGroups.Tag
- module Network.AWS.ResourceGroups.Untag
- module Network.AWS.ResourceGroups.UpdateGroupQuery
- module Network.AWS.ResourceGroups.ListGroupResources
- module Network.AWS.ResourceGroups.GetGroupQuery
- module Network.AWS.ResourceGroups.CreateGroup
- module Network.AWS.ResourceGroups.DeleteGroup
- module Network.AWS.ResourceGroups.UpdateGroup
- module Network.AWS.ResourceGroups.ListGroups
- module Network.AWS.ResourceGroups.GetGroup
- data QueryType = TagFilters10
- data Group
- group' :: Text -> Text -> Group
- gDescription :: Lens' Group (Maybe Text)
- gGroupARN :: Lens' Group Text
- gName :: Lens' Group Text
- data GroupQuery
- groupQuery :: Text -> ResourceQuery -> GroupQuery
- gqGroupName :: Lens' GroupQuery Text
- gqResourceQuery :: Lens' GroupQuery ResourceQuery
- data ResourceIdentifier
- resourceIdentifier :: ResourceIdentifier
- riResourceType :: Lens' ResourceIdentifier (Maybe Text)
- riResourceARN :: Lens' ResourceIdentifier (Maybe Text)
- data ResourceQuery
- resourceQuery :: QueryType -> Text -> ResourceQuery
- rqType :: Lens' ResourceQuery QueryType
- rqSearchQuery :: Lens' ResourceQuery Text
Service Configuration
resourceGroups :: Service Source #
API version 2017-11-27
of the Amazon Resource Groups SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by ResourceGroups
.
ForbiddenException
_ForbiddenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The caller is not authorized to make the request.
NotFoundException
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
One or more resources specified in the request do not exist.
TooManyRequestsException
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The caller has exceeded throttling limits.
InternalServerErrorException
_InternalServerErrorException :: AsError a => Getting (First ServiceError) a ServiceError Source #
An internal error occurred while processing the request.
MethodNotAllowedException
_MethodNotAllowedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request uses an HTTP method which is not allowed for the specified resource.
UnauthorizedException
_UnauthorizedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request has not been applied because it lacks valid authentication credentials for the target resource.
BadRequestException
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request does not comply with validation rules that are defined for the request parameters.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
SearchResources (Paginated)
GetTags
Tag
Untag
UpdateGroupQuery
ListGroupResources (Paginated)
GetGroupQuery
CreateGroup
DeleteGroup
UpdateGroup
ListGroups (Paginated)
GetGroup
Types
QueryType
Group
A resource group.
See: group'
smart constructor.
Creates a value of Group
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gDescription
- The description of the resource group.gGroupARN
- The ARN of a resource group.gName
- The name of a resource group.
GroupQuery
data GroupQuery Source #
The underlying resource query of a resource group. Resources that match query results are part of the group.
See: groupQuery
smart constructor.
Creates a value of GroupQuery
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gqGroupName
- The name of a resource group that is associated with a specific resource query.gqResourceQuery
- The resource query which determines which AWS resources are members of the associated resource group.
gqGroupName :: Lens' GroupQuery Text Source #
The name of a resource group that is associated with a specific resource query.
gqResourceQuery :: Lens' GroupQuery ResourceQuery Source #
The resource query which determines which AWS resources are members of the associated resource group.
ResourceIdentifier
data ResourceIdentifier Source #
The ARN of a resource, and its resource type.
See: resourceIdentifier
smart constructor.
resourceIdentifier :: ResourceIdentifier Source #
Creates a value of ResourceIdentifier
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
riResourceType
- The resource type of a resource, such asAWS::EC2::Instance
.riResourceARN
- The ARN of a resource.
riResourceType :: Lens' ResourceIdentifier (Maybe Text) Source #
The resource type of a resource, such as AWS::EC2::Instance
.
riResourceARN :: Lens' ResourceIdentifier (Maybe Text) Source #
The ARN of a resource.
ResourceQuery
data ResourceQuery Source #
The query that is used to define a resource group or a search for resources.
See: resourceQuery
smart constructor.
Creates a value of ResourceQuery
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rqType
- The type of the query. The valid value in this release isTAG_FILTERS_1_0
.TAG_FILTERS_1_0:
A JSON syntax that lets you specify a collection of simple tag filters for resource types and tags, as supported by the AWS Tagging API GetResources operation. When more than one element is present, only resources that match all filters are part of the result. If a filter specifies more than one value for a key, a resource matches the filter if its tag value matches any of the specified values.rqSearchQuery
- The query that defines a group or a search.
rqType :: Lens' ResourceQuery QueryType Source #
The type of the query. The valid value in this release is TAG_FILTERS_1_0
. TAG_FILTERS_1_0:
A JSON syntax that lets you specify a collection of simple tag filters for resource types and tags, as supported by the AWS Tagging API GetResources operation. When more than one element is present, only resources that match all filters are part of the result. If a filter specifies more than one value for a key, a resource matches the filter if its tag value matches any of the specified values.
rqSearchQuery :: Lens' ResourceQuery Text Source #
The query that defines a group or a search.