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 |
Resource Groups Tagging API
This guide describes the API operations for the resource groups tagging.
A tag is a label that you assign to an AWS resource. A tag consists of a key and a value, both of which you define. For example, if you have two Amazon EC2 instances, you might assign both a tag key of "Stack." But the value of Stack might be Testing for one and Production for the other.
Tagging can help you organize your resources and enables you to simplify resource management, access management and cost allocation. For more information about tagging, see Working with Tag Editor and Working with Resource Groups . For more information about permissions you need to use the resource groups tagging APIs, see Obtaining Permissions for Resource Groups and Obtaining Permissions for Tagging .
You can use the resource groups tagging APIs to complete the following tasks:
- Tag and untag supported resources located in the specified region for the AWS account
- Use tag-based filters to search for resources located in the specified region for the AWS account
- List all existing tag keys in the specified region for the AWS account
- List all existing values for the specified key in the specified region for the AWS account
Not all resources can have tags. For a lists of resources that you can tag, see Supported Resources in the AWS Resource Groups and Tag Editor User Guide .
To make full use of the resource groups tagging APIs, you might need additional IAM permissions, including permission to access the resources of individual services as well as permission to view and apply tags to those resources. For more information, see Obtaining Permissions for Tagging in the AWS Resource Groups and Tag Editor User Guide .
- resourceGroupsTagging :: Service
- _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
- _ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError
- _PaginationTokenExpiredException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.ResourceGroupsTagging.GetTagKeys
- module Network.AWS.ResourceGroupsTagging.TagResources
- module Network.AWS.ResourceGroupsTagging.GetTagValues
- module Network.AWS.ResourceGroupsTagging.GetResources
- module Network.AWS.ResourceGroupsTagging.UntagResources
- data ResourceErrorCode
- data FailureInfo
- failureInfo :: FailureInfo
- fiErrorCode :: Lens' FailureInfo (Maybe ResourceErrorCode)
- fiErrorMessage :: Lens' FailureInfo (Maybe Text)
- fiStatusCode :: Lens' FailureInfo (Maybe Int)
- data ResourceTagMapping
- resourceTagMapping :: ResourceTagMapping
- rtmResourceARN :: Lens' ResourceTagMapping (Maybe Text)
- rtmTags :: Lens' ResourceTagMapping [Tag]
- data Tag
- tag :: Text -> Text -> Tag
- tagKey :: Lens' Tag Text
- tagValue :: Lens' Tag Text
- data TagFilter
- tagFilter :: TagFilter
- tfValues :: Lens' TagFilter [Text]
- tfKey :: Lens' TagFilter (Maybe Text)
Service Configuration
resourceGroupsTagging :: Service Source #
API version 2017-01-26
of the Amazon Resource Groups Tagging API 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 ResourceGroupsTagging
.
InvalidParameterException
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.
ThrottledException
_ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request was denied to limit the frequency of submitted requests.
PaginationTokenExpiredException
_PaginationTokenExpiredException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A PaginationToken
is valid for a maximum of 15 minutes. Your request was denied because the specified PaginationToken
has expired.
InternalServiceException
_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The request processing failed because of an unknown error, exception, or failure. You can retry the request.
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.
GetTagKeys (Paginated)
TagResources
GetTagValues (Paginated)
GetResources (Paginated)
UntagResources
Types
ResourceErrorCode
data ResourceErrorCode Source #
FailureInfo
data FailureInfo Source #
Details of the common errors that all actions return.
See: failureInfo
smart constructor.
failureInfo :: FailureInfo Source #
Creates a value of FailureInfo
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fiErrorCode
- The code of the common error. Valid values includeInternalServiceException
,InvalidParameterException
, and any valid error code returned by the AWS service that hosts the resource that you want to tag.fiErrorMessage
- The message of the common error.fiStatusCode
- The HTTP status code of the common error.
fiErrorCode :: Lens' FailureInfo (Maybe ResourceErrorCode) Source #
The code of the common error. Valid values include InternalServiceException
, InvalidParameterException
, and any valid error code returned by the AWS service that hosts the resource that you want to tag.
fiErrorMessage :: Lens' FailureInfo (Maybe Text) Source #
The message of the common error.
fiStatusCode :: Lens' FailureInfo (Maybe Int) Source #
The HTTP status code of the common error.
ResourceTagMapping
data ResourceTagMapping Source #
A list of resource ARNs and the tags (keys and values) that are associated with each.
See: resourceTagMapping
smart constructor.
resourceTagMapping :: ResourceTagMapping Source #
Creates a value of ResourceTagMapping
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rtmResourceARN
- An array of resource ARN(s).rtmTags
- The tags that have been applied to one or more AWS resources.
rtmResourceARN :: Lens' ResourceTagMapping (Maybe Text) Source #
An array of resource ARN(s).
rtmTags :: Lens' ResourceTagMapping [Tag] Source #
The tags that have been applied to one or more AWS resources.
Tag
The metadata that you apply to AWS resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see Tag Basics in the Amazon EC2 User Guide for Linux Instances .
See: tag
smart constructor.
Creates a value of Tag
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tagKey :: Lens' Tag Text Source #
One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.
tagValue :: Lens' Tag Text Source #
The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).
TagFilter
A list of tags (keys and values) that are used to specify the associated resources.
See: tagFilter
smart constructor.
tagFilter :: TagFilter Source #
Creates a value of TagFilter
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired: