attachToIndex  
  inline suspend fun CloudDirectoryClient.attachToIndex(crossinline block: AttachToIndexRequest.Builder.() -> Unit): AttachToIndexResponse
Attaches the specified object to the specified index.
Samples
import aws.sdk.kotlin.services.clouddirectory.model.ObjectReference
fun main() { 
   //sampleStart 
   val resp = cloudDirectoryClient.attachToIndex {
    directoryArn = "arn:aws:clouddirectory:us-west-2:45132example:directory/AYb8AOV81kHNgdj8mAO3dNY"
    indexReference = ObjectReference {
        selector = "$AQGG_ADlfNZBzYHY_JgDt3TW45F26R1HTY2z-stwKBte_Q"
    }
    targetReference = ObjectReference {
        selector = "$AQGG_ADlfNZBzYHY_JgDt3TWcU7IARvOTeaR09zme1sVsw"
    }
} 
   //sampleEnd
}