updateTransformer

Updates the specified parameters for a transformer. A transformer can take an EDI file as input and transform it into a JSON-or XML-formatted document. Alternatively, a transformer can take a JSON-or XML-formatted document as input and transform it into an EDI file.

Samples

import aws.sdk.kotlin.services.b2bi.model.FormatOptions
import aws.sdk.kotlin.services.b2bi.model.FromFormat
import aws.sdk.kotlin.services.b2bi.model.InputConversion
import aws.sdk.kotlin.services.b2bi.model.Mapping
import aws.sdk.kotlin.services.b2bi.model.MappingTemplateLanguage
import aws.sdk.kotlin.services.b2bi.model.SampleDocumentKeys
import aws.sdk.kotlin.services.b2bi.model.SampleDocuments
import aws.sdk.kotlin.services.b2bi.model.TransformerStatus
import aws.sdk.kotlin.services.b2bi.model.X12Details
import aws.sdk.kotlin.services.b2bi.model.X12TransactionSet
import aws.sdk.kotlin.services.b2bi.model.X12Version

fun main() { 
   //sampleStart 
   // Sample UpdateTransformer call
val resp = b2BiClient.updateTransformer {
    inputConversion = InputConversion {
        fromFormat = FromFormat.fromValue("X12")
        formatOptions = FormatOptions.X12(X12Details {
            transactionSet = X12TransactionSet.fromValue("X12_110")
            version = X12Version.fromValue("VERSION_4010")
        }
        )
    }
    mapping = Mapping {
        templateLanguage = MappingTemplateLanguage.fromValue("JSONATA")
        template = "{}"
    }
    sampleDocuments = SampleDocuments {
        bucketName = "test-bucket"
        keys = listOf<SampleDocumentKeys>(
            SampleDocumentKeys {
                input = "sampleDoc.txt"
            }                
        )
    }
    name = "transformX12"
    status = TransformerStatus.fromValue("inactive")
    transformerId = "tr-974c129999f84d8c9"
} 
   //sampleEnd
}