createReceiptRule

Creates a receipt rule.

For information about setting up receipt rules, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

Samples

import aws.sdk.kotlin.services.ses.model.ReceiptAction
fun main() { 
   //sampleStart 
   // The following example creates a new receipt rule
sesClient.createReceiptRule {
    ruleSetName = "MyRuleSet"
    after = ""
    rule = ReceiptRule {
        tlsPolicy = TlsPolicy.fromValue("Optional")
        enabled = true
        name = "MyRule"
        actions = listOf<ReceiptAction>(
            ReceiptAction {
                s3Action = S3Action {
                    objectKeyPrefix = "email"
                    bucketName = "MyBucket"
                }
            }                
        )
        scanEnabled = true
    }
} 
   //sampleEnd
}