addTagsToResource
Adds one or more tags to the specified resource. You use tags to add metadata to resources, which you can use to categorize these resources. For example, you can categorize resources by purpose, owner, environment, or team. Each tag consists of a key and a value, which you define. You can add tags to the following Storage Gateway resources:
Storage gateways of all types
Storage volumes
Virtual tapes
NFS and SMB file shares
File System associations
You can create a maximum of 50 tags for each resource. Virtual tapes and storage volumes that are recovered to a new gateway maintain their tags.
Samples
import aws.sdk.kotlin.services.storagegateway.model.Tag
fun main() {
//sampleStart
// Adds one or more tags to the specified resource.
val resp = storageGatewayClient.addTagsToResource {
resourceArn = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B"
tags = listOf<Tag>(
Tag {
key = "Dev Gatgeway Region"
value = "East Coast"
}
)
}
//sampleEnd
}