config

package
v2.0.0-beta.52 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APNInfo

type APNInfo struct {
	PartnerName string
	Products    []UserAgentProduct
}

func (APNInfo) BuildUserAgentString

func (apn APNInfo) BuildUserAgentString() string

Builds the user-agent string for APN

type AssumeRole

type AssumeRole struct {
	RoleARN           string
	Duration          time.Duration
	ExternalID        string
	Policy            string
	PolicyARNs        []string
	SessionName       string
	SourceIdentity    string
	Tags              map[string]string
	TransitiveTagKeys []string
}

type AssumeRoleWithWebIdentity

type AssumeRoleWithWebIdentity struct {
	RoleARN              string
	Duration             time.Duration
	Policy               string
	PolicyARNs           []string
	SessionName          string
	WebIdentityToken     string
	WebIdentityTokenFile string
}

func (AssumeRoleWithWebIdentity) GetIdentityToken

func (c AssumeRoleWithWebIdentity) GetIdentityToken() ([]byte, error)

Implements `stscreds.IdentityTokenRetriever`

func (AssumeRoleWithWebIdentity) HasValidTokenSource

func (c AssumeRoleWithWebIdentity) HasValidTokenSource() bool

type CannotAssumeRoleError

type CannotAssumeRoleError struct {
	Config *Config
	// contains filtered or unexported fields
}

CannotAssumeRoleError occurs when AssumeRole cannot complete.

func (CannotAssumeRoleError) Detail

func (e CannotAssumeRoleError) Detail() string

func (CannotAssumeRoleError) Equal

func (e CannotAssumeRoleError) Equal(other diag.Diagnostic) bool

func (CannotAssumeRoleError) Err

func (e CannotAssumeRoleError) Err() error

func (CannotAssumeRoleError) Severity

func (e CannotAssumeRoleError) Severity() diag.Severity

func (CannotAssumeRoleError) Summary

func (e CannotAssumeRoleError) Summary() string

type CannotAssumeRoleWithWebIdentityError

type CannotAssumeRoleWithWebIdentityError struct {
	Config *Config
	// contains filtered or unexported fields
}

CannotAssumeRoleWithWebIdentityError occurs when AssumeRoleWithWebIdentity cannot complete.

func (CannotAssumeRoleWithWebIdentityError) Detail

func (CannotAssumeRoleWithWebIdentityError) Equal

func (CannotAssumeRoleWithWebIdentityError) Err

func (CannotAssumeRoleWithWebIdentityError) Severity

func (CannotAssumeRoleWithWebIdentityError) Summary

type Config

type Config struct {
	AccessKey                      string
	AllowedAccountIds              []string
	APNInfo                        *APNInfo
	AssumeRole                     *AssumeRole
	AssumeRoleWithWebIdentity      *AssumeRoleWithWebIdentity
	CallerDocumentationURL         string
	CallerName                     string
	CustomCABundle                 string
	EC2MetadataServiceEnableState  imds.ClientEnableState
	EC2MetadataServiceEndpoint     string
	EC2MetadataServiceEndpointMode string
	ForbiddenAccountIds            []string
	HTTPClient                     *http.Client
	HTTPProxy                      *string
	HTTPSProxy                     *string
	IamEndpoint                    string
	Insecure                       bool
	Logger                         logging.Logger
	MaxBackoff                     time.Duration
	MaxRetries                     int
	NoProxy                        string
	Profile                        string
	HTTPProxyMode                  ProxyMode
	Region                         string
	RetryMode                      aws.RetryMode
	SecretKey                      string
	SharedCredentialsFiles         []string
	SharedConfigFiles              []string
	SkipCredsValidation            bool
	SkipRequestingAccountId        bool
	SsoEndpoint                    string
	StsEndpoint                    string
	StsRegion                      string
	SuppressDebugLog               bool
	Token                          string
	TokenBucketRateLimiterCapacity int
	UseDualStackEndpoint           bool
	UseFIPSEndpoint                bool
	UserAgent                      UserAgentProducts
}

func (Config) CustomCABundleReader

func (c Config) CustomCABundleReader() (*bytes.Reader, error)

func (Config) HTTPTransportOptions

func (c Config) HTTPTransportOptions() (func(*http.Transport), error)

HTTPTransportOptions returns functional options that configures an http.Transport. The returned options function is called on both AWS SDKv1 and v2 default HTTP clients.

func (*Config) NewCannotAssumeRoleError

func (c *Config) NewCannotAssumeRoleError(err error) CannotAssumeRoleError

func (*Config) NewCannotAssumeRoleWithWebIdentityError

func (c *Config) NewCannotAssumeRoleWithWebIdentityError(err error) CannotAssumeRoleWithWebIdentityError

func (*Config) NewNoValidCredentialSourcesError

func (c *Config) NewNoValidCredentialSourcesError(err error) NoValidCredentialSourcesError

func (Config) ResolveSharedConfigFiles

func (c Config) ResolveSharedConfigFiles() ([]string, error)

func (Config) ResolveSharedCredentialsFiles

func (c Config) ResolveSharedCredentialsFiles() ([]string, error)

func (Config) ValidateProxySettings

func (c Config) ValidateProxySettings(diags *diag.Diagnostics)

func (Config) VerifyAccountIDAllowed

func (c Config) VerifyAccountIDAllowed(accountID string) error

VerifyAccountIDAllowed verifies an account ID is not explicitly forbidden or omitted from an allow list, if configured.

If the AllowedAccountIds and ForbiddenAccountIds fields are both empty, this function will return nil.

type NoValidCredentialSourcesError

type NoValidCredentialSourcesError struct {
	Config *Config
	// contains filtered or unexported fields
}

NoValidCredentialSourcesError occurs when all credential lookup methods have been exhausted without results.

func (NoValidCredentialSourcesError) Detail

func (NoValidCredentialSourcesError) Equal

func (NoValidCredentialSourcesError) Err

func (NoValidCredentialSourcesError) Severity

func (NoValidCredentialSourcesError) Summary

type ProxyMode

type ProxyMode int
const (
	HTTPProxyModeLegacy ProxyMode = iota
	HTTPProxyModeSeparate
)

type UserAgentProduct

type UserAgentProduct struct {
	Name    string
	Version string
	Comment string
}

type UserAgentProducts

type UserAgentProducts []UserAgentProduct

func (UserAgentProducts) BuildUserAgentString

func (ua UserAgentProducts) BuildUserAgentString() string

Jump to

Keyboard shortcuts

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