updateRule

abstract suspend fun updateRule(input: UpdateRuleRequest): UpdateRuleResponse

Updates the specified rule. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the rule as a draft.

Samples

// Updates the rule s description and configuration and publishes the change. The updateToken from the
// most recent read is required for optimistic locking.
val resp = networkSecurityManagerClient.updateRule {
    ruleIdentifier = "arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123"
    updateToken = "c1d2e3f4-4a5b-4c6d-9e7f-8a9b0c1d2e3f"
    ruleType = RuleType.fromValue("INSPECTION")
    ruleDescription = "Blocks requests from known malicious IP addresses - updated list"
    configuration = buildDocument {
    }
    isPublished = true
}