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 |
Applies one or more tags to the specified resources. Note the following:
- Not all resources can have tags. For a list of resources that support tagging, see Supported Resources in the AWS Resource Groups and Tag Editor User Guide .
- Each resource can have up to 50 tags. For other limits, see Tag Restrictions in the Amazon EC2 User Guide for Linux Instances .
- You can only tag resources that are located in the specified region for the AWS account.
- To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see Obtaining Permissions for Tagging in the AWS Resource Groups and Tag Editor User Guide .
- tagResources :: NonEmpty Text -> TagResources
- data TagResources
- trResourceARNList :: Lens' TagResources (NonEmpty Text)
- trTags :: Lens' TagResources (HashMap Text Text)
- tagResourcesResponse :: Int -> TagResourcesResponse
- data TagResourcesResponse
- trrsFailedResourcesMap :: Lens' TagResourcesResponse (HashMap Text FailureInfo)
- trrsResponseStatus :: Lens' TagResourcesResponse Int
Creating a Request
Creates a value of TagResources
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
trResourceARNList
- A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to tag. An ARN can be set to a maximum of 1600 characters. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .trTags
- The tags that you want to add to the specified resources. A tag consists of a key and a value that you define.
data TagResources Source #
See: tagResources
smart constructor.
Request Lenses
trResourceARNList :: Lens' TagResources (NonEmpty Text) Source #
A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to tag. An ARN can be set to a maximum of 1600 characters. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
trTags :: Lens' TagResources (HashMap Text Text) Source #
The tags that you want to add to the specified resources. A tag consists of a key and a value that you define.
Destructuring the Response
Creates a value of TagResourcesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
trrsFailedResourcesMap
- Details of resources that could not be tagged. An error code, status code, and error message are returned for each failed item.trrsResponseStatus
- -- | The response status code.
data TagResourcesResponse Source #
See: tagResourcesResponse
smart constructor.
Response Lenses
trrsFailedResourcesMap :: Lens' TagResourcesResponse (HashMap Text FailureInfo) Source #
Details of resources that could not be tagged. An error code, status code, and error message are returned for each failed item.
trrsResponseStatus :: Lens' TagResourcesResponse Int Source #
- - | The response status code.