replaceNetworkAclEntry

Replaces an entry (rule) in a network ACL. For more information, see Network ACLs in the Amazon VPC User Guide.

Samples

import aws.sdk.kotlin.services.ec2.model.PortRange
import aws.sdk.kotlin.services.ec2.model.RuleAction

fun main() { 
   //sampleStart 
   // This example replaces an entry for the specified network ACL. The new rule 100 allows ingress
// traffic from 203. 0. 113. 12 24 on UDP port 53 (DNS) into any associated subnet.
ec2Client.replaceNetworkAclEntry {
    networkAclId = "acl-5fb85d36"
    ruleNumber = 100
    protocol = "17"
    ruleAction = RuleAction.fromValue("allow")
    egress = false
    cidrBlock = "203.0.113.12/24"
    portRange = PortRange {
        from = 53
        to = 53
    }
} 
   //sampleEnd
}