tagResource
inline suspend fun BillingClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse
An API operation for adding one or more tags (key-value pairs) to a resource.
Samples
import aws.sdk.kotlin.services.billing.model.ResourceTag
fun main() {
//sampleStart
// Invoke TagResource
val resp = billingClient.tagResource {
resourceArn = "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899"
resourceTags = listOf<ResourceTag>(
ResourceTag {
key = "ExampleTagKey"
value = "ExampleTagValue"
}
)
}
//sampleEnd
}