modifySubnetAttribute

Modifies a subnet attribute. You can only modify one attribute at a time.

Use this action to modify subnets on Amazon Web Services Outposts.

  • To modify a subnet on an Outpost rack, set both MapCustomerOwnedIpOnLaunch and CustomerOwnedIpv4Pool. These two parameters act as a single attribute.

  • To modify a subnet on an Outpost server, set either EnableLniAtDeviceIndex or DisableLniAtDeviceIndex.

For more information about Amazon Web Services Outposts, see the following:

Samples

import aws.sdk.kotlin.services.ec2.model.AttributeBooleanValue
fun main() { 
   //sampleStart 
   // This example modifies the specified subnet so that all instances launched into this subnet are
// assigned a public IP address.
ec2Client.modifySubnetAttribute {
    subnetId = "subnet-1a2b3c4d"
    mapPublicIpOnLaunch = AttributeBooleanValue {
        value = true
    }
} 
   //sampleEnd
}