containerPolicy

fun containerPolicy(currentPolicy: ContainerPolicy? = null, buildBlock: ContainerPolicyBuilderScope.() -> Unit): ContainerPolicy

Creates or updates a ContainerPolicy using a DSL builder. This function allows building a full container policy, including item-level access rules. If a currentPolicy is provided, its settings will be used as a base.

Example:

val policy = containerPolicy {
get(ContainerPolicyValues.DEFAULT)
item(ItemPolicy(...))
update(...)
}

Return

ContainerPolicy

Parameters

currentPolicy

optional existing policy to use as a base

buildBlock

container-level policy configuration