Skip to main content

Methods

List the secret groups associated with a user along with the associated secrets for each group. Filtered with the options passed in the query fields. Note: This method does not return the secret values of the associatedSecrets in the response. A separate API call to /v1/secrets/{id} should be made to fetch the associated secret value.

Parameters

limit
typing.Optional[int]
Number of items per page
offset
typing.Optional[int]
Number of items to skip
fqn
typing.Optional[str]
Fqn of secret group.
Search query - filters by secret group names that contain the search string

Returns

SyncPager[SecretGroup]
SyncPager[SecretGroup]
🔗 SecretGroupReturns all the secret groups associated with a user along with the associated secrets for each group.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.list(
    limit=10,
    offset=10,
    fqn="value",
    search="value",
)

# Iterate through results
for item in response:
    print(item.name)

# Or paginate page by page
for page in response.iter_pages():
    for item in page:
        print(item.name)
Creates a secret group with secrets in it. A secret version for each of the created secret is created with version number as 1. The returned secret group does not have any secret values in the associatedSecrets field. A separate API call to /v1/secrets/{id} should be made to fetch the associated secret value.

Parameters

name
str
required
Name of the secret group.
integration_id
str
required
Id of the provider integration.
secrets
typing.Sequence[SecretInput]
required
🔗 SecretInputThe secrets to be associated with the secret group

Returns

GetSecretGroupResponse
GetSecretGroupResponse
🔗 GetSecretGroupResponseReturns the created secret group without the associated secrets.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.create(
    name="value",
    integration_id="value",
    secrets="value",
)
Get Secret Group by id. This method does not return the secret values of the associatedSecrets in the response. A separate API call to /v1/secrets/{id} should be made to fetch the associated secret value.

Parameters

id
str
required
Secret Id of the secret group.

Returns

GetSecretGroupResponse
GetSecretGroupResponse
🔗 GetSecretGroupResponseReturns the Secret Group associated with provided id

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.get(
    id="id_value",
)
Updates the secrets in a secret group with new values. A new secret version is created for every secret that has a modified value and any omitted secrets are deleted. The returned updated secret group does not have any secret values in the associatedSecrets field. A separate API call to /v1/secrets/{id} should be made to fetch the associated secret value.

Parameters

id
str
required
Secret Id of the secret group.
secrets
typing.Sequence[UpdateSecretInput]
required

Returns

GetSecretGroupResponse
GetSecretGroupResponse
🔗 GetSecretGroupResponseReturns the updated secret group without associated secrets.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.update(
    id="id_value",
    secrets="value",
)
Deletes the secret group, its associated secrets and secret versions of those secrets.

Parameters

id
str
required
Secret Id of the secret group.

Returns

DeleteSecretGroupResponse
DeleteSecretGroupResponse
🔗 DeleteSecretGroupResponseDeletes Secret Group.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.delete(
    id="id_value",
)
Get Secret Group by FQN.

Parameters

fqn
str
required
FQN of the secret group

Returns

GetSecretGroupResponse
GetSecretGroupResponse
🔗 GetSecretGroupResponseSecret group details

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.secret_groups.get_by_fqn(
    fqn="value",
)
I