Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Adds one or more tags to the specified resource.
Currently, you can attach tags to the following resources in Organizations.
- Amazon Web Services account
- Organization root
- Organizational unit (OU)
- Policy (any type)
This operation can be called only from the organization's management account.
Synopsis
- data TagResource = TagResource' {
- resourceId :: Text
- tags :: [Tag]
- newTagResource :: Text -> TagResource
- tagResource_resourceId :: Lens' TagResource Text
- tagResource_tags :: Lens' TagResource [Tag]
- data TagResourceResponse = TagResourceResponse' {
- newTagResourceResponse :: TagResourceResponse
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:resourceId:TagResource'
, tagResource_resourceId
- The ID of the resource to add a tag to.
You can specify any of the following taggable resources.
- Amazon Web Services 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
$sel:tags:TagResource'
, tagResource_tags
- A list of tags to add to the specified resource.
For each tag in the list, you must specify both a tag key and a value.
The value can be an empty string, but you can't set it to null
.
If any one of the tags is invalid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
Request Lenses
tagResource_resourceId :: Lens' TagResource Text Source #
The ID of the resource to add a tag to.
You can specify any of the following taggable resources.
- Amazon Web Services 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
tagResource_tags :: Lens' TagResource [Tag] Source #
A list of tags to add to the specified resource.
For each tag in the list, you must specify both a tag key and a value.
The value can be an empty string, but you can't set it to null
.
If any one of the tags is invalid or if you exceed the maximum allowed number of tags for a resource, then the entire request fails.
Destructuring the Response
data TagResourceResponse Source #
See: newTagResourceResponse
smart constructor.
Instances
Generic TagResourceResponse Source # | |
Defined in Amazonka.Organizations.TagResource type Rep TagResourceResponse :: Type -> Type # from :: TagResourceResponse -> Rep TagResourceResponse x # to :: Rep TagResourceResponse x -> TagResourceResponse # | |
Read TagResourceResponse Source # | |
Show TagResourceResponse Source # | |
Defined in Amazonka.Organizations.TagResource showsPrec :: Int -> TagResourceResponse -> ShowS # show :: TagResourceResponse -> String # showList :: [TagResourceResponse] -> ShowS # | |
NFData TagResourceResponse Source # | |
Defined in Amazonka.Organizations.TagResource rnf :: TagResourceResponse -> () # | |
Eq TagResourceResponse Source # | |
Defined in Amazonka.Organizations.TagResource (==) :: TagResourceResponse -> TagResourceResponse -> Bool # (/=) :: TagResourceResponse -> TagResourceResponse -> Bool # | |
type Rep TagResourceResponse Source # | |
newTagResourceResponse :: TagResourceResponse Source #
Create a value of TagResourceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.