Installation
Getting Started (.NET)
Getting Started (Visual Basic)
Core Methods
The SDK methods are organized into the following high-level categories:- Auth(): Handles authentication methods.
- Secrets(): Manages CRUD operations for secrets.
- Pki(): Programmatically interact with the Infisical PKI.- Subscribers(): Manage PKI Subscribers.
 
Auth()
The Auth() component provides methods for authentication:
Universal Auth
Authenticating
- clientId(string): The client ID of your Machine Identity.
- clientSecret(string): The client secret of your Machine Identity.
Secrets()
The Secrets() sub-class handles operations related to the Infisical secrets management product.
List Secrets
- ProjectId(string): The ID of your project.
- EnvironmentSlug(string): The environment in which to list secrets (e.g., “dev”).
- SecretPath(string): The path to the secrets.
- ExpandSecretReferences(boolean): Whether to expand secret references.
- Recursive(boolean): Whether to list secrets recursively.
- SetSecretsAsEnvironmentVariables(boolean): Set the retrieved secrets as environment variables.
- Task<Secret[]>: The response containing the list of secrets.
Create Secret
- SecretName(string): The name of the secret to create
- SecretValue(string): The value of the secret.
- ProjectId(string): The ID of your project.
- EnvironmentSlug(string): The environment in which to create the secret.
- SecretPath(string, optional): The path to the secret.
- Metadata(object, optional): Attach metadata to the secret.
- SecretComment(string, optional): Attach a secret comment to the secret.
- SecretReminderNote(string, optional): Attach a secret reminder note to the secret.
- SecretReminderRepeatDays(int, optional): Set the reminder repeat days on the secret.
- SkipMultilineEncoding(bool, optional): Whether or not to skip multiline encoding for the secret’s value. Defaults to- false.
- Task<Secret>: The created secret.
Update Secret
- SecretName(string): The name of the secret to update.`
- ProjectId(string): The ID of your project.
- EnvironmentSlug(string): The environment in which to update the secret.
- SecretPath(string): The path to the secret.
- NewSecretValue(string, optional): The new value of the secret.
- NewSecretName(string, optional): A new name for the secret.
- NewMetadata(object, optional): New metadata to attach to the secret.
- Task<Secret>: The updated secret.
Get Secret by Name
- SecretName(string): The name of the secret to get`
- ProjectId(string): The ID of your project.
- EnvironmentSlug(string): The environment in which to retrieve the secret.
- SecretPath(string): The path to the secret.
- ExpandSecretReferences(boolean, optional): Whether to expand secret references.
- Type(SecretType, optional): The type of secret to fetch. Defaults to- Shared.
- Task<Secret>: The fetched secret.
Delete Secret by Name
- SecretName(string): The name of the secret to delete.
- ProjectId(string): The ID of your project.
- EnvironmentSlug(string): The environment in which to delete the secret.
- SecretPath(string, optional): The path to the secret.
- Task<Secret>: The deleted secret.
Pki().Subscribers()
The Pki().Subscribers() sub-class is used to programmatically interact with the Infisical PKI product line. Currently only issuing new certificates and retrieving the latest certificate bundle from a subscriber is supported. More widespread support for the PKI product is coming to the .NET SDK in the near future.
Issue a new certificate
- SubscriberName(string): The name of the subscriber to create a certificate for.
- ProjectId(string): The ID of PKI project.
- Task<SubscriberIssuedCertificate>: The newly issued certificate along with it’s credentials for the specified subscriber.
Retrieve latest certificate bundle
- SubscriberName(string): The name of the subscriber to retrieve the latest certificate bundle for
- ProjectId(string): The ID of PKI project.
- Task<CertificateBundle>: The latest certificate bundle for the specified subscriber.