resetInstanceAttribute
abstract suspend fun resetInstanceAttribute(input: ResetInstanceAttributeRequest): ResetInstanceAttributeResponse
Resets an attribute of an instance to its default value. To reset the kernel or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, the instance can be either running or stopped.
The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true, which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT instances in the Amazon VPC User Guide.
Samples
// This example resets the sourceDestCheck attribute for the specified instance.
val resp = ec2Client.resetInstanceAttribute {
attribute = InstanceAttributeName.fromValue("sourceDestCheck")
instanceId = "i-1234567890abcdef0"
}Content copied to clipboard