listPolicies

Returns a paginated list of all policies stored in the specified policy store.

Samples

// The following example lists all policies in the policy store.
val resp = verifiedPermissionsClient.listPolicies {
    policyStoreId = "C7v5xMplfFH3i3e4Jrzb1a"
}
// The following example lists all policies for a specified principal.
val resp = verifiedPermissionsClient.listPolicies {
    policyStoreId = "C7v5xMplfFH3i3e4Jrzb1a"
    filter = PolicyFilter {
        principal = EntityReference.Identifier(EntityIdentifier {
            entityType = "User"
            entityId = "alice"
        }
        )
    }
}
// The following example uses the Filter parameter to list only the template linked policies in the
// specified policy store.
val resp = verifiedPermissionsClient.listPolicies {
    policyStoreId = "C7v5xMplfFH3i3e4Jrzb1a"
    filter = PolicyFilter {
        policyType = PolicyType.fromValue("TEMPLATE_LINKED")
    }
}