createTags

inline suspend fun EfsClient.createTags(crossinline block: CreateTagsRequest.Builder.() -> Unit): CreateTagsResponse

Deprecated

Use TagResource.

DEPRECATED - CreateTags is deprecated and not maintained. To create tags for EFS resources, use the API action.

Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the Name tag to your file system, Amazon EFS returns it in the response to the DescribeFileSystems operation.

This operation requires permission for the elasticfilesystem:CreateTags action.

Samples

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

fun main() { 
   //sampleStart 
   // This operation creates a new tag for an EFS file system.
efsClient.createTags {
    fileSystemId = "fs-01234567"
    tags = listOf<Tag>(
        Tag {
            key = "Name"
            value = "MyFileSystem"
        }            
    )
} 
   //sampleEnd
}