createPolicyStore
inline suspend fun VerifiedPermissionsClient.createPolicyStore(crossinline block: CreatePolicyStoreRequest.Builder.() -> Unit): CreatePolicyStoreResponse
Creates a policy store. A policy store is a container for policy resources.
As of May 2026, Verified Permissions has aligned with Cedar and now supports multiple namespaces.
Verified Permissions is eventually consistent. It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.
Samples
// The following example creates a new policy store with strict validation turned on.
val resp = verifiedPermissionsClient.createPolicyStore {
validationSettings = ValidationSettings {
mode = ValidationMode.fromValue("STRICT")
}
clientToken = "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111"
}Content copied to clipboard
// The following example creates a new policy store with encryption settings based on a provided KMS
// key.
val resp = verifiedPermissionsClient.createPolicyStore {
validationSettings = ValidationSettings {
mode = ValidationMode.fromValue("STRICT")
}
encryptionSettings = EncryptionSettings.KmsEncryptionSettings(KmsEncryptionSettings {
key = "arn:aws:kms:us-east-1:123456789012:key/abcdefgh-ijkl-mnop-qrst-uvwxyz123456"
encryptionContext = mapOf<String, String>(
"policy_store_owner" to "Tim"
)
}
)
clientToken = "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111"
}Content copied to clipboard