credentials

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const AWSCredentialsTemplate = `` /* 189-byte string literal not displayed */

AWSCredentialsTemplate generates an AWS credentials file that can be loaded by the various SDKs. nolint:gosec

View Source
const AWSDefaultRegion = "us-east-1"

AWSDefaultRegion is the default AWS region.

Variables

View Source
var ErrNoAWSRegionConfigured = errors.New("no AWS region configured. Use --region or set AWS_REGION or DEFAULT_AWS_REGION environment variable")

ErrNoAWSRegionConfigured is an error singleton for when no AWS region is configured.

Functions

func ResolveRegion

func ResolveRegion(explicitRegion string) (string, error)

ResolveRegion will attempt to resolve an AWS region based on the customer's configuration.

Types

type AWSCredentials

type AWSCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	Region          string
}

AWSCredentials defines the specs for AWS credentials.

func NewAWSCredentialFromDefaultChain

func NewAWSCredentialFromDefaultChain(region string) (*AWSCredentials, error)

NewAWSCredentialFromDefaultChain will create a new credential provider chain from the default chain.

func (AWSCredentials) RenderAWSDefaultProfile

func (c AWSCredentials) RenderAWSDefaultProfile() (string, error)

RenderAWSDefaultProfile will render the AWS default profile.

func (AWSCredentials) RenderBase64EncodedAWSDefaultProfile

func (c AWSCredentials) RenderBase64EncodedAWSDefaultProfile() (string, error)

RenderBase64EncodedAWSDefaultProfile will render the AWS default profile, encoded in base 64.

Jump to

Keyboard shortcuts

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