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 |
Amazonka.Organizations.ListTagsForResource
Description
Lists tags that are attached to the specified resource.
You can attach tags to the following resources in AWS Organizations.
- AWS account
- Organization root
- Organizational unit (OU)
- Policy (any type)
This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an AWS service.
This operation returns paginated results.
Synopsis
- data ListTagsForResource = ListTagsForResource' {
- nextToken :: Maybe Text
- resourceId :: Text
- newListTagsForResource :: Text -> ListTagsForResource
- listTagsForResource_nextToken :: Lens' ListTagsForResource (Maybe Text)
- listTagsForResource_resourceId :: Lens' ListTagsForResource Text
- data ListTagsForResourceResponse = ListTagsForResourceResponse' {}
- newListTagsForResourceResponse :: Int -> ListTagsForResourceResponse
- listTagsForResourceResponse_nextToken :: Lens' ListTagsForResourceResponse (Maybe Text)
- listTagsForResourceResponse_tags :: Lens' ListTagsForResourceResponse (Maybe [Tag])
- listTagsForResourceResponse_httpStatus :: Lens' ListTagsForResourceResponse Int
Creating a Request
data ListTagsForResource Source #
See: newListTagsForResource
smart constructor.
Constructors
ListTagsForResource' | |
Fields
|
Instances
newListTagsForResource Source #
Arguments
:: Text | |
-> ListTagsForResource |
Create a value of ListTagsForResource
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:nextToken:ListTagsForResource'
, listTagsForResource_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
of the previous call's NextToken
response to indicate where the
output should continue from.
$sel:resourceId:ListTagsForResource'
, listTagsForResource_resourceId
- The ID of the resource with the tags to list.
You can specify any of the following taggable resources.
- AWS account – specify the account ID number.
- Organizational unit – specify the OU ID that begins with
ou-
and looks similar to:ou-1a2b-34uvwxyz
- Root – specify the root ID that begins with
r-
and looks similar to:r-1a2b
- Policy – specify the policy ID that begins with
p-
andlooks similar to:p-12abcdefg3
Request Lenses
listTagsForResource_nextToken :: Lens' ListTagsForResource (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
of the previous call's NextToken
response to indicate where the
output should continue from.
listTagsForResource_resourceId :: Lens' ListTagsForResource Text Source #
The ID of the resource with the tags to list.
You can specify any of the following taggable resources.
- AWS account – specify the account ID number.
- Organizational unit – specify the OU ID that begins with
ou-
and looks similar to:ou-1a2b-34uvwxyz
- Root – specify the root ID that begins with
r-
and looks similar to:r-1a2b
- Policy – specify the policy ID that begins with
p-
andlooks similar to:p-12abcdefg3
Destructuring the Response
data ListTagsForResourceResponse Source #
See: newListTagsForResourceResponse
smart constructor.
Constructors
ListTagsForResourceResponse' | |
Fields
|
Instances
newListTagsForResourceResponse Source #
Create a value of ListTagsForResourceResponse
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:nextToken:ListTagsForResource'
, listTagsForResourceResponse_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:tags:ListTagsForResourceResponse'
, listTagsForResourceResponse_tags
- The tags that are assigned to the resource.
$sel:httpStatus:ListTagsForResourceResponse'
, listTagsForResourceResponse_httpStatus
- The response's http status code.
Response Lenses
listTagsForResourceResponse_nextToken :: Lens' ListTagsForResourceResponse (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
.
listTagsForResourceResponse_tags :: Lens' ListTagsForResourceResponse (Maybe [Tag]) Source #
The tags that are assigned to the resource.
listTagsForResourceResponse_httpStatus :: Lens' ListTagsForResourceResponse Int Source #
The response's http status code.