modifyRule

abstract suspend fun modifyRule(input: ModifyRuleRequest): ModifyRuleResponse

Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.

To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

Samples

import aws.sdk.kotlin.services.elasticloadbalancingv2.model.RuleCondition

fun main() { 
   //sampleStart 
   // This example modifies the condition for the specified rule.
val resp = elasticLoadBalancingV2Client.modifyRule {
    ruleArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee"
    conditions = listOf<RuleCondition>(
        RuleCondition {
            field = "path-pattern"
            values = listOf<String>(
                "/images/*"
            )
        }            
    )
} 
   //sampleEnd
}