Skip to content

Latest commit

 

History

History
83 lines (40 loc) · 1.1 KB

core.client.getpolicy.md

File metadata and controls

83 lines (40 loc) · 1.1 KB

Home > @cerbos/core > Client > getPolicy

Client.getPolicy() method

Fetch a policy by ID.

Signature:

getPolicy(id: string, options?: RequestOptions): Promise<Policy | undefined>;

Parameters

Parameter

Type

Description

id

string

options

RequestOptions

(Optional)

Returns:

Promise<Policy | undefined>

Remarks

Requires

Example

const policy = await cerbos.getPolicy("resource.document.v1");