Package: ibmiam

import "../ibm-cos-sdk-go/aws/credentials/ibmiam"

Sub-Packages

token, tokenmanager

Constants

const EnvProviderName = readonly

EnvProviderName name of the IBM IAM provider that loads IAM credentials from environment variables

Value:

"EnvProviderIBM"
const StaticProviderName = readonly

StaticProviderName name of the IBM IAM provider that uses IAM details passed directly

Value:

"StaticProviderIBM"
const SharedConfProviderName = readonly

SharedConfProviderName of the IBM IAM provider that loads IAM credentials from shared config

Value:

"SharedConfigProviderIBM"
const TrustedProfileProviderName = readonly

Value:

"TrustedProfileProviderIBM"
const ResourceComputeResource ResourceType = readonly

Value:

"CR"
const CustomInitFuncProviderName = readonly

CustomInitFuncProviderName the Name of the IBM IAM provider with a custom init function

Value:

"CustomInitFuncProviderIBM"
const SharedCredsProviderName = readonly

SharedCredsProviderName name of the IBM IAM provider that loads IAM credentials from shared credentials file

Value:

"SharedCredentialsProviderIBM"
const EnvProviderTrustedProfileName = readonly

EnvProviderName name of the IBM IAM provider that loads IAM trusted profile credentials from environment variables

Value:

"EnvProviderTrustedProfileIBM"

Type Summary collapse

Function Summary collapse

Function Details

func CheckForConflictingIamCredentials() error

Helper function to check whether both api-key and trusted-profile-id are set in environment variables.

Returns:

Error if both apiKey and trustedProfileID are set, nil if only either of them is set.


14
15
16
17
18
19
20
21
22
23
24
// File 'aws/credentials/ibmiam/iamcreds_file_utils.go', line 14

func CheckForConflictingIamCredentials() error { apiKey := os.Getenv("IBM_API_KEY_ID") trustedProfileID := os.Getenv("TRUSTED_PROFILE_ID") if apiKey != "" && trustedProfileID != "" { return awserr.New("InvalidCredentials", `only one of ApiKey or TrustedProfileID should be set, not both`, nil) } return nil }

func NewConfigCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials

NewConfigCredentials Constructor



70
71
72
// File 'aws/credentials/ibmiam/shared_config_provider.go', line 70

func NewConfigCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials { return credentials.NewCredentials(NewSharedConfigProvider(config, filename, profilename)) }

func NewEnvCredentials(config *aws.Config) *credentials.Credentials

NewEnvCredentials Constructor



32
33
34
// File 'aws/credentials/ibmiam/env_provider.go', line 32

func NewEnvCredentials(config *aws.Config) *credentials.Credentials { return credentials.NewCredentials(NewEnvProvider(config)) }

func NewEnvCredentialsTrustedProfile(config *aws.Config) *credentials.Credentials

NewEnvCredentials Constructor



33
34
35
// File 'aws/credentials/ibmiam/env_provider_trusted_profile.go', line 33

func NewEnvCredentialsTrustedProfile(config *aws.Config) *credentials.Credentials { return credentials.NewCredentials(NewEnvProviderTrustedProfile(config)) }

func NewSharedCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials

NewSharedCredentials constructor for IBM IAM that uses IAM credentials passed in Returns:

credentials.NewCredentials(newSharedCredentialsProvider()) (AWS type)


66
67
68
// File 'aws/credentials/ibmiam/shared_credentials_provider.go', line 66

func NewSharedCredentials(config *aws.Config, filename, profilename string) *credentials.Credentials { return credentials.NewCredentials(NewSharedCredentialsProvider(config, filename, profilename)) }

func NewStaticCredentials(config *aws.Config, authEndPoint, apiKey, serviceInstanceID string) *credentials.Credentials

NewStaticCredentials constructor for IBM IAM that uses IAM credentials passed in Returns: credentials.NewCredentials(newStaticProvider()) (AWS type)



18
19
20
// File 'aws/credentials/ibmiam/static_provider.go', line 18

func NewStaticCredentials(config *aws.Config, authEndPoint, apiKey, serviceInstanceID string) *credentials.Credentials { return credentials.NewCredentials(NewStaticProvider(config, authEndPoint, apiKey, serviceInstanceID)) }

func NewTrustedProfileCredentialsCR(config *aws.Config, authEndPoint string, trustedProfileID string, crTokenFilePath string, serviceInstanceID string) *credentials.Credentials

NewTrustedProfileCredentials constructor for IBM IAM that uses IAM trusted-profile credentials passed Returns: credentials.NewCredentials(newTrustedProfileProvider()) (AWS type)



28
29
30
// File 'aws/credentials/ibmiam/trusted_profile_provider.go', line 28

func NewTrustedProfileCredentialsCR(config *aws.Config, authEndPoint string, trustedProfileID string, crTokenFilePath string, serviceInstanceID string) *credentials.Credentials { return credentials.NewCredentials(NewTrustedProfileProviderCR(config, authEndPoint, trustedProfileID, crTokenFilePath, serviceInstanceID)) }