createCapability

Instantiates a capability based on the specified parameters. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

Samples

import aws.sdk.kotlin.services.b2bi.model.S3Location
import aws.sdk.kotlin.services.b2bi.model.Tag
fun main() { 
   //sampleStart 
   // Sample CreateCapability call
val resp = b2BiClient.createCapability {
    name = "b2biexample"
    type = CapabilityType.fromValue("edi")
    configuration = CapabilityConfiguration.Edi(EdiConfiguration {
        type = EdiType.X12Details(X12Details {
            transactionSet = X12TransactionSet.fromValue("X12_110")
            version = X12Version.fromValue("VERSION_4010")
        }
        )
        inputLocation = S3Location {
            bucketName = "test-bucket"
            key = "input/"
        }
        outputLocation = S3Location {
            bucketName = "test-bucket"
            key = "output/"
        }
        transformerId = "tr-9a893cf536df4658b"
    }
    )
    instructionsDocuments = listOf<S3Location>(
        S3Location {
            bucketName = "test-bucket"
            key = "instructiondoc.txt"
        }            
    )
    clientToken = "foo"
    tags = listOf<Tag>(
        Tag {
            key = "capabilityKey1"
            value = "capabilityValue1"
        }            
    )
} 
   //sampleEnd
}