hvac.api

Collection of Vault API endpoint classes.

Classes:

AuthMethods(adapter)

Auth Methods.

SecretsEngines(adapter)

Secrets Engines.

SystemBackend(adapter)

VaultApiBase(adapter)

Base class for API endpoints.

VaultApiCategory(adapter)

Base class for API categories.

class hvac.api.AuthMethods(adapter)[source]

Bases: VaultApiCategory

Auth Methods.

Attributes:

implemented_classes

unimplemented_classes

implemented_classes = [<class 'hvac.api.auth_methods.approle.AppRole'>, <class 'hvac.api.auth_methods.azure.Azure'>, <class 'hvac.api.auth_methods.github.Github'>, <class 'hvac.api.auth_methods.gcp.Gcp'>, <class 'hvac.api.auth_methods.jwt.JWT'>, <class 'hvac.api.auth_methods.kubernetes.Kubernetes'>, <class 'hvac.api.auth_methods.ldap.Ldap'>, <class 'hvac.api.auth_methods.userpass.Userpass'>, <class 'hvac.api.auth_methods.legacy_mfa.LegacyMfa'>, <class 'hvac.api.auth_methods.oidc.OIDC'>, <class 'hvac.api.auth_methods.okta.Okta'>, <class 'hvac.api.auth_methods.radius.Radius'>, <class 'hvac.api.auth_methods.token.Token'>, <class 'hvac.api.auth_methods.aws.Aws'>, <class 'hvac.api.auth_methods.cert.Cert'>]
unimplemented_classes = ['AppId', 'AliCloud', 'Mfa']
class hvac.api.SecretsEngines(adapter)[source]

Bases: VaultApiCategory

Secrets Engines.

Attributes:

implemented_classes

unimplemented_classes

implemented_classes = [<class 'hvac.api.secrets_engines.aws.Aws'>, <class 'hvac.api.secrets_engines.azure.Azure'>, <class 'hvac.api.secrets_engines.gcp.Gcp'>, <class 'hvac.api.secrets_engines.active_directory.ActiveDirectory'>, <class 'hvac.api.secrets_engines.identity.Identity'>, <class 'hvac.api.secrets_engines.kv.Kv'>, <class 'hvac.api.secrets_engines.ldap.Ldap'>, <class 'hvac.api.secrets_engines.pki.Pki'>, <class 'hvac.api.secrets_engines.transform.Transform'>, <class 'hvac.api.secrets_engines.transit.Transit'>, <class 'hvac.api.secrets_engines.database.Database'>, <class 'hvac.api.secrets_engines.consul.Consul'>, <class 'hvac.api.secrets_engines.rabbitmq.RabbitMQ'>, <class 'hvac.api.secrets_engines.ssh.Ssh'>]
unimplemented_classes = ['AliCloud', 'Azure', 'GcpKms', 'Nomad', 'Ssh', 'TOTP', 'Cassandra', 'MongoDb', 'Mssql', 'MySql', 'PostgreSql']
class hvac.api.SystemBackend(adapter)[source]

Bases: VaultApiCategory, Audit, Auth, Capabilities, Health, Init, Key, Leader, Lease, Mount, Namespace, Policies, Policy, Quota, Raft, Seal, Wrapping

Attributes:

implemented_classes

unimplemented_classes

implemented_classes = [<class 'hvac.api.system_backend.audit.Audit'>, <class 'hvac.api.system_backend.auth.Auth'>, <class 'hvac.api.system_backend.capabilities.Capabilities'>, <class 'hvac.api.system_backend.health.Health'>, <class 'hvac.api.system_backend.init.Init'>, <class 'hvac.api.system_backend.key.Key'>, <class 'hvac.api.system_backend.leader.Leader'>, <class 'hvac.api.system_backend.lease.Lease'>, <class 'hvac.api.system_backend.mount.Mount'>, <class 'hvac.api.system_backend.namespace.Namespace'>, <class 'hvac.api.system_backend.policies.Policies'>, <class 'hvac.api.system_backend.policy.Policy'>, <class 'hvac.api.system_backend.quota.Quota'>, <class 'hvac.api.system_backend.raft.Raft'>, <class 'hvac.api.system_backend.seal.Seal'>, <class 'hvac.api.system_backend.wrapping.Wrapping'>]
unimplemented_classes = []
class hvac.api.VaultApiBase(adapter)[source]

Bases: object

Base class for API endpoints.

Methods:

__init__(adapter)

Default api class constructor.

__init__(adapter)[source]

Default api class constructor.

Parameters:

adapter (hvac.adapters.Adapter) – Instance of hvac.adapters.Adapter; used for performing HTTP requests.

class hvac.api.VaultApiCategory(adapter)[source]

Bases: VaultApiBase

Base class for API categories.

Methods:

__init__(adapter)

API Category class constructor.

get_private_attr_name(class_name)

Helper method to prepend a leading underscore to a provided class name.

Attributes:

adapter

Retrieve the adapter instance under the "_adapter" property in use by this class.

implemented_classes

List of implemented classes under this category.

unimplemented_classes

List of known unimplemented classes under this category.

__init__(adapter)[source]

API Category class constructor.

Parameters:

adapter (hvac.adapters.Adapter) – Instance of hvac.adapters.Adapter; used for performing HTTP requests.

property adapter

Retrieve the adapter instance under the β€œ_adapter” property in use by this class.

Returns:

The adapter instance in use by this class.

Return type:

hvac.adapters.Adapter

static get_private_attr_name(class_name)[source]

Helper method to prepend a leading underscore to a provided class name.

Parameters:

class_name (str|unicode) – Name of a class under this category.

Returns:

The private attribute label for the provided class.

Return type:

str

abstract property implemented_classes

List of implemented classes under this category.

Returns:

List of implemented classes under this category.

Return type:

List[hvac.api.VaultApiBase]

property unimplemented_classes

List of known unimplemented classes under this category.

Returns:

List of known unimplemented classes under this category.

Return type:

List[str]