createObject
Creates an object in a Directory. Additionally attaches the object to a parent, if a parent reference and LinkName
is specified. An object is simply a collection of Facet attributes. You can also use this API call to create a policy object, if the facet from which you create the object is a policy facet.
Samples
import aws.sdk.kotlin.services.clouddirectory.model.SchemaFacet
fun main() {
//sampleStart
val resp = cloudDirectoryClient.createObject {
directoryArn = "arn:aws:clouddirectory:us-west-2:45132example:directory/AXQXDXvdgkOWktRXV4HnRa8"
schemaFacets = listOf<SchemaFacet>(
SchemaFacet {
schemaArn = "arn:aws:clouddirectory:us-west-2:45132example:directory/AXQXDXvdgkOWktRXV4HnRa8/schema/ExampleOrgPersonSchema/1"
facetName = "Organization_Person"
}
)
}
//sampleEnd
}