addTagsToResource

Adds or overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource.

Samples

import aws.sdk.kotlin.services.directoryservice.model.Tag

fun main() { 
   //sampleStart 
   // The following example adds or overwrites one or more tags for the specified directory.
val resp = directoryClient.addTagsToResource {
    resourceId = "d-92654abfed"
    tags = listOf<Tag>(
        Tag {
            key = "environment"
            value = "production"
        }            
    )
} 
   //sampleEnd
}