updatePolicy
Updates the specified policy. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the policy as a draft.
Samples
// Updates the policy s description, priority, and configuration and publishes the change. The
// updateToken from the most recent read is required for optimistic locking.
val resp = networkSecurityManagerClient.updatePolicy {
policyIdentifier = "arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789"
updateToken = "e3f4a5b6-6c7d-4e8f-9a0b-0c1d2e3f4a5b"
policyDescription = "WAF policy for web application protection - updated"
priority = 2
associatedTemplateAndRuleList = listOf<TemplateOrRuleReference>(
TemplateOrRuleReference.TemplateIdentifier("arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789")
)
policyConfiguration = PolicyConfiguration {
remediationEnabled = true
resourcesCleanUp = false
wafConfig = WafConfig {
existingCustomerWebAclResolution = ExistingCustomerWebAclResolution.fromValue("NO_REMEDIATION")
conflictResolution = WafConflictResolutionOptions.fromValue("MERGE_WHERE_APPLICABLE")
}
}
isPublished = true
}Content copied to clipboard