updateSecurityGroupRuleDescriptionsIngress
inline suspend fun Ec2Client.updateSecurityGroupRuleDescriptionsIngress(crossinline block: UpdateSecurityGroupRuleDescriptionsIngressRequest.Builder.() -> Unit): UpdateSecurityGroupRuleDescriptionsIngressResponse
Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.
Samples
import aws.sdk.kotlin.services.ec2.model.IpPermission
import aws.sdk.kotlin.services.ec2.model.IpRange
fun main() {
//sampleStart
// This example updates the description for the specified security group rule.
val resp = ec2Client.updateSecurityGroupRuleDescriptionsIngress {
groupId = "sg-123abc12"
ipPermissions = listOf<IpPermission>(
IpPermission {
ipProtocol = "tcp"
fromPort = 22
toPort = 22
ipRanges = listOf<IpRange>(
IpRange {
cidrIp = "203.0.113.0/16"
description = "SSH access from the LA office"
}
)
}
)
}
//sampleEnd
}