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 |
Adds one or more tags to the specified Amazon Lightsail resource. Each resource can have a maximum of 50 tags. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see the Amazon Lightsail Developer Guide.
The tag resource
operation supports tag-based access control via
request tags and resource tags applied to the resource identified by
resource name
. For more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data TagResource = TagResource' {
- resourceArn :: Maybe Text
- resourceName :: Text
- tags :: [Tag]
- newTagResource :: Text -> TagResource
- tagResource_resourceArn :: Lens' TagResource (Maybe Text)
- tagResource_resourceName :: Lens' TagResource Text
- tagResource_tags :: Lens' TagResource [Tag]
- data TagResourceResponse = TagResourceResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newTagResourceResponse :: Int -> TagResourceResponse
- tagResourceResponse_operations :: Lens' TagResourceResponse (Maybe [Operation])
- tagResourceResponse_httpStatus :: Lens' TagResourceResponse Int
Creating a Request
data TagResource Source #
See: newTagResource
smart constructor.
TagResource' | |
|
Instances
Create a value of TagResource
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:resourceArn:TagResource'
, tagResource_resourceArn
- The Amazon Resource Name (ARN) of the resource to which you want to add
a tag.
$sel:resourceName:TagResource'
, tagResource_resourceName
- The name of the resource to which you are adding tags.
$sel:tags:TagResource'
, tagResource_tags
- The tag key and optional value.
Request Lenses
tagResource_resourceArn :: Lens' TagResource (Maybe Text) Source #
The Amazon Resource Name (ARN) of the resource to which you want to add a tag.
tagResource_resourceName :: Lens' TagResource Text Source #
The name of the resource to which you are adding tags.
tagResource_tags :: Lens' TagResource [Tag] Source #
The tag key and optional value.
Destructuring the Response
data TagResourceResponse Source #
See: newTagResourceResponse
smart constructor.
TagResourceResponse' | |
|
Instances
newTagResourceResponse Source #
Create a value of TagResourceResponse
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:operations:TagResourceResponse'
, tagResourceResponse_operations
- An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:httpStatus:TagResourceResponse'
, tagResourceResponse_httpStatus
- The response's http status code.
Response Lenses
tagResourceResponse_operations :: Lens' TagResourceResponse (Maybe [Operation]) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
tagResourceResponse_httpStatus :: Lens' TagResourceResponse Int Source #
The response's http status code.