Documentation
¶
Overview ¶
Package awscommons contains routines for interacting with AWS. Meant to provide high level interfaces used throughout various Gruntwork CLIs. NOTE: The routines in this package are adapted for aws-sdk-go-v2, not V1.
Index ¶
- Constants
- func GetSecretsManagerMetadata(opts *Options, secretID string) (*secretsmanager.DescribeSecretOutput, error)
- func GetSecretsManagerSecretString(opts *Options, arn string) (string, error)
- func NewDefaultConfig(opts *Options) (aws.Config, error)
- func NewSecretsManagerClient(opts *Options) (*secretsmanager.Client, error)
- func SecretsManagerEntryExists(opts *Options, arn string) (bool, error)
- type Options
Constants ¶
const (
DefaultRegion = "us-east-1"
)
Variables ¶
This section is empty.
Functions ¶
func GetSecretsManagerMetadata ¶
func GetSecretsManagerMetadata(opts *Options, secretID string) (*secretsmanager.DescribeSecretOutput, error)
GetSecretsManagerMetadata returns the metadata of the Secrets Manager entry with the given ID.
func GetSecretsManagerSecretString ¶
GetSecretsManagerSecretString will return the secret value stored at the given Secrets Manager ARN.
func NewDefaultConfig ¶
NewDefaultConfig will retrieve a new authenticated AWS config using SDK default credentials. This config can be used to setup new AWS service clients.
func NewSecretsManagerClient ¶
func NewSecretsManagerClient(opts *Options) (*secretsmanager.Client, error)
NewSecretsManagerClient will return a new AWS SDK client for interacting with AWS Secrets Manager.
func SecretsManagerEntryExists ¶
SecretsManagerEntryExists returns whether or not the SecretsManager Entry with the given ARN exists. This will return an error if it exists, but is not accessible due to permission issues, or if there is an authentication issue.
Types ¶
type Options ¶
Options represents all the parameters necessary for setting up authentication credentials with AWS.
func NewOptions ¶
NewOptions will create a new aws.Options struct that provides reasonable defaults for unspecified values.