importDocument

Uploads a file that can then be used either as a default in a FileUploadCard from Q App definition or as a file that is used inside a single Q App run. The purpose of the document is determined by a scope parameter that indicates whether it is at the app definition level or at the app session level.

Samples

import aws.sdk.kotlin.services.qapps.model.DocumentScope
fun main() { 
   //sampleStart 
   // Upload a file to a specific session
val resp = qAppsClient.importDocument {
    instanceId = "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f"
    fileContentsBase64 = "data:text/plain;base64,SomeFileEncodedInBase64"
    fileName = "myFile.txt"
    cardId = "82f69028-22a9-4bea-8727-0eabf58e9fed"
    appId = "4263767c-d889-4cb2-a8f6-8b649bc66af0"
    scope = DocumentScope.fromValue("SESSION")
    sessionId = "4f0e5b87-9d38-41cd-9eb4-ebce2f2917cc"
} 
   //sampleEnd
}
import aws.sdk.kotlin.services.qapps.model.DocumentScope
fun main() { 
   //sampleStart 
   // Upload a file into a application
val resp = qAppsClient.importDocument {
    instanceId = "0b95c9c4-89cc-4aa8-9aae-aa91cbec699f"
    fileContentsBase64 = "data:text/plain;base64,SomeFileEncodedInBase64"
    fileName = "anApplicationFile.txt"
    appId = "4263767c-d889-4cb2-a8f6-8b649bc66af0"
    cardId = "7a11f34b-42d4-4bc8-b668-ae4a788dae1e"
    scope = DocumentScope.fromValue("APPLICATION")
} 
   //sampleEnd
}