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 |
Amazonka.EC2.CreateTags
Description
Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide. For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide.
Synopsis
Creating a Request
data CreateTags Source #
See: newCreateTags
smart constructor.
Constructors
CreateTags' | |
Fields
|
Instances
newCreateTags :: CreateTags Source #
Create a value of CreateTags
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:dryRun:CreateTags'
, createTags_dryRun
- Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
CreateTags
, createTags_resources
- The IDs of the resources, separated by spaces.
Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.
CreateTags
, createTags_tags
- The tags. The value
parameter is required, but if you don't want the
tag to have a value, specify the parameter with no value, and we set the
value to an empty string.
Request Lenses
createTags_dryRun :: Lens' CreateTags (Maybe Bool) Source #
Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
createTags_resources :: Lens' CreateTags [Text] Source #
The IDs of the resources, separated by spaces.
Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.
createTags_tags :: Lens' CreateTags [Tag] Source #
The tags. The value
parameter is required, but if you don't want the
tag to have a value, specify the parameter with no value, and we set the
value to an empty string.
Destructuring the Response
data CreateTagsResponse Source #
See: newCreateTagsResponse
smart constructor.
Constructors
CreateTagsResponse' | |
Instances
Generic CreateTagsResponse Source # | |
Defined in Amazonka.EC2.CreateTags Associated Types type Rep CreateTagsResponse :: Type -> Type # Methods from :: CreateTagsResponse -> Rep CreateTagsResponse x # to :: Rep CreateTagsResponse x -> CreateTagsResponse # | |
Read CreateTagsResponse Source # | |
Defined in Amazonka.EC2.CreateTags Methods readsPrec :: Int -> ReadS CreateTagsResponse # readList :: ReadS [CreateTagsResponse] # | |
Show CreateTagsResponse Source # | |
Defined in Amazonka.EC2.CreateTags Methods showsPrec :: Int -> CreateTagsResponse -> ShowS # show :: CreateTagsResponse -> String # showList :: [CreateTagsResponse] -> ShowS # | |
NFData CreateTagsResponse Source # | |
Defined in Amazonka.EC2.CreateTags Methods rnf :: CreateTagsResponse -> () # | |
Eq CreateTagsResponse Source # | |
Defined in Amazonka.EC2.CreateTags Methods (==) :: CreateTagsResponse -> CreateTagsResponse -> Bool # (/=) :: CreateTagsResponse -> CreateTagsResponse -> Bool # | |
type Rep CreateTagsResponse Source # | |
newCreateTagsResponse :: CreateTagsResponse Source #
Create a value of CreateTagsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.