Skip to content

Files

Latest commit

c2deccd · Sep 13, 2023

History

History
9266 lines (6326 loc) · 176 KB
·

SystemApi.md

File metadata and controls

9266 lines (6326 loc) · 176 KB
·

System

Method HTTP request Description
AuditingCalculateHash Post /sys/audit-hash/{path}
AuditingDisableDevice Delete /sys/audit/{path} Disable the audit device at the given path.
AuditingDisableRequestHeader Delete /sys/config/auditing/request-headers/{header} Disable auditing of the given request header.
AuditingEnableDevice Post /sys/audit/{path} Enable a new audit device at the supplied path.
AuditingEnableRequestHeader Post /sys/config/auditing/request-headers/{header} Enable auditing of a header.
AuditingListEnabledDevices Get /sys/audit List the enabled audit devices.
AuditingListRequestHeaders Get /sys/config/auditing/request-headers List the request headers that are configured to be audited.
AuditingReadRequestHeaderInformation Get /sys/config/auditing/request-headers/{header} List the information for the given request header.
AuthDisableMethod Delete /sys/auth/{path} Disable the auth method at the given auth path
AuthEnableMethod Post /sys/auth/{path} Enables a new auth method.
AuthListEnabledMethods Get /sys/auth
AuthReadConfiguration Get /sys/auth/{path} Read the configuration of the auth engine at the given path.
AuthReadTuningInformation Get /sys/auth/{path}/tune Reads the given auth path's configuration.
AuthTuneConfigurationParameters Post /sys/auth/{path}/tune Tune configuration parameters for a given auth path.
CollectHostInformation Get /sys/host-info Information about the host instance that this Vault server is running on.
CollectInFlightRequestInformation Get /sys/in-flight-req reports in-flight requests
CorsConfigure Post /sys/config/cors Configure the CORS settings.
CorsDeleteConfiguration Delete /sys/config/cors Remove any CORS settings.
CorsReadConfiguration Get /sys/config/cors Return the current CORS settings.
Decode Post /sys/decode-token Decodes the encoded token with the otp.
EncryptionKeyConfigureRotation Post /sys/rotate/config
EncryptionKeyReadRotationConfiguration Get /sys/rotate/config
EncryptionKeyRotate Post /sys/rotate
EncryptionKeyStatus Get /sys/key-status Provides information about the backend encryption key.
GenerateHash Post /sys/tools/hash
GenerateHashWithAlgorithm Post /sys/tools/hash/{urlalgorithm}
GenerateRandom Post /sys/tools/random
GenerateRandomWithBytes Post /sys/tools/random/{urlbytes}
GenerateRandomWithSource Post /sys/tools/random/{source}
GenerateRandomWithSourceAndBytes Post /sys/tools/random/{source}/{urlbytes}
HaStatus Get /sys/ha-status Check the HA status of a Vault cluster
Initialize Post /sys/init Initialize a new Vault.
InternalClientActivityConfigure Post /sys/internal/counters/config Enable or disable collection of client count, set retention period, or set default reporting period.
InternalClientActivityExport Get /sys/internal/counters/activity/export Report the client count metrics, for this namespace and all child namespaces.
InternalClientActivityReadConfiguration Get /sys/internal/counters/config Read the client count tracking configuration.
InternalClientActivityReportCounts Get /sys/internal/counters/activity Report the client count metrics, for this namespace and all child namespaces.
InternalClientActivityReportCountsThisMonth Get /sys/internal/counters/activity/monthly Report the number of clients for this month, for this namespace and all child namespaces.
InternalCountEntities Get /sys/internal/counters/entities Backwards compatibility is not guaranteed for this API
InternalCountRequests Get /sys/internal/counters/requests Backwards compatibility is not guaranteed for this API
InternalCountTokens Get /sys/internal/counters/tokens Backwards compatibility is not guaranteed for this API
InternalGenerateOpenApiDocument Get /sys/internal/specs/openapi
InternalGenerateOpenApiDocumentWithParameters Post /sys/internal/specs/openapi
InternalInspectRouter Get /sys/internal/inspect/router/{tag} Expose the route entry and mount entry tables present in the router
InternalUiListEnabledFeatureFlags Get /sys/internal/ui/feature-flags Lists enabled feature flags.
InternalUiListEnabledVisibleMounts Get /sys/internal/ui/mounts Lists all enabled and visible auth and secrets mounts.
InternalUiListNamespaces Get /sys/internal/ui/namespaces Backwards compatibility is not guaranteed for this API
InternalUiReadMountInformation Get /sys/internal/ui/mounts/{path} Return information about the given mount.
InternalUiReadResultantAcl Get /sys/internal/ui/resultant-acl Backwards compatibility is not guaranteed for this API
LeaderStatus Get /sys/leader Returns the high availability status and current leader instance of Vault.
LeasesCount Get /sys/leases/count
LeasesForceRevokeLeaseWithPrefix Post /sys/leases/revoke-force/{prefix} Revokes all secrets or tokens generated under a given prefix immediately
LeasesList Get /sys/leases
LeasesLookUp Get /sys/leases/lookup/{prefix}/
LeasesReadLease Post /sys/leases/lookup
LeasesRenewLease Post /sys/leases/renew Renews a lease, requesting to extend the lease.
LeasesRenewLeaseWithId Post /sys/leases/renew/{url_lease_id} Renews a lease, requesting to extend the lease.
LeasesRevokeLease Post /sys/leases/revoke Revokes a lease immediately.
LeasesRevokeLeaseWithId Post /sys/leases/revoke/{url_lease_id} Revokes a lease immediately.
LeasesRevokeLeaseWithPrefix Post /sys/leases/revoke-prefix/{prefix} Revokes all secrets (via a lease ID prefix) or tokens (via the tokens' path property) generated under a given prefix immediately.
LeasesTidy Post /sys/leases/tidy
ListExperimentalFeatures Get /sys/experiments Returns the available and enabled experiments
LockedUsersList Get /sys/locked-users Report the locked user count metrics, for this namespace and all child namespaces.
LockedUsersUnlock Post /sys/locked-users/{mount_accessor}/unlock/{alias_identifier} Unlocks the user with given mount_accessor and alias_identifier
LoggersReadVerbosityLevel Get /sys/loggers Read the log level for all existing loggers.
LoggersReadVerbosityLevelFor Get /sys/loggers/{name} Read the log level for a single logger.
LoggersRevertVerbosityLevel Delete /sys/loggers Revert the all loggers to use log level provided in config.
LoggersRevertVerbosityLevelFor Delete /sys/loggers/{name} Revert a single logger to use log level provided in config.
LoggersUpdateVerbosityLevel Post /sys/loggers Modify the log level for all existing loggers.
LoggersUpdateVerbosityLevelFor Post /sys/loggers/{name} Modify the log level of a single logger.
Metrics Get /sys/metrics
MfaValidate Post /sys/mfa/validate Validates the login for the given MFA methods. Upon successful validation, it returns an auth response containing the client token
Monitor Get /sys/monitor
MountsDisableSecretsEngine Delete /sys/mounts/{path} Disable the mount point specified at the given path.
MountsEnableSecretsEngine Post /sys/mounts/{path} Enable a new secrets engine at the given path.
MountsListSecretsEngines Get /sys/mounts
MountsReadConfiguration Get /sys/mounts/{path} Read the configuration of the secret engine at the given path.
MountsReadTuningInformation Get /sys/mounts/{path}/tune
MountsTuneConfigurationParameters Post /sys/mounts/{path}/tune
PluginsCatalogListPlugins Get /sys/plugins/catalog
PluginsCatalogListPluginsWithType Get /sys/plugins/catalog/{type}/ List the plugins in the catalog.
PluginsCatalogReadPluginConfiguration Get /sys/plugins/catalog/{name} Return the configuration data for the plugin with the given name.
PluginsCatalogReadPluginConfigurationWithType Get /sys/plugins/catalog/{type}/{name} Return the configuration data for the plugin with the given name.
PluginsCatalogRegisterPlugin Post /sys/plugins/catalog/{name} Register a new plugin, or updates an existing one with the supplied name.
PluginsCatalogRegisterPluginWithType Post /sys/plugins/catalog/{type}/{name} Register a new plugin, or updates an existing one with the supplied name.
PluginsCatalogRemovePlugin Delete /sys/plugins/catalog/{name} Remove the plugin with the given name.
PluginsCatalogRemovePluginWithType Delete /sys/plugins/catalog/{type}/{name} Remove the plugin with the given name.
PluginsReloadBackends Post /sys/plugins/reload/backend Reload mounted plugin backends.
PluginsRuntimesCatalogListPluginsRuntimes Get /sys/plugins/runtimes/catalog/
PluginsRuntimesCatalogReadPluginRuntimeConfiguration Get /sys/plugins/runtimes/catalog/{type}/{name} Return the configuration data for the plugin runtime with the given name.
PluginsRuntimesCatalogRegisterPluginRuntime Post /sys/plugins/runtimes/catalog/{type}/{name} Register a new plugin runtime, or updates an existing one with the supplied name.
PluginsRuntimesCatalogRemovePluginRuntime Delete /sys/plugins/runtimes/catalog/{type}/{name} Remove the plugin runtime with the given name.
PoliciesDeleteAclPolicy Delete /sys/policies/acl/{name} Delete the ACL policy with the given name.
PoliciesDeletePasswordPolicy Delete /sys/policies/password/{name} Delete a password policy.
PoliciesGeneratePasswordFromPasswordPolicy Get /sys/policies/password/{name}/generate Generate a password from an existing password policy.
PoliciesListAclPolicies Get /sys/policies/acl/
PoliciesListPasswordPolicies Get /sys/policies/password/ List the existing password policies.
PoliciesReadAclPolicy Get /sys/policies/acl/{name} Retrieve information about the named ACL policy.
PoliciesReadPasswordPolicy Get /sys/policies/password/{name} Retrieve an existing password policy.
PoliciesWriteAclPolicy Post /sys/policies/acl/{name} Add a new or update an existing ACL policy.
PoliciesWritePasswordPolicy Post /sys/policies/password/{name} Add a new or update an existing password policy.
PprofBlocking Get /sys/pprof/block Returns stack traces that led to blocking on synchronization primitives
PprofCommandLine Get /sys/pprof/cmdline Returns the running program's command line.
PprofCpuProfile Get /sys/pprof/profile Returns a pprof-formatted cpu profile payload.
PprofExecutionTrace Get /sys/pprof/trace Returns the execution trace in binary form.
PprofGoroutines Get /sys/pprof/goroutine Returns stack traces of all current goroutines.
PprofIndex Get /sys/pprof Returns an HTML page listing the available profiles.
PprofMemoryAllocations Get /sys/pprof/allocs Returns a sampling of all past memory allocations.
PprofMemoryAllocationsLive Get /sys/pprof/heap Returns a sampling of memory allocations of live object.
PprofMutexes Get /sys/pprof/mutex Returns stack traces of holders of contended mutexes
PprofSymbols Get /sys/pprof/symbol Returns the program counters listed in the request.
PprofThreadCreations Get /sys/pprof/threadcreate Returns stack traces that led to the creation of new OS threads
QueryTokenAccessorCapabilities Post /sys/capabilities-accessor
QueryTokenCapabilities Post /sys/capabilities
QueryTokenSelfCapabilities Post /sys/capabilities-self
RateLimitQuotasConfigure Post /sys/quotas/config
RateLimitQuotasDelete Delete /sys/quotas/rate-limit/{name}
RateLimitQuotasList Get /sys/quotas/rate-limit/
RateLimitQuotasRead Get /sys/quotas/rate-limit/{name}
RateLimitQuotasReadConfiguration Get /sys/quotas/config
RateLimitQuotasWrite Post /sys/quotas/rate-limit/{name}
RawDelete Delete /sys/raw/{path} Delete the key with given path.
RawList Get /sys/raw/{path}/ Return a list keys for a given path prefix.
RawRead Get /sys/raw/{path} Read the value of the key at the given path.
RawWrite Post /sys/raw/{path} Update the value of the key at the given path.
ReadHealthStatus Get /sys/health Returns the health status of Vault.
ReadInitializationStatus Get /sys/init Returns the initialization status of Vault.
ReadReplicationStatus Get /sys/replication/status
ReadSanitizedConfigurationState Get /sys/config/state/sanitized Return a sanitized version of the Vault server configuration.
ReadWrappingProperties Post /sys/wrapping/lookup Look up wrapping properties for the given token.
RekeyAttemptCancel Delete /sys/rekey/init Cancels any in-progress rekey.
RekeyAttemptInitialize Post /sys/rekey/init Initializes a new rekey attempt.
RekeyAttemptReadProgress Get /sys/rekey/init Reads the configuration and progress of the current rekey attempt.
RekeyAttemptUpdate Post /sys/rekey/update Enter a single unseal key share to progress the rekey of the Vault.
RekeyDeleteBackupKey Delete /sys/rekey/backup Delete the backup copy of PGP-encrypted unseal keys.
RekeyDeleteBackupRecoveryKey Delete /sys/rekey/recovery-key-backup
RekeyReadBackupKey Get /sys/rekey/backup Return the backup copy of PGP-encrypted unseal keys.
RekeyReadBackupRecoveryKey Get /sys/rekey/recovery-key-backup
RekeyVerificationCancel Delete /sys/rekey/verify Cancel any in-progress rekey verification operation.
RekeyVerificationReadProgress Get /sys/rekey/verify Read the configuration and progress of the current rekey verification attempt.
RekeyVerificationUpdate Post /sys/rekey/verify Enter a single new key share to progress the rekey verification operation.
ReloadSubsystem Post /sys/config/reload/{subsystem} Reload the given subsystem
Remount Post /sys/remount Initiate a mount migration
RemountStatus Get /sys/remount/status/{migration_id} Check status of a mount migration
Rewrap Post /sys/wrapping/rewrap
RootTokenGenerationCancel Delete /sys/generate-root/attempt Cancels any in-progress root generation attempt.
RootTokenGenerationInitialize Post /sys/generate-root/attempt Initializes a new root generation attempt.
RootTokenGenerationReadProgress Get /sys/generate-root/attempt Read the configuration and progress of the current root generation attempt.
RootTokenGenerationUpdate Post /sys/generate-root/update Enter a single unseal key share to progress the root generation attempt.
Seal Post /sys/seal Seal the Vault.
SealStatus Get /sys/seal-status Check the seal status of a Vault.
StepDownLeader Post /sys/step-down Cause the node to give up active status.
UiHeadersConfigure Post /sys/config/ui/headers/{header} Configure the values to be returned for the UI header.
UiHeadersDeleteConfiguration Delete /sys/config/ui/headers/{header} Remove a UI header.
UiHeadersList Get /sys/config/ui/headers/ Return a list of configured UI headers.
UiHeadersReadConfiguration Get /sys/config/ui/headers/{header} Return the given UI header's configuration
Unseal Post /sys/unseal Unseal the Vault.
Unwrap Post /sys/wrapping/unwrap
VersionHistory Get /sys/version-history/ Returns map of historical version change entries
Wrap Post /sys/wrapping/wrap

AuditingCalculateHash

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The name of the backend. Cannot be delimited. Example: \"mysql\"
	resp, err := client.System.AuditingCalculateHash(
		context.Background(),
		path,
		schema.AuditingCalculateHashRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The name of the backend. Cannot be delimited. Example: "mysql"

Other Parameters

Name Type Description Notes

auditingCalculateHashRequest | AuditingCalculateHashRequest | |

AuditingCalculateHashResponse

[Back to top] [Back to README]

AuditingDisableDevice

Disable the audit device at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The name of the backend. Cannot be delimited. Example: \"mysql\"
	resp, err := client.System.AuditingDisableDevice(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The name of the backend. Cannot be delimited. Example: "mysql"

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

AuditingDisableRequestHeader

Disable auditing of the given request header.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | 
	resp, err := client.System.AuditingDisableRequestHeader(
		context.Background(),
		header,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

AuditingEnableDevice

Enable a new audit device at the supplied path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The name of the backend. Cannot be delimited. Example: \"mysql\"
	resp, err := client.System.AuditingEnableDevice(
		context.Background(),
		path,
		schema.AuditingEnableDeviceRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The name of the backend. Cannot be delimited. Example: "mysql"

Other Parameters

Name Type Description Notes

auditingEnableDeviceRequest | AuditingEnableDeviceRequest | |

(empty response body)

[Back to top] [Back to README]

AuditingEnableRequestHeader

Enable auditing of a header.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | 
	resp, err := client.System.AuditingEnableRequestHeader(
		context.Background(),
		header,
		schema.AuditingEnableRequestHeaderRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string

Other Parameters

Name Type Description Notes

auditingEnableRequestHeaderRequest | AuditingEnableRequestHeaderRequest | |

(empty response body)

[Back to top] [Back to README]

AuditingListEnabledDevices

List the enabled audit devices.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.AuditingListEnabledDevices(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

AuditingListRequestHeaders

List the request headers that are configured to be audited.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.AuditingListRequestHeaders(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

AuditingListRequestHeadersResponse

[Back to top] [Back to README]

AuditingReadRequestHeaderInformation

List the information for the given request header.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | 
	resp, err := client.System.AuditingReadRequestHeaderInformation(
		context.Background(),
		header,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

AuthDisableMethod

Disable the auth method at the given auth path

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Cannot be delimited. Example: \"user\"
	resp, err := client.System.AuthDisableMethod(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Cannot be delimited. Example: "user"

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

AuthEnableMethod

Enables a new auth method.

After enabling, the auth method can be accessed and configured via the auth path specified as part of the URL. This auth path will be nested under the auth prefix.

For example, enable the "foo" auth method will make it accessible at /auth/foo.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Cannot be delimited. Example: \"user\"
	resp, err := client.System.AuthEnableMethod(
		context.Background(),
		path,
		schema.AuthEnableMethodRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Cannot be delimited. Example: "user"

Other Parameters

Name Type Description Notes

authEnableMethodRequest | AuthEnableMethodRequest | |

(empty response body)

[Back to top] [Back to README]

AuthListEnabledMethods

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.AuthListEnabledMethods(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

AuthReadConfiguration

Read the configuration of the auth engine at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Cannot be delimited. Example: \"user\"
	resp, err := client.System.AuthReadConfiguration(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Cannot be delimited. Example: "user"

Other Parameters

Name Type Description Notes

AuthReadConfigurationResponse

[Back to top] [Back to README]

AuthReadTuningInformation

Reads the given auth path's configuration.

This endpoint requires sudo capability on the final path, but the same functionality can be achieved without sudo via sys/mounts/auth/[auth-path]/tune.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | Tune the configuration parameters for an auth path.
	resp, err := client.System.AuthReadTuningInformation(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string Tune the configuration parameters for an auth path.

Other Parameters

Name Type Description Notes

AuthReadTuningInformationResponse

[Back to top] [Back to README]

AuthTuneConfigurationParameters

Tune configuration parameters for a given auth path.

This endpoint requires sudo capability on the final path, but the same functionality can be achieved without sudo via sys/mounts/auth/[auth-path]/tune.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | Tune the configuration parameters for an auth path.
	resp, err := client.System.AuthTuneConfigurationParameters(
		context.Background(),
		path,
		schema.AuthTuneConfigurationParametersRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string Tune the configuration parameters for an auth path.

Other Parameters

Name Type Description Notes

authTuneConfigurationParametersRequest | AuthTuneConfigurationParametersRequest | |

(empty response body)

[Back to top] [Back to README]

CollectHostInformation

Information about the host instance that this Vault server is running on.

Information about the host instance that this Vault server is running on. The information that gets collected includes host hardware information, and CPU, disk, and memory utilization

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.CollectHostInformation(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

CollectHostInformationResponse

[Back to top] [Back to README]

CollectInFlightRequestInformation

reports in-flight requests

This path responds to the following HTTP methods. GET / Returns a map of in-flight requests.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.CollectInFlightRequestInformation(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

CorsConfigure

Configure the CORS settings.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.CorsConfigure(
		context.Background(),
		schema.CorsConfigureRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
corsConfigureRequest CorsConfigureRequest

(empty response body)

[Back to top] [Back to README]

CorsDeleteConfiguration

Remove any CORS settings.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.CorsDeleteConfiguration(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

CorsReadConfiguration

Return the current CORS settings.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.CorsReadConfiguration(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

CorsReadConfigurationResponse

[Back to top] [Back to README]

Decode

Decodes the encoded token with the otp.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Decode(
		context.Background(),
		schema.DecodeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
decodeRequest DecodeRequest

(empty response body)

[Back to top] [Back to README]

EncryptionKeyConfigureRotation

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.EncryptionKeyConfigureRotation(
		context.Background(),
		schema.EncryptionKeyConfigureRotationRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
encryptionKeyConfigureRotationRequest EncryptionKeyConfigureRotationRequest

(empty response body)

[Back to top] [Back to README]

EncryptionKeyReadRotationConfiguration

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.EncryptionKeyReadRotationConfiguration(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

EncryptionKeyReadRotationConfigurationResponse

[Back to top] [Back to README]

EncryptionKeyRotate

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.EncryptionKeyRotate(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

EncryptionKeyStatus

Provides information about the backend encryption key.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.EncryptionKeyStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

GenerateHash

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.GenerateHash(
		context.Background(),
		schema.GenerateHashRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
generateHashRequest GenerateHashRequest

GenerateHashResponse

[Back to top] [Back to README]

GenerateHashWithAlgorithm

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	urlalgorithm := "urlalgorithm_example" // string | Algorithm to use (POST URL parameter)
	resp, err := client.System.GenerateHashWithAlgorithm(
		context.Background(),
		urlalgorithm,
		schema.GenerateHashWithAlgorithmRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
urlalgorithm string Algorithm to use (POST URL parameter)

Other Parameters

Name Type Description Notes

generateHashWithAlgorithmRequest | GenerateHashWithAlgorithmRequest | |

GenerateHashWithAlgorithmResponse

[Back to top] [Back to README]

GenerateRandom

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.GenerateRandom(
		context.Background(),
		schema.GenerateRandomRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
generateRandomRequest GenerateRandomRequest

GenerateRandomResponse

[Back to top] [Back to README]

GenerateRandomWithBytes

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	urlbytes := "urlbytes_example" // string | The number of bytes to generate (POST URL parameter)
	resp, err := client.System.GenerateRandomWithBytes(
		context.Background(),
		urlbytes,
		schema.GenerateRandomWithBytesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
urlbytes string The number of bytes to generate (POST URL parameter)

Other Parameters

Name Type Description Notes

generateRandomWithBytesRequest | GenerateRandomWithBytesRequest | |

GenerateRandomWithBytesResponse

[Back to top] [Back to README]

GenerateRandomWithSource

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	source := "source_example" // string | Which system to source random data from, ether \"platform\", \"seal\", or \"all\". (defaults to "platform")
	resp, err := client.System.GenerateRandomWithSource(
		context.Background(),
		source,
		schema.GenerateRandomWithSourceRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
source string Which system to source random data from, ether "platform", "seal", or "all". [default to "platform"]

Other Parameters

Name Type Description Notes

generateRandomWithSourceRequest | GenerateRandomWithSourceRequest | |

GenerateRandomWithSourceResponse

[Back to top] [Back to README]

GenerateRandomWithSourceAndBytes

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	source := "source_example" // string | Which system to source random data from, ether \"platform\", \"seal\", or \"all\". (defaults to "platform")
	urlbytes := "urlbytes_example" // string | The number of bytes to generate (POST URL parameter)
	resp, err := client.System.GenerateRandomWithSourceAndBytes(
		context.Background(),
		source,
		urlbytes,
		schema.GenerateRandomWithSourceAndBytesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
source string Which system to source random data from, ether "platform", "seal", or "all". [default to "platform"]
urlbytes string The number of bytes to generate (POST URL parameter)

Other Parameters

Name Type Description Notes

generateRandomWithSourceAndBytesRequest | GenerateRandomWithSourceAndBytesRequest | |

GenerateRandomWithSourceAndBytesResponse

[Back to top] [Back to README]

HaStatus

Check the HA status of a Vault cluster

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.HaStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

HaStatusResponse

[Back to top] [Back to README]

Initialize

Initialize a new Vault.

The Vault must not have been previously initialized. The recovery options, as well as the stored shares option, are only available when using Vault HSM.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Initialize(
		context.Background(),
		schema.InitializeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
initializeRequest InitializeRequest

(empty response body)

[Back to top] [Back to README]

InternalClientActivityConfigure

Enable or disable collection of client count, set retention period, or set default reporting period.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalClientActivityConfigure(
		context.Background(),
		schema.InternalClientActivityConfigureRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
internalClientActivityConfigureRequest InternalClientActivityConfigureRequest

(empty response body)

[Back to top] [Back to README]

InternalClientActivityExport

Report the client count metrics, for this namespace and all child namespaces.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalClientActivityExport(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

InternalClientActivityReadConfiguration

Read the client count tracking configuration.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalClientActivityReadConfiguration(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

InternalClientActivityReportCounts

Report the client count metrics, for this namespace and all child namespaces.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalClientActivityReportCounts(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

InternalClientActivityReportCountsThisMonth

Report the number of clients for this month, for this namespace and all child namespaces.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalClientActivityReportCountsThisMonth(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

InternalCountEntities

Backwards compatibility is not guaranteed for this API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalCountEntities(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalCountEntitiesResponse

[Back to top] [Back to README]

InternalCountRequests

Backwards compatibility is not guaranteed for this API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalCountRequests(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

InternalCountTokens

Backwards compatibility is not guaranteed for this API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalCountTokens(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalCountTokensResponse

[Back to top] [Back to README]

InternalGenerateOpenApiDocument

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	context := "context_example" // string | Context string appended to every operationId
	genericMountPaths := true // bool | Use generic mount paths (defaults to false)
	resp, err := client.System.InternalGenerateOpenApiDocument(
		context.Background(),
		context,
		genericMountPaths,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
context string Context string appended to every operationId
genericMountPaths bool Use generic mount paths [default to false]

(empty response body)

[Back to top] [Back to README]

InternalGenerateOpenApiDocumentWithParameters

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalGenerateOpenApiDocumentWithParameters(
		context.Background(),
		schema.InternalGenerateOpenApiDocumentWithParametersRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
internalGenerateOpenApiDocumentWithParametersRequest InternalGenerateOpenApiDocumentWithParametersRequest

(empty response body)

[Back to top] [Back to README]

InternalInspectRouter

Expose the route entry and mount entry tables present in the router

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	tag := "tag_example" // string | Name of subtree being observed
	resp, err := client.System.InternalInspectRouter(
		context.Background(),
		tag,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
tag string Name of subtree being observed

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

InternalUiListEnabledFeatureFlags

Lists enabled feature flags.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalUiListEnabledFeatureFlags(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalUiListEnabledFeatureFlagsResponse

[Back to top] [Back to README]

InternalUiListEnabledVisibleMounts

Lists all enabled and visible auth and secrets mounts.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalUiListEnabledVisibleMounts(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalUiListEnabledVisibleMountsResponse

[Back to top] [Back to README]

InternalUiListNamespaces

Backwards compatibility is not guaranteed for this API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalUiListNamespaces(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalUiListNamespacesResponse

[Back to top] [Back to README]

InternalUiReadMountInformation

Return information about the given mount.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path of the mount.
	resp, err := client.System.InternalUiReadMountInformation(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path of the mount.

Other Parameters

Name Type Description Notes

InternalUiReadMountInformationResponse

[Back to top] [Back to README]

InternalUiReadResultantAcl

Backwards compatibility is not guaranteed for this API

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.InternalUiReadResultantAcl(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

InternalUiReadResultantAclResponse

[Back to top] [Back to README]

LeaderStatus

Returns the high availability status and current leader instance of Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeaderStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

LeaderStatusResponse

[Back to top] [Back to README]

LeasesCount

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesCount(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

LeasesCountResponse

[Back to top] [Back to README]

LeasesForceRevokeLeaseWithPrefix

Revokes all secrets or tokens generated under a given prefix immediately

Unlike /sys/leases/revoke-prefix, this path ignores backend errors encountered during revocation. This is potentially very dangerous and should only be used in specific emergency situations where errors in the backend or the connected backend service prevent normal revocation.

By ignoring these errors, Vault abdicates responsibility for ensuring that the issued credentials or secrets are properly revoked and/or cleaned up. Access to this endpoint should be tightly controlled.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	prefix := "prefix_example" // string | The path to revoke keys under. Example: \"prod/aws/ops\"
	resp, err := client.System.LeasesForceRevokeLeaseWithPrefix(
		context.Background(),
		prefix,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
prefix string The path to revoke keys under. Example: "prod/aws/ops"

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

LeasesList

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesList(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

LeasesListResponse

[Back to top] [Back to README]

LeasesLookUp

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	prefix := "prefix_example" // string | The path to list leases under. Example: \"aws/creds/deploy\"
	resp, err := client.System.LeasesLookUp(
		context.Background(),
		prefix,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
prefix string The path to list leases under. Example: "aws/creds/deploy"

Other Parameters

Name Type Description Notes

list | string | Must be set to `true` |

LeasesLookUpResponse

[Back to top] [Back to README]

LeasesReadLease

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesReadLease(
		context.Background(),
		schema.LeasesReadLeaseRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
leasesReadLeaseRequest LeasesReadLeaseRequest

LeasesReadLeaseResponse

[Back to top] [Back to README]

LeasesRenewLease

Renews a lease, requesting to extend the lease.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesRenewLease(
		context.Background(),
		schema.LeasesRenewLeaseRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
leasesRenewLeaseRequest LeasesRenewLeaseRequest

(empty response body)

[Back to top] [Back to README]

LeasesRenewLeaseWithId

Renews a lease, requesting to extend the lease.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	urlLeaseId := "urlLeaseId_example" // string | The lease identifier to renew. This is included with a lease.
	resp, err := client.System.LeasesRenewLeaseWithId(
		context.Background(),
		urlLeaseId,
		schema.LeasesRenewLeaseWithIdRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
urlLeaseId string The lease identifier to renew. This is included with a lease.

Other Parameters

Name Type Description Notes

leasesRenewLeaseWithIdRequest | LeasesRenewLeaseWithIdRequest | |

(empty response body)

[Back to top] [Back to README]

LeasesRevokeLease

Revokes a lease immediately.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesRevokeLease(
		context.Background(),
		schema.LeasesRevokeLeaseRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
leasesRevokeLeaseRequest LeasesRevokeLeaseRequest

(empty response body)

[Back to top] [Back to README]

LeasesRevokeLeaseWithId

Revokes a lease immediately.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	urlLeaseId := "urlLeaseId_example" // string | The lease identifier to renew. This is included with a lease.
	resp, err := client.System.LeasesRevokeLeaseWithId(
		context.Background(),
		urlLeaseId,
		schema.LeasesRevokeLeaseWithIdRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
urlLeaseId string The lease identifier to renew. This is included with a lease.

Other Parameters

Name Type Description Notes

leasesRevokeLeaseWithIdRequest | LeasesRevokeLeaseWithIdRequest | |

(empty response body)

[Back to top] [Back to README]

LeasesRevokeLeaseWithPrefix

Revokes all secrets (via a lease ID prefix) or tokens (via the tokens' path property) generated under a given prefix immediately.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	prefix := "prefix_example" // string | The path to revoke keys under. Example: \"prod/aws/ops\"
	resp, err := client.System.LeasesRevokeLeaseWithPrefix(
		context.Background(),
		prefix,
		schema.LeasesRevokeLeaseWithPrefixRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
prefix string The path to revoke keys under. Example: "prod/aws/ops"

Other Parameters

Name Type Description Notes

leasesRevokeLeaseWithPrefixRequest | LeasesRevokeLeaseWithPrefixRequest | |

(empty response body)

[Back to top] [Back to README]

LeasesTidy

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LeasesTidy(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

ListExperimentalFeatures

Returns the available and enabled experiments

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ListExperimentalFeatures(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

LockedUsersList

Report the locked user count metrics, for this namespace and all child namespaces.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LockedUsersList(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

LockedUsersUnlock

Unlocks the user with given mount_accessor and alias_identifier

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	aliasIdentifier := "aliasIdentifier_example" // string | It is the name of the alias (user). For example, if the alias belongs to userpass backend, the name should be a valid username within userpass auth method. If the alias belongs to an approle auth method, the name should be a valid RoleID
	mountAccessor := "mountAccessor_example" // string | MountAccessor is the identifier of the mount entry to which the user belongs
	resp, err := client.System.LockedUsersUnlock(
		context.Background(),
		aliasIdentifier,
		mountAccessor,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
aliasIdentifier string It is the name of the alias (user). For example, if the alias belongs to userpass backend, the name should be a valid username within userpass auth method. If the alias belongs to an approle auth method, the name should be a valid RoleID
mountAccessor string MountAccessor is the identifier of the mount entry to which the user belongs

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

LoggersReadVerbosityLevel

Read the log level for all existing loggers.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LoggersReadVerbosityLevel(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

LoggersReadVerbosityLevelFor

Read the log level for a single logger.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the logger to be modified.
	resp, err := client.System.LoggersReadVerbosityLevelFor(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the logger to be modified.

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

LoggersRevertVerbosityLevel

Revert the all loggers to use log level provided in config.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LoggersRevertVerbosityLevel(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

LoggersRevertVerbosityLevelFor

Revert a single logger to use log level provided in config.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the logger to be modified.
	resp, err := client.System.LoggersRevertVerbosityLevelFor(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the logger to be modified.

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

LoggersUpdateVerbosityLevel

Modify the log level for all existing loggers.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.LoggersUpdateVerbosityLevel(
		context.Background(),
		schema.LoggersUpdateVerbosityLevelRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
loggersUpdateVerbosityLevelRequest LoggersUpdateVerbosityLevelRequest

(empty response body)

[Back to top] [Back to README]

LoggersUpdateVerbosityLevelFor

Modify the log level of a single logger.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the logger to be modified.
	resp, err := client.System.LoggersUpdateVerbosityLevelFor(
		context.Background(),
		name,
		schema.LoggersUpdateVerbosityLevelForRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the logger to be modified.

Other Parameters

Name Type Description Notes

loggersUpdateVerbosityLevelForRequest | LoggersUpdateVerbosityLevelForRequest | |

(empty response body)

[Back to top] [Back to README]

Metrics

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	format := "format_example" // string | Format to export metrics into. Currently accepts only \"prometheus\".
	resp, err := client.System.Metrics(
		context.Background(),
		format,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
format string Format to export metrics into. Currently accepts only "prometheus".

(empty response body)

[Back to top] [Back to README]

MfaValidate

Validates the login for the given MFA methods. Upon successful validation, it returns an auth response containing the client token

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.MfaValidate(
		context.Background(),
		schema.MfaValidateRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
mfaValidateRequest MfaValidateRequest

(empty response body)

[Back to top] [Back to README]

Monitor

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	logFormat := "logFormat_example" // string | Output format of logs. Supported values are \"standard\" and \"json\". The default is \"standard\". (defaults to "standard")
	logLevel := "logLevel_example" // string | Log level to view system logs at. Currently supported values are \"trace\", \"debug\", \"info\", \"warn\", \"error\".
	resp, err := client.System.Monitor(
		context.Background(),
		logFormat,
		logLevel,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
logFormat string Output format of logs. Supported values are "standard" and "json". The default is "standard". [default to "standard"]
logLevel string Log level to view system logs at. Currently supported values are "trace", "debug", "info", "warn", "error".

(empty response body)

[Back to top] [Back to README]

MountsDisableSecretsEngine

Disable the mount point specified at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Example: \"aws/east\"
	resp, err := client.System.MountsDisableSecretsEngine(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Example: "aws/east"

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

MountsEnableSecretsEngine

Enable a new secrets engine at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Example: \"aws/east\"
	resp, err := client.System.MountsEnableSecretsEngine(
		context.Background(),
		path,
		schema.MountsEnableSecretsEngineRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Example: "aws/east"

Other Parameters

Name Type Description Notes

mountsEnableSecretsEngineRequest | MountsEnableSecretsEngineRequest | |

(empty response body)

[Back to top] [Back to README]

MountsListSecretsEngines

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.MountsListSecretsEngines(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

MountsReadConfiguration

Read the configuration of the secret engine at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Example: \"aws/east\"
	resp, err := client.System.MountsReadConfiguration(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Example: "aws/east"

Other Parameters

Name Type Description Notes

MountsReadConfigurationResponse

[Back to top] [Back to README]

MountsReadTuningInformation

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Example: \"aws/east\"
	resp, err := client.System.MountsReadTuningInformation(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Example: "aws/east"

Other Parameters

Name Type Description Notes

MountsReadTuningInformationResponse

[Back to top] [Back to README]

MountsTuneConfigurationParameters

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | The path to mount to. Example: \"aws/east\"
	resp, err := client.System.MountsTuneConfigurationParameters(
		context.Background(),
		path,
		schema.MountsTuneConfigurationParametersRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string The path to mount to. Example: "aws/east"

Other Parameters

Name Type Description Notes

mountsTuneConfigurationParametersRequest | MountsTuneConfigurationParametersRequest | |

(empty response body)

[Back to top] [Back to README]

PluginsCatalogListPlugins

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PluginsCatalogListPlugins(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

PluginsCatalogListPluginsResponse

[Back to top] [Back to README]

PluginsCatalogListPluginsWithType

List the plugins in the catalog.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	type_ := "type__example" // string | The type of the plugin, may be auth, secret, or database
	resp, err := client.System.PluginsCatalogListPluginsWithType(
		context.Background(),
		type_,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
type_ string The type of the plugin, may be auth, secret, or database

Other Parameters

Name Type Description Notes

list | string | Must be set to `true` |

PluginsCatalogListPluginsWithTypeResponse

[Back to top] [Back to README]

PluginsCatalogReadPluginConfiguration

Return the configuration data for the plugin with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	resp, err := client.System.PluginsCatalogReadPluginConfiguration(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin

Other Parameters

Name Type Description Notes

PluginsCatalogReadPluginConfigurationResponse

[Back to top] [Back to README]

PluginsCatalogReadPluginConfigurationWithType

Return the configuration data for the plugin with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	type_ := "type__example" // string | The type of the plugin, may be auth, secret, or database
	resp, err := client.System.PluginsCatalogReadPluginConfigurationWithType(
		context.Background(),
		name,
		type_,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin
type_ string The type of the plugin, may be auth, secret, or database

Other Parameters

Name Type Description Notes

PluginsCatalogReadPluginConfigurationWithTypeResponse

[Back to top] [Back to README]

PluginsCatalogRegisterPlugin

Register a new plugin, or updates an existing one with the supplied name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	resp, err := client.System.PluginsCatalogRegisterPlugin(
		context.Background(),
		name,
		schema.PluginsCatalogRegisterPluginRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin

Other Parameters

Name Type Description Notes

pluginsCatalogRegisterPluginRequest | PluginsCatalogRegisterPluginRequest | |

(empty response body)

[Back to top] [Back to README]

PluginsCatalogRegisterPluginWithType

Register a new plugin, or updates an existing one with the supplied name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	type_ := "type__example" // string | The type of the plugin, may be auth, secret, or database
	resp, err := client.System.PluginsCatalogRegisterPluginWithType(
		context.Background(),
		name,
		type_,
		schema.PluginsCatalogRegisterPluginWithTypeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin
type_ string The type of the plugin, may be auth, secret, or database

Other Parameters

Name Type Description Notes

pluginsCatalogRegisterPluginWithTypeRequest | PluginsCatalogRegisterPluginWithTypeRequest | |

(empty response body)

[Back to top] [Back to README]

PluginsCatalogRemovePlugin

Remove the plugin with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	resp, err := client.System.PluginsCatalogRemovePlugin(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

PluginsCatalogRemovePluginWithType

Remove the plugin with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin
	type_ := "type__example" // string | The type of the plugin, may be auth, secret, or database
	resp, err := client.System.PluginsCatalogRemovePluginWithType(
		context.Background(),
		name,
		type_,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin
type_ string The type of the plugin, may be auth, secret, or database

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

PluginsReloadBackends

Reload mounted plugin backends.

Either the plugin name (plugin) or the desired plugin backend mounts (mounts) must be provided, but not both. In the case that the plugin name is provided, all mounted paths that use that plugin backend will be reloaded. If (scope) is provided and is (global), the plugin(s) are reloaded globally.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PluginsReloadBackends(
		context.Background(),
		schema.PluginsReloadBackendsRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
pluginsReloadBackendsRequest PluginsReloadBackendsRequest

PluginsReloadBackendsResponse

[Back to top] [Back to README]

PluginsRuntimesCatalogListPluginsRuntimes

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PluginsRuntimesCatalogListPluginsRuntimes(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

PluginsRuntimesCatalogListPluginsRuntimesResponse

[Back to top] [Back to README]

PluginsRuntimesCatalogReadPluginRuntimeConfiguration

Return the configuration data for the plugin runtime with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin runtime
	type_ := "type__example" // string | The type of the plugin runtime
	resp, err := client.System.PluginsRuntimesCatalogReadPluginRuntimeConfiguration(
		context.Background(),
		name,
		type_,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin runtime
type_ string The type of the plugin runtime

Other Parameters

Name Type Description Notes

PluginsRuntimesCatalogReadPluginRuntimeConfigurationResponse

[Back to top] [Back to README]

PluginsRuntimesCatalogRegisterPluginRuntime

Register a new plugin runtime, or updates an existing one with the supplied name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin runtime
	type_ := "type__example" // string | The type of the plugin runtime
	resp, err := client.System.PluginsRuntimesCatalogRegisterPluginRuntime(
		context.Background(),
		name,
		type_,
		schema.PluginsRuntimesCatalogRegisterPluginRuntimeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin runtime
type_ string The type of the plugin runtime

Other Parameters

Name Type Description Notes

pluginsRuntimesCatalogRegisterPluginRuntimeRequest | PluginsRuntimesCatalogRegisterPluginRuntimeRequest | |

(empty response body)

[Back to top] [Back to README]

PluginsRuntimesCatalogRemovePluginRuntime

Remove the plugin runtime with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the plugin runtime
	type_ := "type__example" // string | The type of the plugin runtime
	resp, err := client.System.PluginsRuntimesCatalogRemovePluginRuntime(
		context.Background(),
		name,
		type_,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the plugin runtime
type_ string The type of the plugin runtime

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

PoliciesDeleteAclPolicy

Delete the ACL policy with the given name.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the policy. Example: \"ops\"
	resp, err := client.System.PoliciesDeleteAclPolicy(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the policy. Example: "ops"

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

PoliciesDeletePasswordPolicy

Delete a password policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the password policy.
	resp, err := client.System.PoliciesDeletePasswordPolicy(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the password policy.

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

PoliciesGeneratePasswordFromPasswordPolicy

Generate a password from an existing password policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the password policy.
	resp, err := client.System.PoliciesGeneratePasswordFromPasswordPolicy(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the password policy.

Other Parameters

Name Type Description Notes

PoliciesGeneratePasswordFromPasswordPolicyResponse

[Back to top] [Back to README]

PoliciesListAclPolicies

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PoliciesListAclPolicies(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

PoliciesListAclPoliciesResponse

[Back to top] [Back to README]

PoliciesListPasswordPolicies

List the existing password policies.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PoliciesListPasswordPolicies(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

StandardListResponse

[Back to top] [Back to README]

PoliciesReadAclPolicy

Retrieve information about the named ACL policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the policy. Example: \"ops\"
	resp, err := client.System.PoliciesReadAclPolicy(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the policy. Example: "ops"

Other Parameters

Name Type Description Notes

PoliciesReadAclPolicyResponse

[Back to top] [Back to README]

PoliciesReadPasswordPolicy

Retrieve an existing password policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the password policy.
	resp, err := client.System.PoliciesReadPasswordPolicy(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the password policy.

Other Parameters

Name Type Description Notes

PoliciesReadPasswordPolicyResponse

[Back to top] [Back to README]

PoliciesWriteAclPolicy

Add a new or update an existing ACL policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the policy. Example: \"ops\"
	resp, err := client.System.PoliciesWriteAclPolicy(
		context.Background(),
		name,
		schema.PoliciesWriteAclPolicyRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the policy. Example: "ops"

Other Parameters

Name Type Description Notes

policiesWriteAclPolicyRequest | PoliciesWriteAclPolicyRequest | |

(empty response body)

[Back to top] [Back to README]

PoliciesWritePasswordPolicy

Add a new or update an existing password policy.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | The name of the password policy.
	resp, err := client.System.PoliciesWritePasswordPolicy(
		context.Background(),
		name,
		schema.PoliciesWritePasswordPolicyRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string The name of the password policy.

Other Parameters

Name Type Description Notes

policiesWritePasswordPolicyRequest | PoliciesWritePasswordPolicyRequest | |

(empty response body)

[Back to top] [Back to README]

PprofBlocking

Returns stack traces that led to blocking on synchronization primitives

Returns stack traces that led to blocking on synchronization primitives

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofBlocking(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofCommandLine

Returns the running program's command line.

Returns the running program's command line, with arguments separated by NUL bytes.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofCommandLine(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofCpuProfile

Returns a pprof-formatted cpu profile payload.

Returns a pprof-formatted cpu profile payload. Profiling lasts for duration specified in seconds GET parameter, or for 30 seconds if not specified.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofCpuProfile(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofExecutionTrace

Returns the execution trace in binary form.

Returns the execution trace in binary form. Tracing lasts for duration specified in seconds GET parameter, or for 1 second if not specified.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofExecutionTrace(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofGoroutines

Returns stack traces of all current goroutines.

Returns stack traces of all current goroutines.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofGoroutines(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofIndex

Returns an HTML page listing the available profiles.

Returns an HTML page listing the available profiles. This should be mainly accessed via browsers or applications that can render pages.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofIndex(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofMemoryAllocations

Returns a sampling of all past memory allocations.

Returns a sampling of all past memory allocations.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofMemoryAllocations(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofMemoryAllocationsLive

Returns a sampling of memory allocations of live object.

Returns a sampling of memory allocations of live object.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofMemoryAllocationsLive(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofMutexes

Returns stack traces of holders of contended mutexes

Returns stack traces of holders of contended mutexes

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofMutexes(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofSymbols

Returns the program counters listed in the request.

Returns the program counters listed in the request.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofSymbols(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

PprofThreadCreations

Returns stack traces that led to the creation of new OS threads

Returns stack traces that led to the creation of new OS threads

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.PprofThreadCreations(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

QueryTokenAccessorCapabilities

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.QueryTokenAccessorCapabilities(
		context.Background(),
		schema.QueryTokenAccessorCapabilitiesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
queryTokenAccessorCapabilitiesRequest QueryTokenAccessorCapabilitiesRequest

(empty response body)

[Back to top] [Back to README]

QueryTokenCapabilities

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.QueryTokenCapabilities(
		context.Background(),
		schema.QueryTokenCapabilitiesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
queryTokenCapabilitiesRequest QueryTokenCapabilitiesRequest

(empty response body)

[Back to top] [Back to README]

QueryTokenSelfCapabilities

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.QueryTokenSelfCapabilities(
		context.Background(),
		schema.QueryTokenSelfCapabilitiesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
queryTokenSelfCapabilitiesRequest QueryTokenSelfCapabilitiesRequest

(empty response body)

[Back to top] [Back to README]

RateLimitQuotasConfigure

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RateLimitQuotasConfigure(
		context.Background(),
		schema.RateLimitQuotasConfigureRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rateLimitQuotasConfigureRequest RateLimitQuotasConfigureRequest

(empty response body)

[Back to top] [Back to README]

RateLimitQuotasDelete

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | Name of the quota rule.
	resp, err := client.System.RateLimitQuotasDelete(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string Name of the quota rule.

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

RateLimitQuotasList

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RateLimitQuotasList(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

StandardListResponse

[Back to top] [Back to README]

RateLimitQuotasRead

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | Name of the quota rule.
	resp, err := client.System.RateLimitQuotasRead(
		context.Background(),
		name,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string Name of the quota rule.

Other Parameters

Name Type Description Notes

RateLimitQuotasReadResponse

[Back to top] [Back to README]

RateLimitQuotasReadConfiguration

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RateLimitQuotasReadConfiguration(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RateLimitQuotasReadConfigurationResponse

[Back to top] [Back to README]

RateLimitQuotasWrite

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	name := "name_example" // string | Name of the quota rule.
	resp, err := client.System.RateLimitQuotasWrite(
		context.Background(),
		name,
		schema.RateLimitQuotasWriteRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
name string Name of the quota rule.

Other Parameters

Name Type Description Notes

rateLimitQuotasWriteRequest | RateLimitQuotasWriteRequest | |

(empty response body)

[Back to top] [Back to README]

RawDelete

Delete the key with given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | 
	resp, err := client.System.RawDelete(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

RawList

Return a list keys for a given path prefix.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | 
	resp, err := client.System.RawList(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string

Other Parameters

Name Type Description Notes

list | string | Must be set to `true` |

StandardListResponse

[Back to top] [Back to README]

RawRead

Read the value of the key at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | 
	resp, err := client.System.RawRead(
		context.Background(),
		path,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string

Other Parameters

Name Type Description Notes

RawReadResponse

[Back to top] [Back to README]

RawWrite

Update the value of the key at the given path.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	path := "path_example" // string | 
	resp, err := client.System.RawWrite(
		context.Background(),
		path,
		schema.RawWriteRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
path string

Other Parameters

Name Type Description Notes

rawWriteRequest | RawWriteRequest | |

(empty response body)

[Back to top] [Back to README]

ReadHealthStatus

Returns the health status of Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ReadHealthStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

ReadInitializationStatus

Returns the initialization status of Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ReadInitializationStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

ReadReplicationStatus

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ReadReplicationStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

ReadSanitizedConfigurationState

Return a sanitized version of the Vault server configuration.

The sanitized output strips configuration values in the storage, HA storage, and seals stanzas, which may contain sensitive values such as API tokens. It also removes any token or secret fields in other stanzas, such as the circonus_api_token from telemetry.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ReadSanitizedConfigurationState(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

ReadWrappingProperties

Look up wrapping properties for the given token.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.ReadWrappingProperties(
		context.Background(),
		schema.ReadWrappingPropertiesRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
readWrappingPropertiesRequest ReadWrappingPropertiesRequest

ReadWrappingPropertiesResponse

[Back to top] [Back to README]

RekeyAttemptCancel

Cancels any in-progress rekey.

This clears the rekey settings as well as any progress made. This must be called to change the parameters of the rekey. Note: verification is still a part of a rekey. If rekeying is canceled during the verification flow, the current unseal keys remain valid.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyAttemptCancel(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

RekeyAttemptInitialize

Initializes a new rekey attempt.

Only a single rekey attempt can take place at a time, and changing the parameters of a rekey requires canceling and starting a new rekey, which will also provide a new nonce.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyAttemptInitialize(
		context.Background(),
		schema.RekeyAttemptInitializeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rekeyAttemptInitializeRequest RekeyAttemptInitializeRequest

RekeyAttemptInitializeResponse

[Back to top] [Back to README]

RekeyAttemptReadProgress

Reads the configuration and progress of the current rekey attempt.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyAttemptReadProgress(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RekeyAttemptReadProgressResponse

[Back to top] [Back to README]

RekeyAttemptUpdate

Enter a single unseal key share to progress the rekey of the Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyAttemptUpdate(
		context.Background(),
		schema.RekeyAttemptUpdateRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rekeyAttemptUpdateRequest RekeyAttemptUpdateRequest

RekeyAttemptUpdateResponse

[Back to top] [Back to README]

RekeyDeleteBackupKey

Delete the backup copy of PGP-encrypted unseal keys.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyDeleteBackupKey(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

RekeyDeleteBackupRecoveryKey

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyDeleteBackupRecoveryKey(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

RekeyReadBackupKey

Return the backup copy of PGP-encrypted unseal keys.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyReadBackupKey(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RekeyReadBackupKeyResponse

[Back to top] [Back to README]

RekeyReadBackupRecoveryKey

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyReadBackupRecoveryKey(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RekeyReadBackupRecoveryKeyResponse

[Back to top] [Back to README]

RekeyVerificationCancel

Cancel any in-progress rekey verification operation.

This clears any progress made and resets the nonce. Unlike a DELETE against sys/rekey/init, this only resets the current verification operation, not the entire rekey atttempt.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyVerificationCancel(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RekeyVerificationCancelResponse

[Back to top] [Back to README]

RekeyVerificationReadProgress

Read the configuration and progress of the current rekey verification attempt.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyVerificationReadProgress(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RekeyVerificationReadProgressResponse

[Back to top] [Back to README]

RekeyVerificationUpdate

Enter a single new key share to progress the rekey verification operation.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RekeyVerificationUpdate(
		context.Background(),
		schema.RekeyVerificationUpdateRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rekeyVerificationUpdateRequest RekeyVerificationUpdateRequest

RekeyVerificationUpdateResponse

[Back to top] [Back to README]

ReloadSubsystem

Reload the given subsystem

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	subsystem := "subsystem_example" // string | 
	resp, err := client.System.ReloadSubsystem(
		context.Background(),
		subsystem,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
subsystem string

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

Remount

Initiate a mount migration

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Remount(
		context.Background(),
		schema.RemountRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
remountRequest RemountRequest

RemountResponse

[Back to top] [Back to README]

RemountStatus

Check status of a mount migration

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	migrationId := "migrationId_example" // string | The ID of the migration operation
	resp, err := client.System.RemountStatus(
		context.Background(),
		migrationId,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
migrationId string The ID of the migration operation

Other Parameters

Name Type Description Notes

RemountStatusResponse

[Back to top] [Back to README]

Rewrap

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Rewrap(
		context.Background(),
		schema.RewrapRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rewrapRequest RewrapRequest

(empty response body)

[Back to top] [Back to README]

RootTokenGenerationCancel

Cancels any in-progress root generation attempt.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RootTokenGenerationCancel(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

RootTokenGenerationInitialize

Initializes a new root generation attempt.

Only a single root generation attempt can take place at a time. One (and only one) of otp or pgp_key are required.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RootTokenGenerationInitialize(
		context.Background(),
		schema.RootTokenGenerationInitializeRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rootTokenGenerationInitializeRequest RootTokenGenerationInitializeRequest

RootTokenGenerationInitializeResponse

[Back to top] [Back to README]

RootTokenGenerationReadProgress

Read the configuration and progress of the current root generation attempt.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RootTokenGenerationReadProgress(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

RootTokenGenerationReadProgressResponse

[Back to top] [Back to README]

RootTokenGenerationUpdate

Enter a single unseal key share to progress the root generation attempt.

If the threshold number of unseal key shares is reached, Vault will complete the root generation and issue the new token. Otherwise, this API must be called multiple times until that threshold is met. The attempt nonce must be provided with each call.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.RootTokenGenerationUpdate(
		context.Background(),
		schema.RootTokenGenerationUpdateRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
rootTokenGenerationUpdateRequest RootTokenGenerationUpdateRequest

RootTokenGenerationUpdateResponse

[Back to top] [Back to README]

Seal

Seal the Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Seal(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

SealStatus

Check the seal status of a Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.SealStatus(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

SealStatusResponse

[Back to top] [Back to README]

StepDownLeader

Cause the node to give up active status.

This endpoint forces the node to give up active status. If the node does not have active status, this endpoint does nothing. Note that the node will sleep for ten seconds before attempting to grab the active lock again, but if no standby nodes grab the active lock in the interim, the same node may become the active node again.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.StepDownLeader(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

This endpoint does not require any parameters.

Other Parameters

(empty response body)

[Back to top] [Back to README]

UiHeadersConfigure

Configure the values to be returned for the UI header.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | The name of the header.
	resp, err := client.System.UiHeadersConfigure(
		context.Background(),
		header,
		schema.UiHeadersConfigureRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string The name of the header.

Other Parameters

Name Type Description Notes

uiHeadersConfigureRequest | UiHeadersConfigureRequest | |

(empty response body)

[Back to top] [Back to README]

UiHeadersDeleteConfiguration

Remove a UI header.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | The name of the header.
	resp, err := client.System.UiHeadersDeleteConfiguration(
		context.Background(),
		header,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string The name of the header.

Other Parameters

Name Type Description Notes

(empty response body)

[Back to top] [Back to README]

UiHeadersList

Return a list of configured UI headers.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.UiHeadersList(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

UiHeadersListResponse

[Back to top] [Back to README]

UiHeadersReadConfiguration

Return the given UI header's configuration

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	header := "header_example" // string | The name of the header.
	resp, err := client.System.UiHeadersReadConfiguration(
		context.Background(),
		header,
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for request cancellation
header string The name of the header.

Other Parameters

Name Type Description Notes

UiHeadersReadConfigurationResponse

[Back to top] [Back to README]

Unseal

Unseal the Vault.

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Unseal(
		context.Background(),
		schema.UnsealRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
unsealRequest UnsealRequest

UnsealResponse

[Back to top] [Back to README]

Unwrap

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
	"github.com/hashicorp/vault-client-go/schema"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Unwrap(
		context.Background(),
		schema.UnwrapRequest{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
unwrapRequest UnwrapRequest

(empty response body)

[Back to top] [Back to README]

VersionHistory

Returns map of historical version change entries

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.VersionHistory(
		context.Background(),
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
list string Must be set to `true`

VersionHistoryResponse

[Back to top] [Back to README]

Wrap

Example

package main

import (
	"context"
	"log"
	"os"

	"github.com/hashicorp/vault-client-go"
)

func main() {
	client, err := vault.New(
		vault.WithAddress("http://127.0.0.1:8200"),
	)
	if err != nil {
		log.Fatal(err)
	}

	// TODO: authenticate if necessary (see the top-level README.md)

	resp, err := client.System.Wrap(
		context.Background(),
		map[string]interface{}{
			// populate request parameters
		},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp.Data)
}

Path Parameters

Other Parameters

Name Type Description Notes
requestBody map[string]interface{}

(empty response body)

[Back to top] [Back to README]