attachTypedLink

Attaches a typed link to a specified source and target object. For more information, see Typed Links.

Samples

import aws.sdk.kotlin.services.clouddirectory.model.AttributeNameAndValue
import aws.sdk.kotlin.services.clouddirectory.model.ObjectReference
import aws.sdk.kotlin.services.clouddirectory.model.TypedAttributeValue
import aws.sdk.kotlin.services.clouddirectory.model.TypedLinkSchemaAndFacetName

fun main() { 
   //sampleStart 
   val resp = cloudDirectoryClient.attachTypedLink {
    directoryArn = "arn:aws:clouddirectory:us-west-2:45132example:directory/AYb8AOV81kHNgdj8mAO3dNY"
    sourceObjectReference = ObjectReference {
        selector = "$AQGG_ADlfNZBzYHY_JgDt3TWSvfuEnDqTdmeCuTs6YBNUA"
    }
    targetObjectReference = ObjectReference {
        selector = "$AQGG_ADlfNZBzYHY_JgDt3TWcU7IARvOTeaR09zme1sVsw"
    }
    typedLinkFacet = TypedLinkSchemaAndFacetName {
        typedLinkName = "exampletypedlink8"
        schemaArn = "arn:aws:clouddirectory:us-west-2:45132example:directory/AYb8AOV81kHNgdj8mAO3dNY/schema/org/1"
    }
    attributes = listOf<AttributeNameAndValue>(
        AttributeNameAndValue {
            attributeName = "22"
            value = TypedAttributeValue.BinaryValue("c3Ry".encodeAsByteArray())
        }            
    )
} 
   //sampleEnd
}