Package: defaults
Overview
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Generally this package shouldn't be used directly, but session.Session instead. This package is useful when you need to reset the defaults of a session or service client to the SDK defaults before setting additional parameters.
Type Summary collapse
-
Defaults
struct
A Defaults provides a collection of default values for SDK clients.
Function Summary collapse
-
func Config() *aws.Config
Config returns the default configuration without credentials.
-
func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials
CredChain returns the default credential chain.
-
func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider
CredProviders returns the slice of providers used in the default credential chain.
-
func Get() Defaults
Get returns the SDK's default values with Config and handlers pre-configured.
-
func Handlers() request.Handlers
Handlers returns the default request handlers.
-
func SharedConfigFilename() string
SharedConfigFilename returns the SDK's default file path for the shared config file.
-
func SharedCredentialsFilename() string
SharedCredentialsFilename returns the SDK's default file path for the shared credentials file.
Type Details
Defaults struct
A Defaults provides a collection of default values for SDK clients.
Function Details
func Config() *aws.Config
Config returns the default configuration without credentials. To retrieve a config with credentials also included use defaults.Get().Config
instead.
Generally you shouldn't need to use this method directly, but is available if you need to reset the configuration of an existing service client or session.
52 53 54 55 56 57 58 59 60 61 |
// File 'aws/defaults/defaults.go', line 52
|
func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials
CredChain returns the default credential chain.
Generally you shouldn't need to use this method directly, but is available if you need to reset the credentials of an existing service client or session's Config.
90 91 92 93 94 95 |
// File 'aws/defaults/defaults.go', line 90
|
func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider
CredProviders returns the slice of providers used in the default credential chain.
For applications that need to use some other provider (for example use different environment variables for legacy reasons) but still fall back on the default chain of providers. This allows that default chain to be automatically updated IBM COS SDK Code – START
105 106 107 108 109 110 111 112 113 |
// File 'aws/defaults/defaults.go', line 105
|
func Get() Defaults
Get returns the SDK's default values with Config and handlers pre-configured.
34 35 36 37 38 39 40 41 42 43 |
// File 'aws/defaults/defaults.go', line 34
|
func Handlers() request.Handlers
Handlers returns the default request handlers.
Generally you shouldn't need to use this method directly, but is available if you need to reset the request handlers of an existing service client or session.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
// File 'aws/defaults/defaults.go', line 68
|
func SharedConfigFilename() string
SharedConfigFilename returns the SDK's default file path for the shared config file.
Builds the shared config file path based on the OS's platform.
-
Linux/Unix: $HOME/.aws/config
-
Windows: %USERPROFILE%.awsconfig
24 25 26 |
// File 'aws/defaults/shared_config.go', line 24
|
func SharedCredentialsFilename() string
SharedCredentialsFilename returns the SDK's default file path for the shared credentials file.
Builds the shared config file path based on the OS's platform.
-
Linux/Unix: $HOME/.aws/credentials
-
Windows: %USERPROFILE%.awscredentials
13 14 15 |
// File 'aws/defaults/shared_config.go', line 13
|