addTagsToResource

Adds metadata tags to an DMS resource, including replication instance, endpoint, subnet group, and migration task. These tags can also be used with cost allocation reporting to track cost associated with DMS resources, or used in a Condition statement in an IAM policy for DMS. For more information, see Tag data type description.

Samples

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

fun main() { 
   //sampleStart 
   // Adds metadata tags to an AWS DMS resource, including replication instance, endpoint, security group,
// and migration task. These tags can also be used with cost allocation reporting to track cost associated
// with AWS DMS resources, or used in a Condition statement in an IAM policy for AWS DMS.
val resp = databaseMigrationClient.addTagsToResource {
    resourceArn = "arn:aws:dms:us-east-1:123456789012:endpoint:ASXWXJZLNWNT5HTWCGV2BUJQ7E"
    tags = listOf<Tag>(
        Tag {
            key = "Acount"
            value = "1633456"
        }            
    )
} 
   //sampleEnd
}