Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Recipe: find all content that uses a given env var #6

@nealrichardson

Description

@nealrichardson

Possibly to update the value with something else, as in to rotate a token.

Following posit-dev/posit-sdk-py#143, it could be something like:

env_var_name = "MY_SECRET"
new_value = "fa1afe1"

for c in client.content.find():
    if env_var_name in c.env_vars:
        c.set_env_vars({env_var_name: new_value})

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions