putProjectEvents
inline suspend fun EvidentlyClient.putProjectEvents(crossinline block: PutProjectEventsRequest.Builder.() -> Unit): PutProjectEventsResponse
Sends performance events to Evidently. These events can be used to evaluate a launch or an experiment.
Samples
import aws.sdk.kotlin.services.evidently.model.Event
import aws.sdk.kotlin.services.evidently.model.EventType
import aws.smithy.kotlin.runtime.time.Instant
fun main() {
//sampleStart
val resp = evidentlyClient.putProjectEvents {
project = "ExampleProject"
events = listOf<Event>(
Event {
timestamp = Instant.fromEpochSeconds(1627580583, 0)
type = EventType.fromValue("aws.evidently.evaluation")
data = "{\"feature\":\"ExampleFeature\",\"entityId\":\"username@email.com\",\"entityAttributes\":{\"browser\":{\"s\":\"Chrome\"}},\"variation\":\"variationA\",\"type\":\"EXPERIMENT_RULE_MATCH\",\"details\":{\"experiment\":\"Jan2020_landing_page_banner\",\"treatment\":\"control\",\"salt\":\"ADJNC1237ASDNU\"}}"
}
)
}
//sampleEnd
}