secretsmanager

package
v1.33.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package secretsmanager provides a client to make API requests to AWS Secrets Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DescribeSecretOutput added in v1.16.0

type DescribeSecretOutput struct {
	Name        *string
	CreatedDate *time.Time
	Tags        []*secretsmanager.Tag
}

DescribeSecretOutput is the output returned by DescribeSecret.

type ErrSecretAlreadyExists

type ErrSecretAlreadyExists struct {
	// contains filtered or unexported fields
}

ErrSecretAlreadyExists occurs if a secret with the same name already exists.

func (*ErrSecretAlreadyExists) Error

func (err *ErrSecretAlreadyExists) Error() string

type ErrSecretNotFound added in v1.16.0

type ErrSecretNotFound struct {
	// contains filtered or unexported fields
}

ErrSecretNotFound occurs if a secret with the given name does not exist.

func (*ErrSecretNotFound) Error added in v1.16.0

func (err *ErrSecretNotFound) Error() string

type SecretsManager

type SecretsManager struct {
	// contains filtered or unexported fields
}

SecretsManager wraps the AWS SecretManager client.

func New

New returns a SecretsManager configured against the input session.

func (*SecretsManager) CreateSecret

func (s *SecretsManager) CreateSecret(secretName, secretString string) (string, error)

CreateSecret creates a secret using the default KMS key "aws/secretmanager" to encrypt the secret and returns its ARN.

func (*SecretsManager) DeleteSecret

func (s *SecretsManager) DeleteSecret(secretName string) error

DeleteSecret force removes the secret from SecretsManager.

func (*SecretsManager) DescribeSecret added in v1.16.0

func (s *SecretsManager) DescribeSecret(secretName string) (*DescribeSecretOutput, error)

DescribeSecret retrieves the details of a secret.

func (*SecretsManager) GetSecretValue added in v1.29.1

func (s *SecretsManager) GetSecretValue(ctx context.Context, name string) (string, error)

GetSecretValue retrieves the value of a secret from AWS Secrets Manager. It takes the name of the secret as input and returns the corresponding value as a string.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL