Skip to main content

Classes

PoliciesClient

Defined in: src/client/policies/policies.ts:25 The namespace containing all Policy methods.

Implements

Constructors

Constructor
Returns
PoliciesClient

Methods

createPolicy()
Defined in: src/client/policies/policies.ts:181 Creates a new policy that can be used to govern the behavior of projects and accounts.
Parameters
options
CreatePolicyOptions Options for creating the policy
Returns
Promise<Policy> The created policy
Throws
When the policy is invalid
Examples
Implementation of
deletePolicy()
Defined in: src/client/policies/policies.ts:252 Deletes a policy by its unique identifier. If a policy is referenced by an active project or account, this operation will fail.
Parameters
options
DeletePolicyOptions Options containing the policy ID to delete
Returns
Promise<void> Void on successful deletion
Examples
Implementation of
getPolicyById()
Defined in: src/client/policies/policies.ts:216 Retrieves a policy by its unique identifier.
Parameters
options
GetPolicyByIdOptions Options containing the policy ID to retrieve
Returns
Promise<Policy> The requested policy
Example
Implementation of
listPolicies()
Defined in: src/client/policies/policies.ts:63 Lists policies belonging to the developer’s CDP Project. Can be filtered by scope (project or account).
Parameters
options?
ListPoliciesOptions = {} Options for filtering and paginating the results
Returns
Promise<ListPoliciesResult> A paginated list of policies
Examples
Implementation of
updatePolicy()
Defined in: src/client/policies/policies.ts:340 Updates an existing policy by its unique identifier. This will apply the updated policy to any project or accounts that are currently using it.
Parameters
options
UpdatePolicyOptions Options containing the policy ID and updated policy data
Returns
Promise<Policy> The updated policy
Throws
When the updated policy is invalid
Examples
Implementation of