Skip to main content
client.dynamic_secrets.create() creates a dynamic secret in a folder in an environment of a project. To find the project slug, open the project, go to Administration > Settings, and copy the Project slug.

Parameters

str
required
The name of the dynamic secret.
Union[DynamicSecretProviders, str]
required
The system that Infisical creates credentials in, such as DynamicSecretProviders.SQL_DATABASE. See Providers.
Dict[str, Any]
required
The provider’s settings. The Create dynamic secret endpoint lists the settings of each provider.
str
required
How long a lease lasts if the lease doesn’t set its own TTL, such as 1h.
str
required
The longest that a lease can last, including renewals, such as 24h.
str
required
The slug of the project.
str
required
The slug of the environment, such as dev.
str
default:"/"
The path of the folder to create the dynamic secret in.
List[Dict[str, str]]
Key-value pairs to store with the dynamic secret, each a dictionary with key and value.

Returns

DynamicSecret
The new dynamic secret, with its id, name, type, and TTLs.

Providers