tagResource

abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Adds one or more tags to a resource.

Samples


fun main() { 
   //sampleStart 
   // The following example adds the Department and Area tags to the specified resource.
securityHubClient.tagResource {
    resourceArn = "arn:aws:securityhub:us-west-1:123456789012:hub/default"
    tags = mapOf<String, String>(
        "Department" to "Operations",
        "Area" to "USMidwest"
    )
} 
   //sampleEnd
}