Module: policy

Provides implementation for the Vault Policy APIs

Extends

  • Vaulted

Methods


<inner> createPolicy()

Creates the specified policy in the vault and sets internal property accordingly

Parameters:
Name Type Argument Description
options.id string

unique identifier for the policy

options.body.rules string

the definition of the policy rules (HCL or json format)

options.token string <optional>

the authentication token

Returns:
Type
Promise

<inner> deletePolicy()

Deletes the specified policy from the vault and sets internal property accordingly

Parameters:
Name Type Argument Description
options.id string

unique identifier for the policy

options.token string <optional>

the authentication token

Returns:
Type
Promise

<inner> getPolicies()

Gets the list of policies for the vault and sets internal property accordingly

Parameters:
Name Type Argument Description
options.token string <optional>

the authentication token

Returns:
Type
Promise

<inner> getPolicy()

Gets the specified policy details

Parameters:
Name Type Argument Description
options.id string

unique identifier for the policy

options.token string <optional>

the authentication token

Returns:
Type
Promise