Skip to content

Use a secret

The common Secret methods let you persist or refresh a secret entity and manage its sensitive value through the configured provider.

Persist and refresh

update

Update the entity in the backend.

Returns:

Type Description
ContextEntity

Entity updated.

export

Export object as a YAML file in the context folder.

Returns:

Type Description
str

Exported filepath.

refresh

Refresh object from backend.

Returns:

Type Description
ContextEntity

Entity refreshed.

Manage secret values

Secret values are separate from the entity metadata.

set_secret_value

Update the secret value with a new one.

Parameters:

Name Type Description Default
value str

Value of the secret.

required
read_secret_value

Read the secret value from backend.

Returns:

Type Description
str

Value of the secret.